Ranorex stops running test when running as administrator

Ranorex Studio, Spy, Recorder, and Driver.
seurrep
Posts: 41
Joined: Tue Aug 07, 2018 10:19 am

Ranorex stops running test when running as administrator

Post by seurrep » Mon Aug 20, 2018 4:29 pm

I want to be able to debug my codelibrary functions. I tried enabling debugging but that resulted in Ranorex telling me that the application needed to be run as administrator for this to work.

I wasn't sure if there were any changes I wanted to undo before exiting so I cancelled, checked the open files, closed the application myself, went to the shortcut properties and enabled the option to run as administrator. I then restarted Ranorex myself.

When I run as administrator however Ranorex seems to stop running at the point I have a 'Wait for' step to check the existence of an image in the browser window. The report usually produced at the end of the test run doesn't get displayed either. It merely stops running (or appears to at any rate).

Run Ranorex without admin rights and it seems to find the image without a problem. I've also disabled all steps after this point to see what would happen. With admin rights nothing happens and no report is produced, but remove those rights and everything is run normally, including the display of the report at the end.

Any ideas why this might be happening? I'm currently using 8.2.

User avatar
RobinHood42
Posts: 324
Joined: Fri Jan 09, 2015 3:24 pm

Re: Ranorex stops running test when running as administrator

Post by RobinHood42 » Tue Aug 21, 2018 9:47 am

Hi!

Usually, both Ranorex and the AUT have to run with the same security permissions.
You can try starting your AUT as administrator as well. Maybe that helps.

Cheers,
Robin

seurrep
Posts: 41
Joined: Tue Aug 07, 2018 10:19 am

Re: Ranorex stops running test when running as administrator

Post by seurrep » Tue Aug 21, 2018 10:37 am

Thank you for the tip, but the application being used is IE and is opened using Ranorex's own 'Open Browser' action.

If Ranorex requires IE to be run with higher privileges for the purposes of debugging then shouldn't that be handled internally within Ranorex itself?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Ranorex stops running test when running as administrator

Post by odklizec » Tue Aug 21, 2018 11:25 am

Hi,
seurrep wrote:
Mon Aug 20, 2018 4:29 pm
When I run as administrator however Ranorex seems to stop running at the point I have a 'Wait for' step to check the existence of an image in the browser window. The report usually produced at the end of the test run doesn't get displayed either. It merely stops running (or appears to at any rate).
Are you sure the waitfor step simply does not take too long to find the element? In other words, are you sure the xpath for searched element is not different if the Studio is started as administrator? I would suggest to add a "save snapshot" action, just before the failing action. In this "save snapshot" action, save the nearest parent element containing the failing one. Eventually, save the snapshot of dom. Then simply search the snapshot for xpath you are using in waitfor. If the element is not found, the xpath is most probably different.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

seurrep
Posts: 41
Joined: Tue Aug 07, 2018 10:19 am

Re: Ranorex stops running test when running as administrator

Post by seurrep » Tue Aug 21, 2018 11:47 am

The progress dialog disappears well before the time has elapsed so it seems to me like something else is happening.

Although I've found lowering the UAC level seems to have got rid of this issue.