intellisense - Feature file 'scenario outline' data array item not being picked by in Step Definition
问题描述
I set up a Feature File with a scenario outline, but then I can not use the data array item in my step definition file.
i.e. 'address' is my feature file data array item, but in my step definition file, 'address' is underlined by Eclipse IntelliSense as an error and this gives an 'Arity mismatch' message if run.
我是自动化新手,希望我的步骤定义能够获取功能文件场景大纲数组数据。谁能发现我做错了什么?
Feature: Login
Scenario Outline: Successful login
Given HomePage '<address>'
When ValidCredentials
Then LoginSuccessfull
Examples:
|address|
|https://totaljobs.com|
//Step Definition extract
@Given("HomePage '(.*?)'")
public void HomePage() {
driver.get(address);
driver.manage().window().setSize(new Dimension(1536, 792));
System.out.println("Chrome opened");
String url = driver.getCurrentUrl();
System.out.println("Current url:" +url);
}
解决方案
推荐阅读
- javascript - 可以与 IE 一起使用的 Object.entries 的替代方案
- c# - 如何使用ajax发布html代码json数组
- javascript - 使用 javascript 正则表达式缩小 html 模板字符串
- c - 为什么会触发 SIGSEGV?
- .htaccess - .htaccess URL重写使用两个参数和一个变量
- sql - oracle sql 澄清在 where 子句中使用 case 条件,错误 sdo_nn 无法在没有索引的情况下进行评估
- html - 如何使div的高度和宽度等于屏幕的宽度和高度?
- asp.net-core-mvc - 属性路由区分通配符和具有相似模式的操作
- c - 在C中获取整数的一部分
- python - CodeChef 实践挑战 - “ATM”