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

后端 未结 3 1761
忘掉有多难
忘掉有多难 2020-12-06 22:56

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

I use PhpStorm as my IDE. Later, after installing the update of Firefox

相关标签:
3条回答
  • 2020-12-06 23:19

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

    0 讨论(0)
  • 2020-12-06 23:31

    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

    0 讨论(0)
  • 2020-12-06 23:33

    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?

    0 讨论(0)
提交回复
热议问题