Find a webdocument by width and height

Ask general questions here.
marcushe
Posts: 112
Joined: Tue Apr 14, 2009 6:38 am

Find a webdocument by width and height

Post by marcushe » Thu Jul 30, 2009 8:23 am

Ranorex:2.1,win7
On my desktop ,there a 5 webdocuments ,within which only one's size, width>0,height>0

I'm trying to locate a webdocument when i use below Rxpath
@"/dom[@pageurl~' file://c:\\users\\"[email protected]"\\AppData\\Local\\Temp\\.*\.html ' and @width='739' and @height='244' ] "
If i use it without @width & @height , it can find a webdocument , not which i need.
if i use it with width and height , it can not locate the webdocument. Is there sth wrong with my rxpath???

Width and height originates from what RanoreSpy captured.
i also used @width~'7.*' and @height~'2.*', it can not work

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Find a webdocument by width and height

Post by Support Team » Thu Jul 30, 2009 10:44 am

The width and height of an element are currently not available as attributes in RxPaths. You can only use those attributes in RxPaths that are listed in the "General" tab of RanorexSpy when selecting an element.

However, you can simply get all dom elements in a list (Find("/dom[@...]")) and than go through the returned list and check the width and height of the individual elements.

Regards,
Alex
Ranorex Support Team
.
Image