Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Symfony/Behat不';不要使用wd_驱动程序_Symfony_Selenium_Behat - Fatal编程技术网

Symfony/Behat不';不要使用wd_驱动程序

Symfony/Behat不';不要使用wd_驱动程序,symfony,selenium,behat,Symfony,Selenium,Behat,我想将Behat与Symfony2和Selenium(独立服务器)一起使用 我配置我的behat.yml 行为 我用命令启动behat bin/behat --no-interaction --config /var/www/myproject/behat.yml /var/www/myproject/tests/behat/features/scenario/demo.feature 我收到一条错误消息: Could not open connection: Curl error throw

我想将Behat与Symfony2和Selenium(独立服务器)一起使用

我配置我的behat.yml

行为 我用命令启动behat

bin/behat --no-interaction --config /var/www/myproject/behat.yml /var/www/myproject/tests/behat/features/scenario/demo.feature
我收到一条错误消息:

Could not open connection: Curl error thrown for http POST to http://localhost:4444/wd/hub/session

为什么behat在我的配置中不使用wd_主机?我错过了什么?

因为你在网上重新申报了

javascript:
    selenium2: ~
要解决这个问题,请将url移动到
javascript
部分下

default:
    formatters:
        pretty:
            verbose:  true
    extensions:
        Behat\Symfony2Extension:
            #screenshot_directory: /tmp/screenshot

        Behat\MinkExtension:
            base_url: 'http://localhost/app_test.php'
            browser_name: googlechrome
            show_auto:    false
            sessions:
                default:
                    symfony2: ~
                javascript:
                    selenium2: 
                        wd_host: "http://192.168.33.1:6666/wd/hub"
    suites:
        default:
            paths:
                - '%paths.base%/tests/behat/features'
            contexts:
                - FeatureContext

因为你在网上重新申报了

javascript:
    selenium2: ~
要解决这个问题,请将url移动到
javascript
部分下

default:
    formatters:
        pretty:
            verbose:  true
    extensions:
        Behat\Symfony2Extension:
            #screenshot_directory: /tmp/screenshot

        Behat\MinkExtension:
            base_url: 'http://localhost/app_test.php'
            browser_name: googlechrome
            show_auto:    false
            sessions:
                default:
                    symfony2: ~
                javascript:
                    selenium2: 
                        wd_host: "http://192.168.33.1:6666/wd/hub"
    suites:
        default:
            paths:
                - '%paths.base%/tests/behat/features'
            contexts:
                - FeatureContext

完美的谢谢你的解释:)太好了!!谢谢你的解释:)