lundi 3 juillet 2017

Selenium HtmlUnitDriver clicking on checkbox

I'm trying to get my checkbox clicked while running using selenium.

I have no issue running my test when using chromedriver. But when I switch to HtmlUnitDriver, it will throw error when it reaches the clicking of checkbox action. The error thrown is org.openga.selenium.ElementNotVisibleException: You may only interact with visible elements

I've tried multiple methods like:

driver.findElement(By.xpath("//*[@id=\"chkConfirm\"]")).sendKeys(Keys.SPACE); driver.findElement(By.xpath("//*[@id=\"chkConfirm\"]")).click();

But none of it works. Can someone help me out?




Aucun commentaire:

Enregistrer un commentaire