I'm running a test with testNG along with Selenium
org.openqa.selenium.By
Test, do this search:
driver.findElement(By.id("idRoleCheck:0")).click();
It gives the following error:
org.openqa.selenium.ElementNotVisibleException: element not visible
Analyzed with the Chrome development tool, I have the Id, I can see it, but I think it's a problem with this ":" character, but I do not know, I already tried several searches here and others places and nothing.
I'm using the driver:
org.openqa.selenium.chrome.ChromeDriver
Has anyone ever been through this?
HTML generated in browser:
<div class="ui-helper-hidden-accessible">
<input id="idRoleCheck:0" name="idRoleCheck" value="value"
onchange="PrimeFaces.ab({s:"idRoleCheck",e:"change",p:"idRoleCheck",u:"idRoleCheck"});"
type="checkbox">
</div>
None of the answers so far resolved. However we evolved we were able to pass the test.
driver.findElement(By.xpath("//table[@id='idRoleCheck']/tbody/tr/td/div/div[2]/span")).click();
The problem in reading the id of the questioned form continues, perhaps it is missing some dependency that is generating the problem, because the log never comes with too much information. p>
Using:
- Selenium 3.0.0-beta2
- ChromeDriver 2.24
- Downloaded from here Chrome 2.24 Driver
How the problem was found
Using:
- Selenium IDE (that firefox plugin to write test data)
- Exported to type (TestNG / Java / WebDriver)
- It generates two lines, the first one that gives the error (idRoleCheck: 0)
- The second reading by By.xpath (...