New help starting to test WinApps in Windows 8/10

Ask general questions here.
User avatar
Aracknid
Posts: 388
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

New help starting to test WinApps in Windows 8/10

Post by Aracknid » Fri Jul 10, 2015 2:45 pm

Hi,

I been hand coding Ranorex scripts for desktop based browsers for years, in visual studio. But I'm stumped with starting to work with Windows Apps in Windows 10 (we didn't bother with it in windows 8 ).

For example, I start the browser I want using the code system.diagnostics.process.start("iexplore",sURL), but I have no idea how to find or start a windows app, and specifically the new Edge browser in Windows 10.

Can some please point me to some code examples or point me in the right direction?

Thanks,

Aracknid.

User avatar
Aracknid
Posts: 388
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: New help starting to test WinApps in Windows 8/10

Post by Aracknid » Fri Jul 10, 2015 3:55 pm

After much trial and error and searching the web, I found a way to launch the Edge browser using the following command line:

Code: Select all

explorer.exe shell:AppsFolder\Microsoft.MicrosoftEdge_########!MicrosoftEdge
where ##### is a bunch of chars that 'may' be unique to your system, or not. I don't know.

go to C:Windows\SystemApps folder and you will find the Microsoft.MicrosoftEdge_###### folder here

I should point out I'm using the latest Windows 10 Pro Insider Preview, build 10162 from July. Older versions may be different since it was called Spartan...not Edge...


Still would appreciate any help though with Windows App testing. Any pointers would be appreciated.

Aracknid.

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

Re: New help starting to test WinApps in Windows 8/10

Post by Support Team » Mon Jul 13, 2015 11:59 pm

Hello Aracknid,
There are a few things to consider when running windows 8 Apps. Please refer to our Windows8 Troubleshooting guide for further details. Note that all metro style applications work in a highly sandboxed environment.
Also, you should still be able to use the system.diagnostics.process.start with the full path to the executable in the command line argument. For example:

Code: Select all

System.Diagnostics.Process.Start(@"C:\Program Files\Microsoft Office\Office14\excel.exe");
Unfortunately, we cannot support Windows 10 issues at the moment.

Regards,
Bassem
Support Team

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

Re: New help starting to test WinApps in Windows 8/10

Post by Support Team » Fri Sep 04, 2015 10:12 pm

Hello All,
As we currently do not support starting the Edge browser with the Host.Local.OpenBrowser() method, you can use the following API in a usercode action/code module:

Code: Select all

public void ActivateWindowsApp(
        string appId,
        string appFamilyName,
        Duration timeout,
        string arguments
)
Using Spy you are able to identify the appId and appFamilyName parameters:
1.png
So for example, creating a usercode method that accepts a URL to open the browser to:

Code: Select all

public void StartEdgeBrowser(string url){
 Host.Local.ActivateWindowsApp("MicrosoftEdge","Microsoft.MicrosoftEdge_8wekyb3d8bbwe",new          Duration(60000),url);
}
Regards,
Bassem
You do not have the required permissions to view the files attached to this post.