【发布时间】:2018-06-25 16:45:33
【问题描述】:
我在 Cucumber 中有这个场景:
Scenario Outline: Protractor and Cucumber Test InValid
Given I have already......
When I fill the <number>
....
Examples:
| number|...
| 3 |...
|4 |...
我在 .js 文件中有这个步骤定义:
When('I fill the {int}',{timeout: 90 * 1000}, function(callback, number) {
element(by.css("*[id='field_identificador']")).click();
element(by.css("*[id='field_identificador']")).sendKeys(number).then(callback);
});
我收到此错误:每个键必须是一个数字字符串;得到函数
当我通过自己放置一个没有场景大纲的值来执行测试时,例如:.sendKeys('4') 它可以工作。
我是不是做错了什么?
【问题讨论】:
标签: javascript html angular cucumberjs