Open GoogleCodeExporter opened 9 years ago
> Is it possible to look for a text in a page
Sure you can use an XPath or a Css expression:
Set elts = driver.findElementsByXPath("//*[contains(text(), 'your text')]")
Set elts = driver.findElementsByCssSelector("*:contains('your text')")
> return its xpath
No there is no command to get it, but you could execute some Javascript to
compute it with the executeScript command.
> or id or name or class name
The getAttribute command will get you an attribute:
Debug.Print driver.findElementById("your id").getAttribute("id")
Debug.Print driver.findElementById("your id").getAttribute("class")
Original comment by florentbr
on 30 Oct 2014 at 12:20
Original issue reported on code.google.com by
alam...@gmail.com
on 29 Oct 2014 at 4:57