Automatic endpoint refresh or setup

Mobile Testing, Android App Testing.
tomwolf
Posts: 18
Joined: Tue Feb 26, 2019 9:04 am

Automatic endpoint refresh or setup

Post by tomwolf » Tue Apr 30, 2019 8:25 am

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
Regards,

Tom Wolf

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

Re: Automatic endpoint refresh or setup

Post by Support Team » Thu May 02, 2019 4:53 pm

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

tomwolf
Posts: 18
Joined: Tue Feb 26, 2019 9:04 am

Re: Automatic endpoint refresh or setup

Post by tomwolf » Tue May 07, 2019 2:19 pm

Hi Ned,

Thanks a lot, this works!

Regards,
Tom
Regards,

Tom Wolf