Ranorex Method for Connected Devices

Mobile Testing, Android App Testing.
Posts: 1
Joined: Fri Nov 27, 2020 9:16 pm

Ranorex Method for Connected Devices

Post by Sylus » Thu Dec 03, 2020 2:24 pm


I have several Jenkins slaves, each with a different Number of devices connected to them via "Ranorex Devices"(both iOS and android).

I would like to write code that can run on any device (example openApp) and it should work by first identifying the connected devices dynamically, and then work on each device on the list.

Is there a method in the Ranorex API to return the list of connected devices? (I could not find one)


Posts: 33
Joined: Thu Jan 25, 2018 9:00 am
Location: Antwerp

Re: Ranorex Method for Connected Devices

Post by dkmpbrt » Thu Dec 03, 2020 3:36 pm

Hey Sylus,

I don't know if this is the solution, but I think you could use the following code:

Code: Select all

foreach(var endpoint in Ranorex.Core.Remoting.RemoteServiceLocator.Service.AllKnownEndpoints)
        Host.Local.RunMobileApp(endpoint.RemoteInfo.DisplayName, "YOURAPPNAME");

User avatar
Posts: 6
Joined: Mon Feb 04, 2019 9:57 am

Re: Ranorex Method for Connected Devices

Post by JosephY » Wed Mar 31, 2021 10:47 am

Sylus wrote:
I want to dynamically check the number of connected devices to later work with each custom writing app on my list. Need help here.

You may also try this, if you need to get a list of all enabled devices: insert this line in the usercode method

Code: Select all

  var DeviceList = RemoteServiceLocator.Service.AllKnownEndpoints;