for(int i=0; i<2; i++) //Main loop
{
for(int popup=0; popup<2; popup++)
{
String companyName = companyNameList.get(popup).getText();
System.out.println("*********************************************************************************");
System.out.println("COMPANY NAME::::-" + companyName);
System.out.println("*********************************************************************************");
openPopUp.get(popup).click();
Thread.sleep(4000);
for(int j=0;j<5;j++)
{
System.out.println(totalNoOfEmployee.get(j).getText());
}
Thread.sleep(4000);
break;
}
Actions act = new Actions(driver);
act.moveToElement(closePopup).click().build().perform();
Thread.sleep(4000);
}
My above code opening first popup and displaying first 5 names of company and opening 2nd popup but not displaying the name of company. Any help will be appreciated.