user1481927
user1481927

Reputation: 81

ElementNotVisibleException in Selenium

I have a problem with Selenium WebDriver throwing ElementNotVisibleException for the element being loaded in a pop-up window even though when instantiating the WebDriver I use:

driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

Occurs for Chromedriver and IEDriver

Upvotes: 1

Views: 3486

Answers (1)

user1481927
user1481927

Reputation: 81

Seems that solution was quite simple:

WebElement cBoxOverlay = wait.until(ExpectedConditions
            .visibilityOf(driver.findElement(By.id("cboxOverlay"))));

Driver waits to load the cBox and then tries to find the close button

Upvotes: 3

Related Questions