Appiumdriver
getappstrings ()
The default system language corresponds to the data in the Strings.xml file.
driver.getappstrings (String language)
Find Strings.xml data in a string file corresponding to a locale
sendkeyevent (int key)
Press a key, which key is determined by the key value, the key value is defined in the Androidkeycode class
sendkeyevent (int key, Integer metastate)
Press the Attach key (Ctrl/alt/shift, etc.) while pressing a key, and which keys are determined by the key value (defined in the Androidkeycode Class) and metastate (defined in the Androidkeymetastate Class).
currentactivity ()
Gets the current activity, such as (. Apidemos)
isappinstalled (String bundleid)
According to Bundleid to determine whether the application has been installed
Installapp (String apppath)
Install App,apppath as the local path to the application
Removeapp (String bundleid)
Uninstall App.bundleid represents the registration in Android, and there are special Bundleid numbers in iOS.
Closeapp ()
Close the application, in fact, is to press the home key to the application in the background
Launchapp ()
Start Application
Resetapp ()
First Closeapp and then in Launchapp.
Pushfile (String remotepath, byte[] base64data)
Writes a character array to a file in a remote directory in 64-bit format. It can also be understood to push the local file onto the device.
pullfile (String remotepath)
Pull files on the device to the local hard drive
Pullfolder (String remotepath)
Pull the folder on the device to the local hard drive, the general remote file is the file under/data/local/tmp.
setnetworkconnection (networkconnectionsetting connection)
Set up a mobile phone network connection status, you can switch Bluetooth, WiFi, data traffic. Set the status of each network connection through the properties in networkconnectionsetting.
getnetworkconnection ()
Get the status of the current network
opennotifications ()
Open the Notification bar
runappinbackground (int seconds)
Similar to Resetapp, the difference is that Resetapp is started immediately after shutdown, and this method is closed and waits for seconds seconds before it starts.
Hidekeyboard ()
iOS hidden keyboard
Hidekeyboard (String strategy, string KeyName)
Hide the keyboard for iOS only.
performtouchaction (touchaction touchaction)
Performs a touch action that is encapsulated by the touchaction.
performmultitouchaction (multitouchaction multiaction)
Perform multi-step touch actions, which are multitouchaction encapsulated by multiple steps.
tap (int fingers, webelement element, int duration)
Click the center point of the element control, duration*5 the millisecond seconds, and then repeat the fingers time.
tap (int fingers, int x, int y, int duration)
Tap (x,y) Click, duration*5 millisecond after the release, so repeat fingers times.
swipe (int startx, int starty, int endx, int endy, int duration)
Slide from (startx,starty) to (Endx,endy), duration, each step is 5 milliseconds.
pinch (webelement el)
2 fingers operate the control, sliding diagonally toward the center point.
Pinch (int x, int y)
Based on (x,y), Calculate (x,y-100), (x,y+100) two points, then 2 fingers hold down the two points and slide to (x,y)
Zoom (webelement el)
It's just the opposite of the Pinch (EL) action. Two fingers slide slowly from the center point of the control to the right bottom of the control's left vertex.
Zoom (int x, int y)
Contrary to the pinch (x,y). Two fingers slide from (x,y) point to (x,y-100) and (x,y+100).
Getnamedtextfield (String name)
Typically used in iOS. Gets the control object based on the accessibility ID.
Endtestcoverage (String intent, String path)
End detection of test coverage. (not used, not very familiar) path is the route to the. ec file.
lockscreen (int seconds)
Lock the screen after how many seconds to unlock (the use of the hint has not implemented the method)
Shake ()
Simulate shaking mobile phone (not yet implemented)
Scrollto (String text)
Scroll to a control with a text property that is the specified string
scrolltoexact (String text)
Scroll to a control that contains the passed-in string for a Text property
Context (String name)
Setting context
getcontexthandles ()
Available contexts
GetContext ()
Current context
Rotate (screenorientation orientation)
Set screen horizontal screen or vertical screen
getorientation ()
Gets the orientation of the current screen
findelementbyiosuiautomation (String using)
Use the properties in the UIAutomation in iOS to get control
findelementsbyiosuiautomation (String using)
It's the same as above, but it's got multiple controls.
Findelementbyandroiduiautomator (String using)
Take advantage of the properties in Android's Uiautoamtor to get a single control.
Findelementsbyandroiduiautomator (String using)
Same as above, but this method is obtained by multiple controls
Findelementbyaccessibilityid (String using)
Using the accessibility ID to get a single control
Findelementsbyaccessibilityid (String using)
Using the accessibility ID to get multiple controls