Make ranorex independent of controllid

Ask general questions here.
sceiler
Posts: 2
Joined: Mon Oct 27, 2014 7:09 pm

Make ranorex independent of controllid

Post by sceiler » Mon Oct 27, 2014 7:15 pm

Hello,

we are using ranorex to test an application of ours on windows 8.1 which has 2 windows. One window will be restarted during the test and that causes ranorex to not be able to find the object (controllid) anymore because there is a new instance of it.

Is there a way to make ranorex independent in this case? Something like not focusing on the application itself, instead clicking, touching etc. on the coordinates of the screen?

Detail: I record my actions and provide ranorex only the coordinates (x, y) for the the actions (click, touch,..) and independent of the application, object, ... it just executes the actions.

Thanks in advance.

Regards
sceiler

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Make ranorex independent of controllid

Post by krstcs » Tue Oct 28, 2014 3:31 pm

You can use coordinate-based mouse manipulation, but I would highly recommend NOT doing that. It is very fragile and easy to break.

One thing you can try is to turn off folder caching on the repo objects for the window that goes away. This will make Ranorex re-find the object every time it looks for it. It is a bit slower, but in situations like yours it may be better. You may be able to just do it for the top-level /form object and then just validate that object when it restarts.

Right-click the repo object and select Properties. In the properties dialog on the right side of the screen, set Use Cache to False.
Shortcuts usually aren't...

sceiler
Posts: 2
Joined: Mon Oct 27, 2014 7:09 pm

Re: Make ranorex independent of controllid

Post by sceiler » Mon Nov 03, 2014 11:59 pm

Hi,

I changed the cache to false but it still does not work.

I can see that the path column has a "Base: /form[@title='name']" written there. Should I also change stuff there?

My test looks like this: repo.appname.document.touch("xxx;yyy");
How would I transform this so it is independent of the object / form?

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

Re: Make ranorex independent of controllid

Post by Support Team » Thu Nov 06, 2014 1:02 pm

Hello sceiler,

May I ask you to create a Ranorex snapshot of your application under test? Please upload it to the forum, or send it to [email protected]

This file gives us information about the structure of your application under test.

Thanks,
Robert