Page 1 of 1

How to get RanorexGroupObjectID?

Posted: Tue Feb 13, 2018 9:13 am
by gridle
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!

Re: How to get RanorexGroupObjectID?

Posted: Tue Feb 13, 2018 4:42 pm
by asdf
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