how to get elements using their id's

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
arun_volam
Posts: 17
Joined: Fri Jul 09, 2010 1:40 pm

how to get elements using their id's

Post by arun_volam » Mon Aug 23, 2010 7:26 am

Hi,

can anyone tell me how to get the web elements and flex objects by their id's.

i don't want to add all the objects to repository because the position of elements in my web page goes on changing from build to build, instead of xpath i would like to get the elements by using their unique id's.


Thanks,
Arun

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

Re: how to get elements using their id's

Post by Support Team » Mon Aug 23, 2010 3:11 pm

Hi arun_volam,
to identify your elements by id use the 'id' (or additional for flex 'flexuid' ) property in your RxPath.

sample paths:
e.g.
/dom[@domain='www.gmx.at']/body/div[@id='container']/div[@id='wrapper']/div[@id='header']
or
/dom[@domain='www.ranorex.com']/body/flexobject/button[@flexuid='FlexExample0.Button301']

Use Ranorex Spy and look on the overview tab for attributes you can use to identify an element.

Also see: http://www.ranorex.com/support/user-gui ... xpath.html

Best regards,
Christian
Ranorex Team
.
Image