I need help to find visible elements on a webapp page using selenium. For example, I need to find a row that is click-able and click on it. The problem is that the elements are visible but not present in the page source as they are generated. Also, I'm coding in Java to find the elements. I tried using xpath and css path which I found using Firefox Firebug, but it didn't work. The click-able rows in the table all have the same class. They have different text though. Any help? Thanks!
Asked
Active
Viewed 371 times
-1
-
2Please post the html or link to website and the code you tried. – AGill Oct 29 '15 at 20:42
1 Answers
1
You can use isDisplayed()
method for same
boolean aa = driver.findElement(By.xpath("YOUR Element")).isDisplayed();
boolean ab = driver.findElement(By.xpath("YOUR Element")).isEnabled();
boolean ac = driver.findElement(By.xpath("YOUR Element")).isSelected();
For more detail info please refer the below URL:-
http://www.softwaretestinghelp.com/webdriver-commands-selenium-tutorial-14/
Hope it will help you :)

Shubham Jain
- 16,610
- 15
- 78
- 125