How to run tests in behat on firefox 48.0 using selenium stand alone server?

随声附和 提交于 2019-11-28 01:37:06

Starting the selenium server standalone with chrome driver command,

for latest selenium (3.0+)

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

for older versions (lower than 3)

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

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

Note: use the appropriate chromedriver version for your os

Maybe we need some more information about your behat.yml and the information that the selenium logs are giving to you.

Only for reference, here you have my config for running firefox under Behat 3 an Selenium3-beta3.

    extensions:
    Behat\MinkExtension:
        base_url: "http://www.your-web.dev/"
        sessions:
            firefox_mac:
                selenium2:
                    browser: "firefox"
                    wd_host: http://xxx.xxx.xxx.xxx:4444/wd/hub
                    capabilities: { "platform": "MAC", "browser": "firefox", "version": "" }

You should link your PHPStorm to the behat executable and the configuration file to the firefox behat.yml. If you have your interpreter in PhpStorm well configured, it should work.

Does Phpstorm shows you some error?

Behat is not compatible at the moment with selenium3 use selenium 2.53 instead.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!