Device automation and Ranorex API

Ranorex Spy, Recorder, and Studio.
Stian
Posts: 25
Joined: Mon Jan 30, 2012 9:38 am

Device automation and Ranorex API

Post by Stian » Fri Nov 09, 2012 8:28 am

Hi!

Is it possible to develop device automation for Android (and upcoming iPhone) using the Ranorex API through Visual Studio, or can this only be done using Ranorex Studio?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Device automation and Ranorex API

Post by Support Team » Fri Nov 09, 2012 12:47 pm

Hello,

Yes. You could use the Ranorex API to access mobile applications as shown in the code example below:
Ranorex.Core.PluginManager.Instance.LoadDefaultPlugins();
Host.Local.RunMobileApp("<deviceDisplayName>", "<appName>");
Ranorex.Button btn = @"<RanoreXPath to the button>";
btn.Touch(Location.Center);
Host.Local.CloseApplication(btn);
Regards,
Markus (T)
.
Image

Stian
Posts: 25
Joined: Mon Jan 30, 2012 9:38 am

Re: Device automation and Ranorex API

Post by Stian » Fri Nov 09, 2012 2:18 pm

Great! Thanks you for fast reply :)