如何使用 selenium 独立服务器在 firefox 48.0 上的 behat 中运行测试? [英] How to run tests in behat on firefox 48.0 using selenium stand alone server?

查看:26
本文介绍了如何使用 selenium 独立服务器在 firefox 48.0 上的 behat 中运行测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

Previously I worked with Behat 3 and Stand Alone Server 2.45 and everything worked properly.

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

I use PhpStorm as my IDE. Later, after installing the update of Firefox (ver. 48.0) my tests stop working. I also try to run tests with Selenium Standalone Server ver. 3.0.0-beta3 but Firefox browser not open.

有没有办法在浏览器FF 48.0下运行测试?也许有人想分享有关 Behat、FF48 和 Stand Alone Server 的工作配置的信息?

Is there any way to run tests under browser FF 48.0? Maybe someone would like to share information about the working configuration of Behat, FF48 and Stand Alone Server?

推荐答案

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

Starting the selenium server standalone with chrome driver command,

最新的硒(3.0+)

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

对于旧版本(低于 3)

for older versions (lower than 3)

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

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

So for the latest selenium you need to specify the driver first and after that, the selenium jar.

注意:为您的操作系统使用合适的 chromedriver 版本

Note: use the appropriate chromedriver version for your os

这篇关于如何使用 selenium 独立服务器在 firefox 48.0 上的 behat 中运行测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆