How to find div Element without an id attribute with Selenium Webdriver
c#, selenium, selenium-webdriver
Solution
Well if text value is unique, then solution is simple. Try the xpath below:
//div[text()='phys_tag_desc']
If the text is not exact match. Try following:
//div[contains(text(),'phys_tag_desc')]
Problem
I'm using C# and Selenium Webdriver and I'm trying to find a `div` Element in my html code which looks like this: ``` <div class="x-grid-cell-inner" style="text-align: left;" unselectable="on"> phys_tag_desc </div> ``` I cant find a method to search for the value of the `div` Element with Selenium Webdriver. I already searched this site and checked the Selenium Webdriver Documentation, but couldn't find anything.