Reputation: 59
I am trying to get text from child node from the element tree but when i try to get specific element it is getting empty array.
Here is my command in Chrome Console : $x('//*[@id="mainform"]/child::text()[10]')
then I need to get textContent value which is Memorable word and I dont know how to get it.
Any suggestion appreciated.
Upvotes: 0
Views: 96
Reputation: 18799
you are getting a list of elements, you just need to visit the one you need:
$x('//*[@id="mainform"]/child::text()[10]')[0]
Upvotes: 1