自从info.cukes更新到io.cucumber以来,我似乎无法导入raw()并反过来打印存储在功能文件中的DataTable的值,有什么想法吗?
Scenario: Validate Review Count
Given I access the testimonials homepage
Then the reviews count on the testimonials page should be great than the listed total
| specified total |
| 100 |
public void test(DataTable total) throws Exception {
List<List<String>> data = total.raw(); //the problem
System.out.println(data.get(1).get(0));
}
答案 0 :(得分:1)
以下方法在io.cucumber中具有相同的目的:
public void test(DataTable total) throws Exception {
List<List<String>> data = total.asLists();
System.out.println(data.get(1).get(0));
}