Page 1 of 1

XPath - How to read text from all child div

Posted: Thu Oct 17, 2019 9:46 am
by darpro
Hi,

Is there possibility to read InnerText from all children elements with one query xpath

Structure
div [id=A]
- div
- div
- div

General in xpath we can do this with div[#A]//text()
Can we do the same in ranorex? I can't use method text() - in ranorex repository

Re: XPath - How to read text from all child div

Posted: Thu Oct 17, 2019 11:06 am
by odklizec
Hi,

I'm afraid, there is no such option in Ranorex xpath. The only way to achieve what you want is with user code. You can use something like this...
https://www.ranorex.com/forum/getvalue- ... tml#p48113
Just replace <Ranorex.Button> with <Ranorex.DivTag> and 'Caption' with 'InnerText' or 'Text'.