How can I compare both list is equal Verify data is from Excel sheet. I need to validate both list are same and there is no additional element or missing element from the list. I don't require to sorting the list. And Print output CAGID Excel data = CAGID web list
String[] Verify1 = Verify.split(",");
for(String actualView1 : Verify1) {
System.out.println("string" + actualView1);
}
List<WebElement> options = driver.findElements(By.xpath(SUMMARYFIELDS));
for (WebElement ele : options) {
System.out.println(ele.getText());
}
Output String
string CAGID
string GFPID
string IRU
string Control Unit
string Obligor Classification
string Obligor Limit Rating
string Obligor Risk Rating
string Commentary
string Credit Officer
string Risk Manager
string RCA Date
string RCA Extension Date
Output ele.getText()
CAGID
GFPID
IRU
Control Unit
Obligor Classification
Obligor Limit Rating
Obligor Risk Rating
Commentary
Credit Officer
Risk Manager
RCA Date
RCA Extension Date