对于一个项目,我需要使用 Selenium Webdriver 在服务器上运行我的测试用例。我看过 documentation , 但我不知道如何在我的代码中实现它以及如何使用它。
我已经测试过:
driver = webdriver.Remote(command_executor='http://ip_address:4444/wd/hub/static/resource/hub.html',desired_capabilities=DesiredCapabilities.FIREFOX)
但它不起作用。
PS:我用Python做测试,Linux是我服务器的操作系统。
最佳答案
尝试
driver = webdriver.Remote(command_executor='http://ip_address:4444/wd/hub/',desired_capabilities=DesiredCapabilities.FIREFOX)`
你在代码中使用的 URL 在我看来很糟糕:-/
关于python - Selenium 远程 WebDriver,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31539063/