How to get RanorexGroupObjectID?

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
gridle
Posts: 6
Joined: Mon Mar 10, 2014 5:13 pm

How to get RanorexGroupObjectID?

Post by gridle » Tue Feb 13, 2018 9:13 am

Hi,

I need to get RanorexGroupObjectId value from code.
For example is it possible to do like this:
Ranorex.Text text = Host.Local.FindSingle<Text>(".//text[@automationid='textID']");
var ranorexObjectId = text.GetRanorexObjectID(); //is there any method/property/rxPathCommand to get ranorexGroupObjectID?
Is there any method/property/rxPathCommand to get ranorexGroupObjectID?

Windows Sever 2012, R2
Ranorex 8.0.0

Thanks!

asdf
Posts: 174
Joined: Mon Mar 21, 2016 3:16 pm

Re: How to get RanorexGroupObjectID?

Post by asdf » Tue Feb 13, 2018 4:42 pm

Hi Gridle,

You could access the attribute the way you described.
For example:

Code: Select all

/form[@ranorexgroupobjectid='c635d17c-87ca-4dd8-bde7-dfae942d56a6']
However, since this id is a dynamically generated ID (changes at every AUT start), it will not make that much sense to use it in a RxPath. That means that this element will not be found anymore, after you restart your AUT.

Hope that helps.
asdf