Page 2 of 2

Re: Testing Metro style windows 8 app

Posted: Sat Dec 08, 2012 12:23 am
by Ciege
Ahhh, wait a minute now...

Please check this link:
http://stackoverflow.com/questions/1174 ... deployment

Seems you need to package and deploy your app since its a Metro style app.

In the second link see the section titled "Deploy and run".

Re: Testing Metro style windows 8 app

Posted: Sat Dec 08, 2012 12:59 am
by vasudha.c8
Yes I am trying to do this with package only. Also If i try to invoke a live tile , ranorex cannot locate it even if the path is specified correctly .

Re: Testing Metro style windows 8 app

Posted: Mon Dec 10, 2012 2:16 pm
by Support Team
Hello,

Microsoft added a lot of new security features in Windows 8. These features make it more difficult to access apps for Ranorex.

Please try to insert the following lines at the beginning of your main method.
if (Ranorex.Core.Util.IsRestartRequiredForWinAppAccess)   
 return Ranorex.Core.Util.RestartWithUiAccess();
Please let me know if it works.

Regards,
Bernhard

Re: Testing Metro style windows 8 app

Posted: Mon Dec 10, 2012 6:07 pm
by vasudha.c8
Thanks Bernhard.

These lines will go in Program.cs of ranorex suite or my class file in visual studio? And also do i need to reference any ranorex modules in my project in visual studio?

Re: Testing Metro style windows 8 app

Posted: Tue Dec 11, 2012 1:15 am
by vasudha.c8
I upgraded my ranorex version to 4 and also made the changes suggested. Now i dont get any launch of my app or not even I get any error message. Ranorex runs and stops with no test report.

Re: Testing Metro style windows 8 app

Posted: Tue Dec 11, 2012 2:53 pm
by Support Team
Hello,

Could you please describe exactly how you start your app. Do you start the app with Ranorex Studio? If yes, did you start Ranorex as Administrator?
Thank you!

Regards,
Bernhard

Re: Testing Metro style windows 8 app

Posted: Tue Dec 11, 2012 6:40 pm
by vasudha.c8
Hi,

Yes I start the app from Ranorex Studio after starting Ranorex as administrator , But even the same nothing happens . ranorex starts and stops.

Re: Testing Metro style windows 8 app

Posted: Wed Dec 12, 2012 1:40 pm
by Support Team
Hello,

Please make sure that you don't enable 'Run this program as an administrator in the 'Compatibility tab' of Ranorex Studio shortcut. You need to right-click on Ranorex Studio an select 'Run as administrator' as mentioned by Bernhard.

Could you please try out the attached example and run it in Ranorex Studio?
It should open and close the 'Weather' app in Windows 8.

Could you please post a screenshot from the behavior?
Is your AUT a custom app or a Windows 8 integrated app?

Regards,
Markus (T)

Re: Testing Metro style windows 8 app

Posted: Wed Dec 12, 2012 7:02 pm
by vasudha.c8
Hello,

The code sample which you sent works well with ranorex. I want to know how do you invoke the weather app for recording through ranorex? I meant the code for invoking it.. I am trying a simple scenario of invoking the application through Program.cs rather than record and play.

I am trying to work with the custom app which i have developed and it is not in Windows store .. I am trying to use ranorex to test the app completely before submitting or deploying in windows store...

Re: Testing Metro style windows 8 app

Posted: Wed Dec 12, 2012 8:48 pm
by vasudha.c8
I am able to generate a recording now with record and play :) . Thanks for all the help.

But i wanted to know if I can generate a recording manually as in invoking the app from Program.cs file of Ranorex studio.

Re: Testing Metro style windows 8 app

Posted: Thu Dec 13, 2012 2:21 pm
by Support Team
Hi,

Yes, you can also manually "generate" a recording as described in the following blog:
Did you know… that you can manually generate a recording?.
Just one question, why are you invoking your app in the Program.cs?

Regards,
Markus

Re: Testing Metro style windows 8 app

Posted: Thu Dec 13, 2012 11:39 pm
by vasudha.c8
Thank you.

I was just trying through Program.cs if i could. But its ok i figured out other way around.

Re: Testing Metro style windows 8 app

Posted: Fri Dec 14, 2012 9:40 am
by Support Team
You can also use the Host.ActivateWindowsApp method to activate your app. When the app is not started, yet, this method will start the app. If it's already started, it will bring it to front.
You can get the values for the "appId" and the "appFamilyName" arguments by tracking your app with Ranorex Spy.

Regards,
Alex
Ranorex Team

Re: Testing Metro style windows 8 app

Posted: Fri Dec 14, 2012 6:58 pm
by vasudha.c8
Thank you .