Page 1 of 1

Help with finding folder/object in start menu.

Posted: Mon Mar 09, 2020 6:21 pm
by radly82
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?

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

Posted: Mon Mar 09, 2020 9:25 pm
by odklizec
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 ;)

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

Posted: Wed Mar 11, 2020 8:43 pm
by radly82
/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.

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

Posted: Fri Mar 20, 2020 10:13 pm
by radly82
No ideas?

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

Posted: Sat Mar 21, 2020 10:37 pm
by ahoisl
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