Get all siblings, no matter if precending or following?

Ask general questions here.
mrt
Posts: 257
Joined: Mon Mar 16, 2020 11:31 am

Get all siblings, no matter if precending or following?

Post by mrt » Wed Nov 16, 2022 5:18 pm

Dear all,

is there any way to get all siblings of an element, no matter if they are before or after the current element?

Currently I go from the element to parent and back down again, but with vastly nested structure and the need to use wildcards this becomes quite slow.

I noticed improvement in speed when using preceding-sibling or following-sibling, but some siblings i need to find are before, and some are after the element I use to drill down there.

Is there any "preceding-sibling::* or following-sibling::*" syntax or similar?

thanks!

IvanF
Posts: 151
Joined: Thu Aug 11, 2022 8:55 pm

Re: Get all siblings, no matter if precending or following?

Post by IvanF » Mon Nov 21, 2022 4:11 pm

Hi, could you please share the snapshot of a sample tree with the elements you are working on? The direct "preceding-sibling::* or following-sibling::*" syntax is not currently supported, but there may be a different workaround.

User avatar
doke
Posts: 112
Joined: Fri Mar 29, 2019 2:33 pm

Re: Get all siblings, no matter if precending or following?

Post by doke » Fri Dec 02, 2022 8:25 pm

Hi Ivan,

manual still says preceding and following can be used:
https://www.ranorex.com/help/latest/ran ... th-syntax/

Hope to see the manual updated on how this should be achieved...

Regards,
Don