在我的服务器中执行时未找到Phantomjs Behat表单字段

在我的服务器中执行时未找到Phantomjs Behat表单字段,phantomjs,behat,mink,Phantomjs,Behat,Mink,各位,能帮我个忙吗 我尝试用Behat/Mink和Phantomjs运行一个测试。它在没有Phantomjs的情况下在本地工作,但不能在我的服务器上工作 当我启动测试时,我遇到了以下问题: @javascript Scenario: Searching for a page that does NOT exist Given I am on "http://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Ac

各位,能帮我个忙吗

我尝试用Behat/Mink和Phantomjs运行一个测试。它在没有Phantomjs的情况下在本地工作,但不能在我的服务器上工作

当我启动测试时,我遇到了以下问题:

 @javascript
 Scenario: Searching for a page that does NOT exist                             
Given I am on "http://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Accueil_principal" 
When I fill in "searchInput" with "Glory Driven Development"                 
  Form field with id|name|label|value "searchInput" not found.
我在behat.yml中的设置如下

phantomjs:
context:
      class:  'FeatureContext'
  extensions:
    Behat\MinkExtension\Extension:
      goutte: ~
      selenium2:
        wd_host: "http://localhost:8643/wd/hub"
        capabilities:
            proxy:
               proxyType: direct
@javascript 
Scenario: Searching for a page that does NOT exist
Given I am on "http://fr.wikipedia.org/wiki/WikipC3%A9dia:Accueil_principal"
When I fill in "searchInput" with "Glory Driven Development"
And I press "searchButton"
Then I should see "Search results"
我的测试如下

phantomjs:
context:
      class:  'FeatureContext'
  extensions:
    Behat\MinkExtension\Extension:
      goutte: ~
      selenium2:
        wd_host: "http://localhost:8643/wd/hub"
        capabilities:
            proxy:
               proxyType: direct
@javascript 
Scenario: Searching for a page that does NOT exist
Given I am on "http://fr.wikipedia.org/wiki/WikipC3%A9dia:Accueil_principal"
When I fill in "searchInput" with "Glory Driven Development"
And I press "searchButton"
Then I should see "Search results"
我不明白为什么它会说:找不到id | name | label | value searchInput的表单字段。我已经发布了phantomjs甚至selenium


有人有主意吗?谢谢

我今天也在尝试同样的场景

驱动程序正在抱怨找不到元素。所以我调试了一下测试用例,发现驱动程序浏览的页面与预期的页面不同

当驱动程序执行以下操作时:$this->getSession->getPage。确保您在预期页面中并收到预期的html