AUT main form not accessible when using „@instance=“

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Posts: 12
Joined: Thu Apr 19, 2012 4:12 pm

AUT main form not accessible when using „@instance=“

Post by binonline » Wed Sep 12, 2012 4:07 pm

Ranorex 3.3.2:
Within the Test Suite I start the AUT per “Run Application” and the main form can be accessed with no problems if XPath is like : /form[@controlname='dMAP110']

But: If I want to address the main form via /form[@controlname='dMAP110' and @instance=$_mapinst] ( for _mapinst=0) the application get started and I see the main form on the screen, but the elements are not accessed and the Test Suite is waiting (till timeout)for the form to appear.
If I click now the minimize button on the taskbar for the AUT, it minimizes but immediately appears again and then the Test Suite can access the elements on the form.

The Test Suite starts in sequence 2 additional instances (instance 1 and 2) of the AUT and both are accessible immediately. If it comes to closing the AUT in the sequence instance 2 then 1 then 0 it’s again instance 0 which is accessible just after a manual minimize click at the task bar.

Any ideas?

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

Re: AUT main form not accessible when using „@instance=“

Post by Support Team » Thu Sep 13, 2012 3:42 pm


Which technology is used in your application (e.g. WinForms, WPF, Web etc.)?
You can try to make a Validate.Exists() after “Run Application” and after closing the instances 2 and 1.
Validate.Exists(@"/form[@controlname='dMAP110' and @instance=" + $_mapinst +"]");
Ranorex Support Team