Ranorex Fails to find controls on first run after boot

Ranorex Spy, Recorder, and Studio.
DeveloperNick
Posts: 2
Joined: Mon Oct 18, 2010 11:05 am

Ranorex Fails to find controls on first run after boot

Post by DeveloperNick » Mon Oct 18, 2010 11:11 am

Hello Everyone.

We have a curious issue with Ranorex that we cannot seem to bottom out.

We have a VM which is triggerd to boot and then on the startup of XP the test applications kicks in. It was found to be failing to find controls more often than not so we set about an investigation.

What we found was curious. After XP had booted, the very first time a test is run ranorex will most likely not be able to find certain controls. Restarting the test though and ranorex works perfectly everytime. We looked at different situations like leaving the PC for 15 minutes to see if it was something still loading etc after boot but the result is always the same.

Wonderd if this is something anyone else has come across?

Thanks

Nick

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

Re: Ranorex Fails to find controls on first run after boot

Post by Support Team » Mon Oct 18, 2010 2:02 pm

Hi,

It could be possible that the executable on auto startup have not enough privileges, therefore Ranorex is not able to detect the elements of you application. With which mechanism you start your application after rebooting your computer?
  • Windows Scheduler?
  • Batch file?
  • Autostart?
  • or something else?
Regards,
Peter
Ranorex Team
.
Image

DeveloperNick
Posts: 2
Joined: Mon Oct 18, 2010 11:05 am

Re: Ranorex Fails to find controls on first run after boot

Post by DeveloperNick » Mon Oct 18, 2010 2:04 pm

Thanks for your response Peter.

Originally we were using a batch script but have found the results to be the same manually starting the .exe ourselves.

Nick

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

Re: Ranorex Fails to find controls on first run after boot

Post by Support Team » Mon Oct 18, 2010 3:17 pm

Hi,

I tried to reproduce your issue, but I had no success. Maybe the timeout to search for the elements is to short. Please try to increase the timeout for searching the elements. To increase the timeout please take a look to following link http://www.ranorex.com/support/user-gui ... html#c2074

Regards,
Peter
Ranorex Team
.
Image

natasha
Posts: 5
Joined: Mon Oct 17, 2011 7:18 pm

Re: Ranorex Fails to find controls on first run after boot

Post by natasha » Wed Nov 23, 2011 1:49 pm

Hi - I am having a similar issue to that of DeveloperNick above. We call the Ranorex smoke test from our build script batch file. This will always to fail one control (a link in the header) on the first run. However, if I run the script again, it works perfectly every time.

Any ideas? Let me know if you need any additional info.

Thanks,
Natasha

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

Re: Ranorex Fails to find controls on first run after boot

Post by Support Team » Wed Nov 23, 2011 1:52 pm

Hi,
natasha wrote:Any ideas? Let me know if you need any additional info.
Did you try to increase the search timeout for this element? I mentioned it in my last post.

Regards,
Peter
Ranorex Team
.
Image

natasha
Posts: 5
Joined: Mon Oct 17, 2011 7:18 pm

Re: Ranorex Fails to find controls on first run after boot

Post by natasha » Wed Nov 23, 2011 2:04 pm

Support Team wrote:Hi,
Did you try to increase the search timeout for this element? I mentioned it in my last post.
Yes, the timeout is set to 1 minute, but the UI element appears long before that.

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

Re: Ranorex Fails to find controls on first run after boot

Post by Support Team » Thu Nov 24, 2011 10:50 am

Hi,

Can you please send us a Ranorex Snapshot of the entire project and the used RxPath of specific element?
Are you using the repository to address the specific element or are you using, in user code created, elements with the specific path? Please send us the RxPath from the used Ranorex Element (repo or user code element).
Yes, the timeout is set to 1 minute, but the UI element appears long before that.
Can you try to use the Spy tool to determine how long it takes to search for the specific timeout after the restart of your system, just restart the system open Spy and your AUT and search for the specific element with the used RxPath.
How long did it take?
When the UI element appears it does not mean that Ranorex can identify it instantly, it needs some time to identify all the needed elements of your AUT. So please try to set the search timeout to a very high value, like 10min, to make sure it is not a timing issue.

Regards,
Markus
Ranorex Support Team
.
Image

natasha
Posts: 5
Joined: Mon Oct 17, 2011 7:18 pm

Re: Ranorex Fails to find controls on first run after boot

Post by natasha » Tue Nov 29, 2011 2:48 pm

Support Team wrote:Can you please send us a Ranorex Snapshot of the entire project and the used RxPath of specific element?
Yes, I've attached it here. I've done a bit more investigating and in my case, Ranorex doesn't recognize any child elements of the flexobject after it is installed on the web server for the first time. No matter how long I wait, these elements do not appear. This could be a caching issue. If I run the test a second time, it executes properly.
Are you using the repository to address the specific element or are you using, in user code created, elements with the specific path? Please send us the RxPath from the used Ranorex Element (repo or user code element).
The element I am trying to access in the repository is LibraryManager.Header.AdminLink, but as I stated above, the problem lies in that Ranorex is not fetching the child elements of 'LibraryManager', which is a flex object.

Here is the path for that element:

Code: Select all

/dom[@path='/ge/LibraryManager.aspx']/body/form/table/tbody/tr/td/table/tbody/tr/td/div/flexobject[@id='LibraryManager']
Hope that this helps, this is becoming a major issue for use because we aren't able to run automation after the automated build process because the first run always fails.

Thanks,
Natasha
Attachments
RanorexSnapshot.rxsnp
(236.03 KiB) Downloaded 200 times

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

Re: Ranorex Fails to find controls on first run after boot

Post by Support Team » Wed Nov 30, 2011 4:14 pm

Hi,
Thanks for the snapshot!
Please also send us more information about your test environment, which IE version are you using, which flash player and flex version, are you testing on a VM, which instrumentation are you using, ... ?
Can you determine any special circumstances which could lead to the issue?
If I run the test a second time, it executes properly.
What happens if you close and reopen the IE during the first execution?

Regards,
Markus
Ranorex Support Team
.
Image