Appium client expands native Webdriver client approach
The following is a Java code example, simply over the Appium client to provide a new approach for mobile use
- Resetapp ()
- Getappstring ()
- Sendkeyevent ()
- CurrentActivity ()
- Pullfile ()
- Pushfile ()
- Pullfolder ()
- Hidekeyboard ()
- Runappinbackground ()
- Performtouchaction ()
- Performmultitouchaction ()
- Tap ()
- Swipe ()
- Pinch ()
- Zoom ()
- Getnamedtextfield ()
- Isappinstalled ()
- Installapp ()
- Removeapp ()
- Launchapp ()
- Closeapp ()
- Endtestcoverage ()
- Lockscreen ()
- Shake ()
- Complexfind ()
- ScrollTo ()
- Scrolltoexact ()
- Opennotifications ()
- Context switching:. Context (),. Getcontexthandles (), GetContext ())
The new locator
- Findelementbyaccessibilityid ()
- Findelementsbyaccessibilityid ()
- Findelementbyiosuiautomation ()
- Findelementsbyiosuiautomation ()
- Findelementbyandroiduiautomator ()
- Findelementsbyandroiduiautomator ()
These methods cover 3 major categories:
- Driver extensions: such as adding resetapp and other ways to manipulate apps
- Action extension: Add some mobile-specific action (how to describe it, equivalent to mobile-specific operations), such as Swipe,shake (well, with this method can let the code help you Shake it), etc.;
- Locator extension: Added some mobile-specific positioning strategies
In the next section, we'll start by introducing the Android emulator using Appium.