Windows 10 object identification issue when using Agent

Bug reports.
rgodin
Posts: 2
Joined: Thu Apr 19, 2018 5:30 pm

Windows 10 object identification issue when using Agent

Post by rgodin » Thu Apr 19, 2018 6:10 pm

Ranorex Version: 8.0.1
Agent Version: 3.0.3

Scenario: When I send a test to our Windows 10 VM using the agent, it fails to double click our shortcut object (tscon.exe) on the VM desktop. The report will display, "Failed to find item..."

Notes:
* This issue does not happen on our Windows 7 or Windows 8 VMs.
* I ran the same script directly from the Windows 10 VM and Jenkins and those both worked as expected.

See the attached images for the recording module, repo item and user code for reference.
You do not have the required permissions to view the files attached to this post.

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

Re: Windows 10 object identification issue when using Agent

Post by Support Team » Fri Apr 20, 2018 3:18 pm

Hello rgodin,

I tried to reproduce the issue on one of our Windows 10 VM's, but it works there without any problems. Would you mind to check the RanoreXPath with Ranorex Spy on the Windows 10 machine and compare it with the RanoreXPaht in the repository?

The Ranorex Agent runs most probably with different permissions than Jenkins. This could also be the cause of the issue.

Regards,
Bernhard

rgodin
Posts: 2
Joined: Thu Apr 19, 2018 5:30 pm

Re: Windows 10 object identification issue when using Agent

Post by rgodin » Mon May 07, 2018 10:07 pm

Hi Bernhard,

The x-path for 'tscon.exe' is the same for both Windows 7/8/10. I tried running the same scripts locally (on Windows 10) and they ran fine. The issue appears to be when using the Agent. The scripts worked previously, so it's possible a Windows Update is the cause of this issue.

I have adjusted some settings to see if permissions are the issue/got changed by an update. I checked in the 'Ranorex Agent Properties' and in Services > Ranorex Agent Auto Launch properties, but haven't had any luck.

Any suggestions on other permissions or places to check?

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

Re: Windows 10 object identification issue when using Agent

Post by Support Team » Tue May 08, 2018 9:42 am

Hello rgodin,

If the RanoreXPath are exactly the same on both machines, it is most probably a permission issue.
There are two lines of code in the Program.cs file which could solve the problem.

// if (Util.IsRestartRequiredForWinAppAccess)
// return Util.RestartWithUiAccess();

Please remove the comments (//) and try if the item can be found when executing the test with the Ranorex Agent.

Sincerely,
Bernhard