【发布时间】:2017-08-11 14:15:33
【问题描述】:
我正在使用量角器和黄瓜进行 e2e 测试。 场景大纲如下:
Scenario Outline: Visit HomeScreen
Given I am on the homescreen
When I do nothing
Then I should see the element with id <elemid>
Examples:
|elemid|
|scan-sample-image|
|how-to-run|
|navigation-button|
我对“then”部分的步骤定义如下:
this.Then(/^I should see the element with id \<elemid\>$/, function(id){
//some code
});
但是当我调用量角器时,我看到了这个:
Scenario: Visit HomeScreen
V Given I am on the homescreen
V When I do nothing
? Then I should see the element with id scan-sample-image
Scenario: Visit HomeScreen
V Given I am on the homescreen
V When I do nothing
? Then I should see the element with id how-to-run
Scenario: Visit HomeScreen
V Given I am on the homescreen
V When I do nothing
? Then I should see the element with id navigation-button
“然后”没有被识别。 我的错在哪里?
【问题讨论】:
标签: protractor chai cucumberjs scenarios