Skip to content

YOU-i-Labs/appium-youiengine-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

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 Not applicable <device’s udid>
xcodeOrgId <Team ID> <Team ID>
youiEngineAppAddress localhost <device’s IP address>

Android

Capability Real device
app <path to the app>
automationName YouiEngine
deviceName <device’s ID>
platformName iOS
youiEngineAppAddress <device’s IP address>

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
udid1 <device’s udid>
youiEngineAppAddress <device’s IP address>

1 Optional. Required if multiple devices are connected to server.

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

Command Engine Version Support
Clear Element 4.2.5+
Click 4.2.1+
Find Element1 4.2.1+
Find Elements1 4.2.1+
Get Element Attribute2 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+
Is Element Displayed 4.2.5+
Is Element Enabled 4.2.7+
Is Element Selected 4.2.5+
Long Tap 4.2.7+
Move 4.2.7+
Remove App 4.2.1+
Retrieve Device Settings 4.2.5+
Send Keys3 4.2.1+
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+
Settings4 4.2.5+

1 See Selector strategies below

2 See Attributes below

3 Starting with 5.0, you can send a general keypress (not targeted at an element), by using sendkeys on the root element

4 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

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']"

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
id1
class name
accessibility id
1 Starting with 5.0, id selector can be used to search for React Native testID.