How do you connect remotely using Python + Webdriver

前端 未结 2 1738
陌清茗
陌清茗 2021-01-01 02:41

I am trying to figure out how to connect to my remote webdriver instance.

This is the code I am currently using:

from selenium.remote.webdriver impor         


        
2条回答
  •  南方客
    南方客 (楼主)
    2021-01-01 03:10

    change the following line from

    driver = WebDriver("http://172.16.205.129:4444", "firefox", "ANY")
    

    to

    driver = WebDriver("http://172.16.205.129:4444/wd/hub", "firefox", "ANY")
    

    Notice "/wd/hub" is appended to the url in the first argument.

提交回复
热议问题