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.
Appium You.i Engine Driver supports iOS versions 8+
Appium You.i Engine Driver supports Android versions 4.1+ (API level 16+)
npm install appium-youiengine-driver
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 |
maxRetryCount |
How many times to retry socket connections before aborting |
Default: 3 |
Below is a sample of the minimum required caps per platform.
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> |
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
Support added in 5.0+
Capability | Real device |
---|---|
app | <path to the app> |
automationName | YouiEngine |
deviceName | <cannot be left blank> |
platformName | Mac |
youiEngineAppAddress | localhost |
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.
Support added in 5.0+
Capability | Real device |
---|---|
app | <path to the app> |
automationName | YouiEngine |
deviceName | <cannot be blank> |
platformName | YiLinux |
youiEngineAppAddress | localhost |
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> |
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> |
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
)
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:
adb devices
Command | Engine Version Support |
---|---|
Clear Element | 4.2.5+ |
Click | 4.2.1+ |
Execute Mobile Command1 | 5.5.0+ |
Find Element2 | 4.2.1+ |
Find Elements2 | 4.2.1+ |
Get Element Attribute3 | 4.2.1+ |
Get All Contexts | 4.2.1+ |
Get Current Context | 4.2.1+ |
Get Element Location | 4.2.5+ |
Get Element Size | 4.2.5+ |
Get Element Text | 4.2.7+ |
Get Page Source | 4.2.1+ |
Get Window Size | 4.4.5+ |
Go Back | 5.0+ |
Hide Keyboard | 5.2.0+ |
Is Element Displayed | 4.2.5+ |
Is Element Enabled | 4.2.7+ |
Is Element Selected4 | 4.2.5+ (5.12+ for React Native projects) |
Is Keyboard Shown | 5.2.0+ |
Long Tap | 4.2.7+ |
Move | 4.2.7+ |
Remove App | 4.2.1+ |
Retrieve Device Settings | 4.2.5+ |
Send Keys5 | 4.2.1+ |
Settings6 | 4.2.5+ |
Set Implicit Wait Timeout | 4.2.1+ |
Set Timeouts | 4.2.1+ |
Take Screenshot | 4.2.1+ |
Touch Down | 4.2.7+ |
Touch Up | 4.2.7+ |
Update Device Settings | 4.4.5+ |
Element Screenshot | 5.18.0+ |
Get Context | any |
Get All Contexts | any |
Set Current Context | any |
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, Android) |
---|
Background App |
Close an App |
GetLogs |
Get available log types |
Get Orientation |
Get App Strings |
Is App Installed |
Launch App |
Lock |
Set Orientation |
Proxied Command (iOS only) |
---|
Shake |
Proxied Command (Android only) |
---|
Is Device Locked |
Long Press Key Code |
Press Key Code |
Toggle Location Services |
Unlock |
Command | Description | Argument | Argument Example |
---|---|---|---|
mobile:pressButton | Press a physical button. The available button options can be found here | {name} | {name: "Gamepad0"} |
mobile:shell | Execute ADB shell commands (requires insecure feature adb_shell to be enabled) |
Read this page | {'command': 'echo', 'args': ['arg1', 'arg2']} |
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+ |
The following commands are used with getSettings
and updateSettings
Examples (Ruby):
get_settings
update_settings TimeDilation: 10
update_settings SourceTreeFilter: "[@isDisplayed='true']"
Settings | Engine Version Support | Value |
---|---|---|
TimeDilation |
4.4.5+ | float (>0) |
SourceTreeFilter |
4.5.1+ | string (format: [@attributeType='attributeValue']) |
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.
To support hybrid application automation, we added a context called YOUI_APP
that represents the current driver
and another context called NATIVE_APP
which represents the driver used under the hood
Attention ❗: In case a deeper context than
NATIVE_APP
is used and then you want to continue withYOUI_APP
, make sure you switch back toNATIVE_APP
first and only then toYOUI_APP
Platform Name | Appium Driver |
---|---|
ios , tvos |
appium-xcuitest-driver |
android |
appium-uiautomator2-driver |
mac |
appium-mac-driver |