RxPath for Windows Desktop Icons?

Ask general questions here.
Kimon
Posts: 1
Joined: Sat Apr 11, 2020 11:07 am

RxPath for Windows Desktop Icons?

Post by Kimon » Sat Apr 11, 2020 11:16 am

Hi!
I tried to find Icons on the Windows Desktop using Spy, and it returned a path that began with \dektop - this worked for a while, until it suddenly did not. For a while the icons where findable only on a path that was the same, but began with \form (byline: \form and \dom had been the only rxpath roles i had known before encountering \desktop - is there a list of all posible roles?) - so i changed the root folder accordingly, and it worked again, for a while...

Just skipping the root folder makes the search take a long time (search with root-role (form or desktop, whatever works at the time): 50ms -- Search without root-role: 3,5 seconds...)

Is there a possibility of offering two alternative xpaths, or something?

User avatar
Vega
Certified Professional
Certified Professional
Posts: 214
Joined: Mon Jul 11, 2016 2:15 pm

Re: RxPath for Windows Desktop Icons?

Post by Vega » Tue Apr 14, 2020 12:35 am

What OS are you on? Maybe it varies per Windows version, but my path looks like the below:

Code: Select all

/form[@title='']/?/?/list[@controlid='1']/listitem[@text='Icon_Text_Sample']
the parent container in the Spy tree is Form 'explorer'. I am not sure how you were able to have desktop icons showed up as a child element of DOM, as a DOM is a webpage (document object model). Perhaps if you were able to share some sample RxPaths as well as a Ranorex snapshot, we could figure out your issue.

hope this helps