Work on creating automated tests with selenium I problem when I try to find text in the text inside it. I use the Xpath plugin and FirePath to check its result.
My xpath:
//input[@context='@name' and contains(@class, 'edit-string') and contains(@value, 'testSection')]
and returns nothing, and when I delete the last condition:
//input[@context='@name' and contains(@class, 'edit-string')]
I found the required div.
As I found out, the problem is that the value attribute does not contain typed text. The Firebug console proves this theory (the jQuery library is present on the page):
>>>> $("input.edit-string")[0].getAttribute("value")
null
>>>> $("input.edit-string")[0].value
"testSection"
>>>> $("input.edit-string")[0].getAttribute("context")
"@name"
Any ideas how I can use typed text in an xpath expression?
source
share