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:
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))