iosx

iOS Over Xcode Extension Plugin

Contents:

1. Overview
2. Plugin installation
3. Usage

NOTE: Functionality of this extension is supported out of the box as the Mobile command since Robot 7.1. The plugin will not be maintained in the future.

1. Overview

The iOS Over Xcode Extension Plugin adds new features to T-Plan Robot Enterprise test scripts relying on the iOS Over Xcode connection for iOS 10+. Namely:

  • Application management - starting and deactivation of applications on the iOS device
  • Device controls - orientation switching, special gestures
  • Device keyboard mapping (since v0.3)

The plugin is primarily designed for test scripts written in the TPR language. To call the plugin scripts from Java either use the DefaultJavaTestScript.run() method or use the script instance approach described in the Java Script Basics document.

Should you have any questions or suggestions contact the T-Plan support. For the list of other plugins provided by T-Plan go here.

NOTE: As a result of a major update required by the iOS 12/13 updates, this plugin is not compatible with the previous version 0.1. For documentation on the old plugin go here.

2. Plugin installation

The plugin requires T-Plan Robot 5.0.6 or higher. To install the plugin download it from:

To install the plugin:

  1. Unzip the archive and copy the iosx.jar file to the plugins/ directory under the Robot installation directory. This will make Robot load the classes on the start up. Make sure to remove any older versions of the plugin.
  2. Start or restart Robot.

To uninstall the plugin simply delete the file.

3. Usage

The plugin contains:

Script Name
Description
com.tplan.iosx.ActiveAppStore bundle ID of the active application to the _IOS_ACTIVE_APP variable.
com.tplan.iosx.Start
Start an application on the iOS device.
com.tplan.iosx.KillKill (deactivate) an application.
com.tplan.iosx.OrientationSet the screen orientation to portrait or landscape left.
com.tplan.iosx.RemapKeyboardRemap the keyboard displayed on the device screen (since v0.3).
com.tplan.iosx.LoadKeyboardLoad a keyboard map from a file (since v0.3). See the Keyboard Mapping topic for details on how to create keymap files.
com.tplan.iosx.GetAlertTest out if there's a system alert window on the screen and return its text and buttons as _IOS_ALERT_TEXT, _IOS_ALERT_BUTTON_COUNT and _IOS_ALERT_BUTTON<n> variables (since 0.4).
com.tplan.iosx.DismissAlertDismiss or accept an alert or close it with the specified button. If there's no alert the script does nothing (since 0.4).

The plugin scripts are to be called from TPR test scripts using the Run command. The command instances may be easily created using the Command Wizard tool. To edit an existing Run command right click it and select Properties in the context menu.

EXAMPLE: 

// Presume that iosx.jar is in the script folder 
Include "iosx.jar" 

// Start Safari 
Run "com.tplan.iosx.Start" bundleid="com.apple.mobilesafari" 

// Perform testing here 
// ... 

// Rotate the screen to landscape 
Run "com.tplan.iosx.Orientation" 
orientation="landscape"