How to open any app like word mobile on windows 10?

Ask general questions here.
deepak1920
Posts: 19
Joined: Sat Feb 13, 2016 5:04 pm

How to open any app like word mobile on windows 10?

Post by deepak1920 » Tue Mar 01, 2016 9:38 am

Hi,

I want to do some automation for different apps given in windows store. For example if I want to open the word mobile app using ranorex, how can I do it? If it was simple windows application like Microsoft Word 2013 then I would have opened it using below function:

Host.Local.RunApplication(applicationPath, "", "", false);

Here applicationPath is the exe path of Word2013 on system.

What can I do for windows store apps to be opened using Ranorex?

Thanks!

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

Re: How to open any app like word mobile on windows 10?

Post by odklizec » Tue Mar 01, 2016 9:50 am

Hi,

I assume you are talking about windows 'desktop' apps? Ranorex currently cannot automate Windows mobile apps.

Windows store apps are apps like any other. Once installed, there must be an exe file somewhere in your system? So all you need to do is to find the path to installed app (its exe) and use this path in RunApplication command. If you install Word mobile in your desktop PC/tablet, you need to find out where it is installed. It should be possible to access such info via app shortcut context menu. Just right click the app icon and select 'Properties' menu item. In the appeared dialog you should be able to find the path to exe.
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

deepak1920
Posts: 19
Joined: Sat Feb 13, 2016 5:04 pm

Re: How to open any app like word mobile on windows 10?

Post by deepak1920 » Tue Mar 01, 2016 10:58 am

Hello Pavel,

Thanks for your reply!

You are right, it is windows desktop app. I could find its executable path and tried to pass it in RunApplication command. But it threw an exception, attached is the snapshot of exception.

Please let me know if I am doing something incorrect here.



Thanks!
You do not have the required permissions to view the files attached to this post.

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

Re: How to open any app like word mobile on windows 10?

Post by odklizec » Tue Mar 01, 2016 12:01 pm

I'm afraid, I'm not automating on Win10 yet, nor I have access to Word mobile right now. So I can't help you more. Just few suggestions...

Have you tried to run the found path via cmd.exe or batch file?
Does the Word Mobile start OK if you start it via shortcut? If it starts via shortcut, so instead of directly calling exe file, try to use the shortcut file in RunApplication command.
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

deepak1920
Posts: 19
Joined: Sat Feb 13, 2016 5:04 pm

Re: How to open any app like word mobile on windows 10?

Post by deepak1920 » Tue Mar 01, 2016 1:35 pm

I tried calling the exe path in Process.Start() but it didn't work.

I created the shortcut for application and gave shortcut path to RunApplication method and it worked. But this approach creates a dependency to create the shortcut on each machine at a specified location before running the test script.

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

Re: How to open any app like word mobile on windows 10?

Post by odklizec » Tue Mar 01, 2016 1:51 pm

One more thought. Have you tried to set also 'working directory' parameter in RunApp method? It may be not enough to start the app by defining path to exe. I guess the working directory is set in shortcut?
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

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

Re: How to open any app like word mobile on windows 10?

Post by Support Team » Wed Mar 02, 2016 11:12 am

Hi Deppak,

running a Windows application on Windows 10 should work the same way as in Windows 8.
Please find a description how to achieve this in the following post.

Please don't forget to add '!AppID' to the Appfamilyname.

For example running the Windows 10 Calculator application
startWindowsCalculator.png
AppID.png
Hope this helps.

Regards,
Markus (S)
You do not have the required permissions to view the files attached to this post.

deepak1920
Posts: 19
Joined: Sat Feb 13, 2016 5:04 pm

Re: How to open any app like word mobile on windows 10?

Post by deepak1920 » Thu Mar 10, 2016 11:38 am

Thank You!

It worked well.

deepak1920
Posts: 19
Joined: Sat Feb 13, 2016 5:04 pm

Re: How to open any app like word mobile on windows 10?

Post by deepak1920 » Thu Mar 17, 2016 6:38 am

RunApplication method returns the process id of application being opened through it.

When I run windows desktop app using RunApplication method then this method returns '0' instead of correct process ID.


Any thoughts on this?


Thanks!

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

Re: How to open any app like word mobile on windows 10?

Post by Support Team » Tue Mar 22, 2016 7:47 am

Hi Deepak,

Thank you for reporting this issue.

I've already forwarded this to our responsible development team. In the meantime, you could use the following workaround to get the processid of your Windows Application
string appfamilyname = "Microsoft.WindowsCalculator_8wekyb3d8bbwe";
Report.Log(ReportLevel.Info, "Application", "Run application '"+appfamilyname+"!App' with arguments '' in normal mode.");
Host.Local.RunApplication(appfamilyname+"!App", "", "", false);
var calcapp = Host.Local.FindSingle<Ranorex.WindowsApp> ("winapp[@appfamilyname='"+appfamilyname+"']");
var processID = calcapp.Element.GetAttributeValueText("ProcessId");
Regards,
Markus (S)

deepak1920
Posts: 19
Joined: Sat Feb 13, 2016 5:04 pm

Re: How to open any app like word mobile on windows 10?

Post by deepak1920 » Wed Sep 14, 2016 12:20 pm

Hi,

Did ranorex team fix this issue 'process ID returned by RunApplication method is zero' in any latest release?



Regards,
Deepak

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

Re: How to open any app like word mobile on windows 10?

Post by Support Team » Fri Sep 16, 2016 9:27 am

Hi Deepak,

Currently, we do not know when this will be fixed. This depends on various factors. Nevertheless, all reported bugs and feature requests are documented in the release notes, with every new version release of Ranorex.

Thank you for your understanding.
Regards,
Markus (S)