自從從 info.cukes 更新到 io.cucumber 以來,我似乎無法導入 raw() 并依次打印存儲在功能文件中的 DataTable 的值,有什么想法嗎?Scenario: Validate Review CountGiven I access the testimonials homepageThen 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));}
1 回答

楊__羊羊
TA貢獻1943條經驗 獲得超7個贊
以下方法在 io.cucumber 中具有相同的目的:
public void test(DataTable total) throws Exception {
List<List<String>> data = total.asLists();
System.out.println(data.get(1).get(0));
}
添加回答
舉報
0/150
提交
取消