I am trying to click on a close button to close a popup. However, I get the error element not visible. I am checking if the element exists in the page, but still the error comes up. The piece of code giving the error is
while(driver.findElements(By.className("ui_close_x")).size() < 0);
driver.findElements(By.className("ui_close_x")).get(0).click();
System.out.println("Clkd");
Where am I going wrong?
Trying to crawl tripAdvisor