selenium - 如何使用 selenium 独立服务器在 firefox 48.0 上运行测试?

标签 selenium firefox phpstorm behat

之前我使用 Behat 3 和 Stand Alone Server 2.45,一切正常。

我使用 PhpStorm 作为我的 IDE。后来,在安装 Firefox(版本 48.0)的更新后,我的测试停止工作。我还尝试使用 Selenium Standalone Server ver 运行测试。 3.0.0-beta3 但火狐浏览器打不开。

有什么方法可以在浏览器 FF 48.0 下运行测试吗?也许有人愿意分享有关 Behat、FF48 和独立服务器的工作配置的信息?

最佳答案

使用 chrome 驱动程序命令独立启动 selenium 服务器,

最新的 Selenium (3.0+)

java -Dwebdriver.chrome.driver=chromedriver.exe -jar selenium-server-standalone-3.0.0-beta2.jar

对于旧版本(低于 3)

java -jar selenium-server-standalone-2.53.1.jar -Dwebdriver.chrome.driver=chromedriver.exe

因此,对于最新的 selenium,您需要先指定驱动程序,然后再指定 selenium jar。

Note: use the appropriate chromedriver version for your os

关于selenium - 如何使用 selenium 独立服务器在 firefox 48.0 上运行测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39468600/

相关文章:

python - Selenium WebDriver : Firefox starts, 但打不开网址

javascript - 当 Firebug 运行时,jQuery 在 Firefox 中工作,当 Firebug 未运行时,jQuery 不起作用

php - 如何在 PhpStorm 中标记非返回函数

PHPStorm 7 REST 客户端允许自签名证书

PHPDoc - 函数退出

python - 在 headless 树莓派上使用 Selenium

selenium - 在xpath中定位self或perent节点的同级元素

google-chrome - 调试 "Element is not clickable at point"错误

javascript - 从 firefox 侧边栏监视选定选项卡中的页面加载事件

python - Selenium 中的旋转代理