When subwindows/windows are closed and then opened again, th

Ask general questions here.
dyg
Posts: 1
Joined: Wed Jan 05, 2011 7:17 pm

When subwindows/windows are closed and then opened again, th

Post by dyg » Wed Jan 05, 2011 7:33 pm

Hi,

When subwindows/windows are closed and then opened again, the field ids are changing.

For example, my repository item path was ..element[@controlid='-773']/element/text[@controlid='-657'] at fist. But when i wanted to replay the same script, Ranorex didn't find the same text. when I looked for that text path by using Ranorex spy, I realized that the path was ..element[@controlid='-855]/element/text[@controlid='-704'].

What can I do for this problem? Now, I cannot replay my scripts.

Thanks,

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: When subwindows/windows are closed and then opened again, th

Post by Ciege » Wed Jan 05, 2011 9:48 pm

Hmmm, it would seem that your controls have not uniquely identifiable elements to them. Thus Ranorex finding them by control ID... Can you use RanorexSpy and examine your controls for any unique information that Ranorex can find then craft that into your own RXPath?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: When subwindows/windows are closed and then opened again, th

Post by Support Team » Fri Jan 07, 2011 12:36 pm

Usually, the control ID should by unique and stay the same for a control, that's why Ranorex uses this attribute by default to identify Win32 controls. Could you post a Ranorex snapshot of your application (see this section in the Ranorex User Guide on how to create snapshots)?

If the control IDs in your application are dynamic, you can either manually edit the RanoreXPaths (only feasible if there are few controls with that behavior) or you can use the RxWeightsPlugin to configure Ranorex not to use this attribute for your controls when the RanoreXPaths get created. Ranorex will then try to use other available attributes to identify your controls. See following blog that explains how to install and configure the RxWeightsPlugin:
http://www.ranorex.com/blog/eliminate-d ... norexpaths

Regards,
Alex
Ranorex Team