Page 1 of 1

Find a webdocument by width and height

Posted: Thu Jul 30, 2009 8:23 am
by marcushe
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\\"+username+@"\\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

Re: Find a webdocument by width and height

Posted: Thu Jul 30, 2009 10:44 am
by Support Team
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