Help with finding folder/object in start menu.

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
radly82
Posts: 4
Joined: Fri Aug 03, 2018 4:15 pm

Help with finding folder/object in start menu.

Post by radly82 » Mon Mar 09, 2020 6:21 pm

Using 9.0.

I have a test where the objective is to find a program in the start menu and right click it to validate that it has the correct options (like uninstall, pin to start, more, etc) Problem i am having is that when i make the test in the studio and test it by hitting run it works, but when complied and ran using the application file it no longer sees the object in the menu. Ive tried running in admin and not, trying to change what its looking for (name, text, etc). Any ideas?

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

Re: Help with finding folder/object in start menu.

Post by odklizec » Mon Mar 09, 2020 9:25 pm

Hi,

At first, Ranorex 9.0 is pretty old and no longer supported. Not to mention version 9.0 contained several critical bugs. So please update your version with, at very least, 9.2.1 or most recent 9.3. Although I don’t think that updating will not fix your particular issue, it’s always best to use updated version.

As for you problem, could you please show us the xpath of failing element (as stored in repository) and exact error, as you see it in report? Without these details, it’s impossible to tell what’s wrong and how to fix it ;)
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

radly82
Posts: 4
Joined: Fri Aug 03, 2018 4:15 pm

Re: Help with finding folder/object in start menu.

Post by radly82 » Wed Mar 11, 2020 8:43 pm

/winapp[@appid='App' and @name='Start']//list[@automationid='AppsList']/container[@name='C']/listitem[@automationid='P~Microsoft.WindowsCalculator_8wekyb3d8bbwe!App']


I used calculator in the start menu as an example because the same thing is happening to our app and folder in the start menu. This works when being executed from the Studio with the Run button. But not when ran as a compiled executable . This seems to be an issue with anything in the start menu. I have tried to manipulate the xpath as best i could and i could still not get it to work.
Attachments
error1.JPG
error1.JPG (94.49 KiB) Viewed 926 times

radly82
Posts: 4
Joined: Fri Aug 03, 2018 4:15 pm

Re: Help with finding folder/object in start menu.

Post by radly82 » Fri Mar 20, 2020 10:13 pm

No ideas?

ahoisl
Certified Professional
Certified Professional
Posts: 192
Joined: Fri Sep 07, 2007 8:16 am

Re: Help with finding folder/object in start menu.

Post by ahoisl » Sat Mar 21, 2020 10:37 pm

This is most probably a security problem caused by Windows UAC. You probably need UI Access rights.
You have 3 choices to get that security privilege:
  • Run the test using the TestSuiteRunner
  • Run the test using a command line and invoke using the Ranorex.UiaLauncher.exe
  • Uncomment the following lines in the Program.cs file:
    if (Util.IsRestartRequiredForWinAppAccess)
        return Util.RestartWithUiAccess();
For more info, see the troubleshooting section in the user guide:
https://www.ranorex.com/help/latest/int ... ows8UIapps

Regards,
Alex
Ranorex Team