Appium You.i Engine Driver
Appium You.i Engine Driver is a test automation tool for devices of various platforms running applications built with You.i Engine. Appium You.i Driver automates You.i Engine applications, tested on simulators and real devices. Appium You.i Driver is part of the Appium mobile test automation tool.
iOS Support
Appium You.i Engine Driver supports iOS versions 8+
Android Support
Appium You.i Engine Driver supports Android versions 4.1+ (API level 16+)
Installation
npm install appium-youiengine-driver
Desired Capabilities
Desired capabilities (caps) are a set of keys and values (i.e., a map or hash) sent to the Appium server to tell the server what kind of automation session we’re interested in starting up. These caps are defined in the appium.txt file. There are various capabilities which can modify the behavior of the server during automation.
Capability | Description | Values |
---|
youiEngineAppAddress | The IP address of the device on which the app is running. localhost for simulator. Device’s IP address for a real device | localhost , <device’s IP address> |
youiEngineAppPort | The socket port used by the app. | Default: 12345, Default for PS4: 40123 |
fullSourceTree | Sets the source tree to use all elements (not only displayed ones) | Default: false |
Minimum required capabilities per platform
Below is a sample of the minimum required caps per platform.
iOS
Capability | Simulator | Real device |
---|
app | <path to the app> | <path to the app> |
automationName | YouiEngine | YouiEngine |
deviceName | <iOS Simulator device name> | <device’s name> |
platformName | iOS | iOS |
platformVersion | <iOS version> | <iOS version> |
udid | <device’s udid> | <device’s udid> |
xcodeOrgId | <Team ID> | <Team ID> |
youiEngineAppAddress | localhost | <device’s IP address> |
Android
Capability | Real device | Emulator |
---|
app | <path to the app> | <path to the app> |
automationName | YouiEngine | YouiEngine |
deviceName | <cannot be left blank> | <cannot be left blank> |
udid | <device’s ID> | <device’s ID> |
platformName | Android | Android |
youiEngineAppAddress1 | <device’s IP address> | localhost |
avd | N/A | <Android Virtual Device Name> |
1 For emulator, Port forwarding is required to forward the port from the host machine to the emulated device. Use the following command: adb forward tcp:12345 tcp:12345
macOS
Support added in 5.0+
Capability | Real device |
---|
app | <path to the app> |
automationName | YouiEngine |
deviceName | <cannot be left blank> |
platformName | Mac |
youiEngineAppAddress | localhost |
You.i macOS (does not use appium-mac-driver)
Support added in 5.0+
Capability | Real device |
---|
app | <path to the app> |
automationName | YouiEngine |
deviceName | <cannot be blank> |
platformName | YIMac |
showXcodeLog1 | true |
youiEngineAppAddress | localhost |
1 Optional.
You.i tvOS
Support added in 5.0+
* If another app is installed with You.i's socket, it may connect to it. All You.i apps should be deleted before running Appium.
Capability | Real device |
---|
app | <path to the app> |
automationName | YouiEngine |
deviceName | <cannot be blank> |
platformName | YItvOS |
udid | <device’s udid> |
youiEngineAppAddress | <device’s IP address> |
tvOS
Support added in 5.0+
* If another app is installed with You.i's socket, it may connect to it. All You.i apps should be deleted before running Appium.
Capability | Simulator | Real device |
---|
app | <path to the app> | <path to the app> |
automationName | YouiEngine | YouiEngine |
deviceName | <tvOS Simulator device name> | <device’s name> |
platformName | tvos | tvos |
udid | <device’s udid> | <device’s udid> |
xcodeOrgId | <Team ID> | <Team ID> |
youiEngineAppAddress | localhost | <device’s IP address> |
BlueSky
Support added in 5.0+
Capability | Real device |
---|
app | <path to the app> |
automationName | YouiEngine |
channelId1 | <App's channel ID> |
deviceName | <cannot be blank> |
password | <dev account password> |
platformName | BlueSky |
username | <dev account username> |
youiEngineAppAddress | <device’s IP address> |
1 Optional (default is dev
)
Connect to App
To connect to an already launched app.
Useful for debugging app or testing a platform which currently doesn't have install/launch/close/remove methods.
Capability | Real device |
---|
app1 | <cannot be blank> |
automationName | YouiEngine |
deviceName | <cannot be blank> |
platformName | ConnectToApp |
youiEngineAppAddress | <device’s IP address> |
1 Some libraries will look to validate the app path so you may need to add a valid app path even though it will not be installed.
Notes:
- For iOS 8+, set the following on your device: Settings -> Developer -> Set UI Automation -> true
- xcodeOrgId
- Android device name: found using
adb devices
Supported Commands
1 See Mobile commands below
2 See Selector strategies below
3 See Attributes below
4 Only works for toggle buttons (C++) and elements that have the Selected AccessibilityState property enabled (React Native)
5 Starting with 5.0, you can send a general keypress (not targeted at an element), by using sendkeys on the root element
6 See Settings below
Proxied Command (iOS only) |
---|
Shake |
Mobile Commands
Command | Description | Argument | Argument Example |
---|
mobile:pressButton | Press a physical button. The available button options can be found here | {name} | {name: "Gamepad0"} |
Mobile Commands Example
Attributes
The following attributes can be queried using attribute
An attributes filter can be added to the supported search strategies (name, class, id, accessibility id) by appending the following format to the strategy value: [@attributeType='attributeValue']
Examples (Ruby):
find_element(name: "Title[@text='Big Buck Bunny']")
find_element(class: "PushButtonView[@isHittable='true']")
Attribute | Return Type | Engine Version Support |
---|
className | string | 4.5.1+ |
compositeOpacity | float | 4.2.14+ |
hasOpacity | bool | 4.5.1+ |
hasFocus | bool | 4.5.1+ |
id | string | 4.5.1+ |
isEnabled | bool | 5.0+ |
isDisplayed | bool | 4.5.1+ |
isFullyDisplayed | bool | 4.5.2+ |
isHittable | bool | 4.5.1+ |
isHorizontalScrolling | bool | 4.5.2+ |
isScrolling | bool | 4.5.2+ |
isSelected | bool | 5.0+ |
localOpacity | float | 4.2.14+ |
name | string | 4.2.1+ |
text | string | 4.5.1+ |
visibilityFlag | bool | 4.5.1+ |
Settings
The following commands are used with getSettings
and updateSettings
Examples (Ruby):
get_settings
update_settings TimeDilation: 10
update_settings SourceTreeFilter: "[@isDisplayed='true']"
Retrieve Settings Example
Update Settings Example
Settings | Engine Version Support | Value |
---|
TimeDilation | 4.4.5+ | float (>0) |
SourceTreeFilter | 4.5.1+ | string (format: [@attributeType='attributeValue']) |
Selector strategies
Supported selector strategies |
---|
name |
id 1 |
class name |
accessibility id |
1 Starting with 5.0, id selector can be used to search for React Native testID. |