Ranorex Help Center How can we help you?

Non-UI Testing on iOS

In addition to automating testing of the user interface of mobile applications, it's also possible to perform non-UI tests invoking technology-dependent actions (see Lesson 5: Ranorex Recorder - Additional Editing Options - Types of Action Items).

This feature allows you to get information about the devices hardware, the operating system etc.

To enable this feature you have to additionally link the library libRxDeviceInfos.a as well as the following libraries:

  • AVFoundation.framework 
  • CoreTelephony.framework 
  • SystemConfiguration.framework 
  • ExternalAccessory.framework
Now you are able to get the info on your iOS device directly by right-clicking the mobile device in Ranorex Spy.
Get device info on an iOS test device

Get device info on an iOS test device

You can access the device information during your test automation within User Code Actions as well as Code Modules.

The code should look something like the following:

var app = repo.iOSApp.Self.As<IosApp>();  
// get an iOSDeviceInfo object holding all available device info  
var info = app.GetDeviceInfo();  
// Report e.g. the IP address of the device  
Report.Info("IP address: " + info.IpAddress); 



Dim app = repo.iOSApp.Self.[As](Of IosApp)()  
' get an iOSDeviceInfo object holding all available device info  
Dim info = app.GetDeviceInfo()  
' Report e.g. the IP address of the device  
Report.Info("IP address: " & Convert.ToString(info.IpAddress)) 





For further information about code modules and user code actions please have a look at the sections "Lesson 7: Code Modules" and "Lesson 5: Ranorex Recorder - User Code Actions".