无法将 ArrayList 值返回到测试用例
错误 :Could not find matching constructor for: java.util.ArrayList(java.awt.Dimension)
我的代码:
关键词:
public ArrayList<Integer> othersites() {
String[] sits = new String[9];
sits[0] = "https://www.tadawul.com.sa/wps/portal/tadawul/home/";
sits[1] = "https://www.msm.gov.om/";
WebUI.navigateToUrl(sits[0]);
String tdwl = WebUI.getText(findTestObject('ObjectRepository/Sites/site_tdwl'),FailureHandling.CONTINUE_ON_FAILURE)
String[] parts0 = tdwl.split("\\.")
String part0 = parts0[0]; // 00
String part00 = Integer.parseInt(part0.replaceAll(",", ""))
.
.
List<String> list = new ArrayList<String>();
list.add(part00);
list.add(part11);
List<Integer> newList1 = new ArrayList<Integer>(list.size()) ;
for (String myInt1 : list)
{
newList1.add(Integer.valueOf(myInt1));
}
return newList1
}
}
自定义关键字:
CustomKeywords.'decypha_equities.otherSiteValuesCapture.othersites'()
预期结果:[8566, 3869, 6606, 9806, 2791, 14304, 1529, 1847, 5028]
实际结果:找不到匹配的构造函数:java.util.ArrayList(java.awt.Dimension)
守着星空守着你
相关分类