Page 1 of 1

Automatic endpoint refresh or setup

Posted: Tue Apr 30, 2019 8:25 am
by tomwolf
Hello everyone,

I've been testing on Android Studio emulators and my company would like to automate starting up an emulator by starting my Ranorex test. I've been able to create a bat file that startups my Android emulator, but now I ran into a problem with Ranorex. The problem is that Ranorex supports connecting endpoints manually and I've seen some sample codes about automatic connecting WebDriver endpoints, but I need to be able to refresh or reconnect Android and Apple endpoints automatically. Since its not able to record Ranorex I really don't know how to do this, because I'm not into writing User Code.

So might there be any User Code or option to automatically refresh or reconnect Android and/or Apple endpoints?

Detailed description of my system:
Windows 10 Enterprise
Ranorex 8.3.3
Service App 2.0.3 on Android and RxServiceApp Distributable 3.0.3 on iOS

If there is anymore information needed, I would like to hear!

Regards,
Tom

Re: Automatic endpoint refresh or setup

Posted: Thu May 02, 2019 4:53 pm
by Support Team
Hi TomWolf,

Great question! I do admit I had to do some digging to find this for you. After the emulator is fully up and running, run the code below to connect to the device. Note, the service application must be running on the device in order to connect.

Code: Select all

Ranorex.Core.Remoting.RemoteServiceLocator.Service.GetByDisplayName("DEVICENAME").Reconnect();
I hope this helps!

Cheers,
Ned

Re: Automatic endpoint refresh or setup

Posted: Tue May 07, 2019 2:19 pm
by tomwolf
Hi Ned,

Thanks a lot, this works!

Regards,
Tom