Hi All…
I have list of values from excell which i need to verify with the expected list of values in mobile UI which i have kept in a list…
Please have a look in to the code below…
List WebElementValue = listOf_element_From_UI;
List excell_ExpectedList= listOf_element_From_Excell;
Thread.sleep(2000);
try
{
for(int j=0; j<excell_ExpectedList.size();j++)
{
System.out.println("Size of Data in Excel Sheet"+expectedList_dateFromExcell.size());
System.out.println(":"+WebElementValue+": From Web Eleement and :"+expectedList_dateFromExcell +": From Excel");
if (excell_ExpectedList.contains(WebElementValue ))
{
System.out.println("Data Verified");
break;
}
else
{
System.out.println("Data Mismatch not Verified");
continue;
}
}
but its not validating against all values from the excell sheet… if say the first row of value is invalided and rest of the rows are valid, it’s not validating for other values…
iam getting following result as
Index: 4, Size: 4
Size of Data in Excel Sheet4
:[Saving, Primary, Carded, 12312312312312]: From Web Eleement and :[Saving, Primary, Carded, 12312312312312]: From Excel
Data Mismatch not Verified
Size of Data in Excel Sheet4
:[Saving, Primary, Carded, 12312312312312]: From Web Eleement and :[Saving, Primary, Carded, 12312312312312]: From Excel
Data Mismatch not Verified
as per the test data, the values from excell and ui are same and it should have passed… but it switch to the else part
Appreciate if anyone can give better idea on same…
Thanks