iOS Over Xcode Extension Plugin
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.
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:
- Unzip the archive and copy the
iosx.jarfile 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.
- Start or restart Robot.
To uninstall the plugin simply delete the file.
The plugin contains:
|Store bundle ID of the active application to the _IOS_ACTIVE_APP variable.|
|Start an application on the iOS device.|
|Kill (deactivate) an application.|
|Set the screen orientation to portrait or landscape left.|
|Remap the keyboard displayed on the device screen (since v0.3).|
|Load a keyboard map from a file (since v0.3). See the Keyboard Mapping topic for details on how to create keymap files.|
|Test 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).|
|Dismiss 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.
// Presume that iosx.jar is in the script folder
// Start Safari
Run "com.tplan.iosx.Start" bundleid="com.apple.mobilesafari"
// Perform testing here
// Rotate the screen to landscape