我想把Mink的分机加到Behat。我通过作曲家安装了Behat,Mink和Mink扩展。但是,现在我在启用扩展时遇到了困难。这是我的behat.yml
default:
extensions:
Behat\MinkExtension\Extension:
base_url: http://en.wikipedia.org
goutte: ~
selenium2: ~下面是我的示例测试:
Feature: New
In order to test Behat
As a developer
I need to test that Mink Extension works
Scenario:
Given I am on the homepage当我运行Behat时,我得到了这个输出:
Feature: New
In order to test Behat
As a developer
I need to test that Mink Extension works
Scenario: # features/new.feature:6
Given I am on the homepage # FeatureContext::iAmOnHomepage()
Mink instance has not been set on Mink context class. Have you enabled the Mink Extension? (RuntimeException)
--- Failed scenarios:
features/new.feature:6
1 scenario (1 failed)
1 step (1 failed)
0m0.02s (11.86Mb)因此,我搜索了“Mink实例还没有在Mink上下文类上设置。您启用了Mink扩展吗?(RuntimeException)”,但是没有得到很好的结果。要启用分机,我需要做些什么?
发布于 2015-04-30 09:18:10
默认配置文件和扩展未正确对齐,请尝试根据yml标记对齐文档。
default:
extensions:
Behat\MinkExtension\Extension:
base_url: http://en.wikipedia.org
goutte: ~
selenium2: ~有关更多信息,请查看behat扩展文档
https://stackoverflow.com/questions/29953216
复制相似问题