mirror of
https://github.com/appium/appium.git
synced 2026-10-29 12:41:58 +08:00
Update mobile-command.yml for driving out of app areas using uiautomator (#12038)
* Update mobile-command.yml * fix review * add link to android documentation
This commit is contained in:
committed by
Isaac A. Murchie
parent
fd4afcacc2
commit
aa51ce3134
@@ -85,6 +85,7 @@
|
||||
| mobile:scrollToPage | Action to [ViewPager](https://developer.android.com/reference/android/support/v4/view/ViewPager) by [ViewPagerActions](https://developer.android.com/reference/android/support/test/espresso/contrib/ViewPagerActions). `scrollTo` must be one of `first`, `last`, `left`, `right`. `scrollTo` is used by default if `scrollTo` and `scrollToPage` are provided. | `{scrollTo, scrollToPage, smoothScroll}` | `{element: elementId, scrollTo: 'left', smoothScroll: true}`, `{element: elementId, scrollToPage: 2}`|
|
||||
| mobile:backdoor | Invoke arbitrary methods defined in Android app. The methods must be `public`. `target` is `activity`, `application` or `element`. `methods` are methods you would like to invoke. `elementId` is mandatory if `target` is `element`. Read docstring of _mobileBackdoor_ method [here](https://github.com/appium/appium-espresso-driver/blob/master/lib/commands/general.js) for more details | `{target, methods, elementId}` | `{target: 'activity', methods: [{name: 'method1'}, {name: 'method2', args: [{value: 'hello appium', type: 'java.lang.String'}] }] }`, `{target: 'element', elementId: elementId, [{name: 'getTypeface'}, {name: 'isItalic'}]}` |
|
||||
| mobile:flashElement | Flashes an element on the screen to visually confirm you are operating on the correct element. Can optionally set `durationMillis` (in ms) and `repeatCount` of animation| `{elementId, durationMillis, repeatCount}` | `{elementId: "1234-abcd-5678", durationMillis: 1000, repeatCount: 10}` |
|
||||
| mobile:uiautomator | Drive areas which are not part of App Under Test, using uiautomator2 APIs. `strategy` can be one of: "clazz", "res", "text", "textContains", "textEndsWith", "textStartsWith","desc", "descContains", "descEndsWith", "descStartsWith" and "pkg", taken from uiautomator [By class](https://developer.android.com/reference/androidx/test/uiautomator/By). `action` can be one of: "click", "longClick", "getText", "getContentDescription", "getClassName","getResourceName", "getVisibleBounds", "getVisibleCenter", "getApplicationPackage","getChildCount", "clear", "isCheckable", "isChecked", "isClickable", "isEnabled","isFocusable", "isFocused", "isLongClickable", "isScrollable" and "isSelected", taken from uiautomator [UiObject2](https://developer.android.com/reference/androidx/test/uiautomator/UiObject2). `index` is optional, if not given, will return all matching results | `{strategy, locator, index, action}` | `{strategy: 'clazz', locator: 'android.widget.TextView', index: 2, action: "getText"}` |
|
||||
|
||||
example_usage:
|
||||
java:
|
||||
|
||||
Reference in New Issue
Block a user