我正在考虑在单个功能文件中使用两个csv文件,但无法这样做,共享相同的演示代码:
Scenario Outline:
* driver 'https://github.com/login'
* input('#login_field', '<username>')
* input('#password', '<password>')
* submit().click("input[name=commit]")
* match html('#js-flash-container') contains 'Incorrect username or password.'
Examples:
|read('one.csv')|
|read('two.csv')|
在这里,<username>
存储在one.csv中,<password>
并且存储在two.csv中,有没有办法做到这一点?请帮忙。提前致谢。
没有空手道永远不会支持这一点。但是请注意,您可以在中创建数据源Background
。
Background:
* def one = read('one.csv')
* def two = read('two.csv')
* def data = karate.append(one, two)
Scenario Outline:
* print __row
Examples:
| data |
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句