appium-uiautomator2-driver 3.10.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +69 -0
- package/README.md +19 -1
- package/build/lib/commands/actions.d.ts +13 -7
- package/build/lib/commands/actions.d.ts.map +1 -1
- package/build/lib/commands/actions.js +24 -10
- package/build/lib/commands/actions.js.map +1 -1
- package/build/lib/commands/alert.d.ts +8 -4
- package/build/lib/commands/alert.d.ts.map +1 -1
- package/build/lib/commands/alert.js +10 -6
- package/build/lib/commands/alert.js.map +1 -1
- package/build/lib/commands/app-management.d.ts +10 -6
- package/build/lib/commands/app-management.d.ts.map +1 -1
- package/build/lib/commands/app-management.js +13 -10
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/clipboard.d.ts +0 -12
- package/build/lib/commands/clipboard.d.ts.map +1 -1
- package/build/lib/commands/clipboard.js +0 -18
- package/build/lib/commands/clipboard.js.map +1 -1
- package/build/lib/commands/element.d.ts +3 -2
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +3 -4
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/gestures.d.ts +130 -22
- package/build/lib/commands/gestures.d.ts.map +1 -1
- package/build/lib/commands/gestures.js +130 -33
- package/build/lib/commands/gestures.js.map +1 -1
- package/build/lib/commands/keyboard.d.ts +11 -4
- package/build/lib/commands/keyboard.d.ts.map +1 -1
- package/build/lib/commands/keyboard.js +13 -7
- package/build/lib/commands/keyboard.js.map +1 -1
- package/build/lib/commands/navigation.d.ts +5 -2
- package/build/lib/commands/navigation.d.ts.map +1 -1
- package/build/lib/commands/navigation.js +5 -3
- package/build/lib/commands/navigation.js.map +1 -1
- package/build/lib/commands/screenshot.d.ts +4 -2
- package/build/lib/commands/screenshot.d.ts.map +1 -1
- package/build/lib/commands/screenshot.js +4 -3
- package/build/lib/commands/screenshot.js.map +1 -1
- package/build/lib/commands/types.d.ts +0 -387
- package/build/lib/commands/types.d.ts.map +1 -1
- package/build/lib/driver.d.ts +540 -8
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +2 -7
- package/build/lib/driver.js.map +1 -1
- package/build/lib/execute-method-map.d.ts +540 -0
- package/build/lib/execute-method-map.d.ts.map +1 -0
- package/build/lib/execute-method-map.js +257 -0
- package/build/lib/execute-method-map.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/commands/actions.js +32 -10
- package/lib/commands/alert.js +10 -6
- package/lib/commands/app-management.js +14 -11
- package/lib/commands/clipboard.js +0 -18
- package/lib/commands/element.js +3 -4
- package/lib/commands/gestures.js +184 -38
- package/lib/commands/keyboard.js +13 -8
- package/lib/commands/navigation.js +5 -3
- package/lib/commands/screenshot.js +4 -3
- package/lib/commands/types.ts +0 -406
- package/lib/driver.ts +2 -16
- package/lib/execute-method-map.ts +269 -0
- package/npm-shrinkwrap.json +41 -48
- package/package.json +3 -3
- package/build/lib/commands/app-strings.d.ts +0 -12
- package/build/lib/commands/app-strings.d.ts.map +0 -1
- package/build/lib/commands/app-strings.js +0 -19
- package/build/lib/commands/app-strings.js.map +0 -1
- package/build/lib/commands/execute.d.ts +0 -15
- package/build/lib/commands/execute.d.ts.map +0 -1
- package/build/lib/commands/execute.js +0 -83
- package/build/lib/commands/execute.js.map +0 -1
- package/lib/commands/app-strings.js +0 -16
- package/lib/commands/execute.js +0 -93
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,72 @@
|
|
|
1
|
+
## [4.0.1](https://github.com/appium/appium-uiautomator2-driver/compare/v4.0.0...v4.0.1) (2025-02-10)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* docs for the new fields from AccessibilityNodeInfo ([#862](https://github.com/appium/appium-uiautomator2-driver/issues/862)) ([815c247](https://github.com/appium/appium-uiautomator2-driver/commit/815c247000e03cceac683e7a4122156e3ea5e2ea))
|
|
6
|
+
|
|
7
|
+
## [4.0.0](https://github.com/appium/appium-uiautomator2-driver/compare/v3.10.0...v4.0.0) (2025-02-01)
|
|
8
|
+
|
|
9
|
+
### ⚠ BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* The following methods and properties were **removed**:
|
|
12
|
+
- mobileSetClipboard -> replaced by setClipboard
|
|
13
|
+
- mobileGetClipboard -> replaced by getClipboard
|
|
14
|
+
- executeMobile -> replaced by execute (the` script` argument must also be changed to start with `mobile: `)
|
|
15
|
+
- mobileCommandsMapping -> replaced by executeMethodsMap
|
|
16
|
+
- mobileGetAppStrings -> replaced by getStrings
|
|
17
|
+
* The following methods were **changed**:
|
|
18
|
+
- mobileDragGesture
|
|
19
|
+
- mobileFlingGesture
|
|
20
|
+
- mobileDoubleClickGesture
|
|
21
|
+
- mobileClickGesture
|
|
22
|
+
- mobilePinchOpenGesture
|
|
23
|
+
- mobilePinchCloseGesture
|
|
24
|
+
- mobileSwipeGesture
|
|
25
|
+
- mobileScrollGesture
|
|
26
|
+
- mobileScrollBackTo
|
|
27
|
+
- mobileScroll
|
|
28
|
+
- mobileDeepLink
|
|
29
|
+
- mobileAcceptAlert
|
|
30
|
+
- mobileDismissAlert
|
|
31
|
+
- mobileType
|
|
32
|
+
- mobileReplaceElementValue
|
|
33
|
+
- mobileInstallMultipleApks
|
|
34
|
+
- mobileBackgroundApp
|
|
35
|
+
- mobilePressKey
|
|
36
|
+
- mobileScreenshots
|
|
37
|
+
- mobileScheduleAction
|
|
38
|
+
- mobileUnscheduleAction
|
|
39
|
+
- mobileGetActionHistory
|
|
40
|
+
* The following obsolete type definitions were **removed**:
|
|
41
|
+
- DragOptions
|
|
42
|
+
- FlingOptions
|
|
43
|
+
- ClickOptions
|
|
44
|
+
- LongClickOptions
|
|
45
|
+
- PinchOptions
|
|
46
|
+
- SwipeOptions
|
|
47
|
+
- ScrollGestureOptions
|
|
48
|
+
- ScrollElementToElementOpts
|
|
49
|
+
- ScrollOptions
|
|
50
|
+
- DeepLinkOpts
|
|
51
|
+
- AcceptAlertOptions
|
|
52
|
+
- DismissAlertOptions
|
|
53
|
+
- TypingOptions
|
|
54
|
+
- ReplaceValueOptions
|
|
55
|
+
- InstallMultipleApksOptions
|
|
56
|
+
- BackgroundAppOptions
|
|
57
|
+
- PressKeyOptions
|
|
58
|
+
- ScreenshotsOpts
|
|
59
|
+
- ActionArgs
|
|
60
|
+
- SetClipboardOpts
|
|
61
|
+
- GetAppStringsOptions
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
Based on https://github.com/appium/appium-android-driver/pull/982
|
|
65
|
+
|
|
66
|
+
### Features
|
|
67
|
+
|
|
68
|
+
* Add support of executeMethodMap ([#863](https://github.com/appium/appium-uiautomator2-driver/issues/863)) ([4c45c3a](https://github.com/appium/appium-uiautomator2-driver/commit/4c45c3a85a574cb4d207ab827ce98421812d99f2))
|
|
69
|
+
|
|
1
70
|
## [3.10.0](https://github.com/appium/appium-uiautomator2-driver/compare/v3.9.9...v3.10.0) (2025-01-24)
|
|
2
71
|
|
|
3
72
|
### Features
|
package/README.md
CHANGED
|
@@ -221,7 +221,24 @@ hint | Element's hint text. On Android versions below Oreo it always equals to `
|
|
|
221
221
|
bounds | The element's visible frame (`[left, top][right, bottom]`) | `[0,0][100,100]`
|
|
222
222
|
displayed | Whether the element is visible to the user | 'true'
|
|
223
223
|
contentSize | The dimensions of the element's content area | `{"left": 0, "top":0, "width": 100, "height": 100, "scrollableOffset": 10, "touchPadding": 0}`
|
|
224
|
-
extras | The result of [getExtras](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#getExtras()). The value includes all key-value pairs as `key=value` separated by a semicolon (`;`). If the value is empty, then only key part ending with the equal sign will be present. | Part of extras in chrome browser:<br> `AccessibilityNodeInfo.roleDescription=;`<br>`AccessibilityNodeInfo.chromeRole=rootWebArea;`<br> `ACTION_ARGUMENT_HTML_ELEMENT_STRING_VALUES=`<br> `ARTICLE,BLOCKQUOTE,BUTTON,CHECKBOX`
|
|
224
|
+
extras | The result of [getExtras](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#getExtras()). The value includes all key-value pairs as `key=value` separated by a semicolon (`;`). If the value is empty, then only key part ending with the equal sign will be present. Available only if `includeExtrasInPageSource` setting is turned on. | Part of extras in chrome browser:<br> `AccessibilityNodeInfo.roleDescription=;`<br>`AccessibilityNodeInfo.chromeRole=rootWebArea;`<br> `ACTION_ARGUMENT_HTML_ELEMENT_STRING_VALUES=`<br> `ARTICLE,BLOCKQUOTE,BUTTON,CHECKBOX`
|
|
225
|
+
a11y-important | Whether the element originates from a view considered important for accessibility. Available for API 24+ | 'true'
|
|
226
|
+
screen-reader-focusable | Whether the element is explicitly marked as a focusable unit by a screen reader. Available for API 28+ | 'true'
|
|
227
|
+
input-type | Bitmask, input type of the editable text element, defined by [InputType](https://developer.android.com/reference/android/text/InputType). Available only for text input fields. | '1'
|
|
228
|
+
drawing-order | The drawing position of the view corresponding to this element relative to its siblings. Available for API 24+ | '3'
|
|
229
|
+
showing-hint | Whether the element's text represents a hint for the user to enter text. Available for API 26+ | 'true'
|
|
230
|
+
text-entry-key | Whether the element represents a text entry key that is part of a keyboard or keypad. Available for API 29+ | 'true'
|
|
231
|
+
multiline | If the element is a multi line editable text. Available only for text input fields. | 'true'
|
|
232
|
+
dismissable | If the element can be dismissed | 'true'
|
|
233
|
+
a11y-focused | Whether this element is accessibility focused | 'true'
|
|
234
|
+
heading | Whether element represents a heading. Available for API 28+ | 'true'
|
|
235
|
+
live-region | Bitmask, live region mode value for the element, like '1' for [ACCESSIBILITY_LIVE_REGION_POLITE](https://developer.android.com/reference/android/view/View#ACCESSIBILITY_LIVE_REGION_POLITE) | '1'
|
|
236
|
+
context-clickable | Whether this element is context clickable. Available for API 23+ | 'true'
|
|
237
|
+
max-text-length | The maximum text length for the editable text element. Available only for text input fields. | '300'
|
|
238
|
+
content-invalid | If the content of this element is invalid. For example, a date is not well-formed. | 'true'
|
|
239
|
+
error | The error text of the element. | 'text string'
|
|
240
|
+
pane-title | Title of the pane represented by this element. Available for API 28+ | 'text string'
|
|
241
|
+
actions | The comma-separated id names of the available accessibility actions for the element from [getActionList](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#getActionList()). Available only if `includeA11yActionsInPageSource` setting is turned on. | 'ACTION_FOCUS,ACTION_SELECT,ACTION_CLEAR_SELECTION,ACTION_CLICK,ACTION_ACCESSIBILITY_FOCUS,ACTION_NEXT_AT_MOVEMENT_GRANULARITY,ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY,ACTION_SET_SELECTION,ACTION_SHOW_ON_SCREEN'
|
|
225
242
|
|
|
226
243
|
|
|
227
244
|
## Element Location
|
|
@@ -308,6 +325,7 @@ enforceXPath1 | boolean | Since UiAutomator2 driver version `4.25.0` XPath2 is s
|
|
|
308
325
|
limitXPathContextScope | boolean | Due to historical reasons UiAutomator2 driver limits scopes of element context-based searches to the parent element. This means a request like `findElement(By.xpath, "//root").findElement(By.xpath, "./..")` would always fail, because the driver only collects descendants of the `root` element for the destination XML source. The `limitXPathContextScope` setting being set to `false` changes that default behavior, so the collected page source includes the whole page source XML where `root` node is set as the search context. With that setting disabled the search query above should not fail anymore. Although, you must still be careful while building XPath requests for context-based searches with the `limitXPathContextScope` setting set to `false`. A request like `findElement(By.xpath, "//root").findElement(By.xpath, "//element")` would ignore the current context and search for `element` trough the whole page source. Use `.` notation to correct that behavior and only find `element` nodes which are descendants of the `root` node: `findElement(By.xpath, "//root").findElement(By.xpath, ".//element")`.
|
|
309
326
|
disableIdLocatorAutocompletion | boolean | According to internal Android standards it is expected that each resource identifier is prefixed with `<packageName>:id/` string. This should guarantee uniqueness of each identifier. Although some application development frameworks ignore this rule and don't add such prefix automatically or, rather, let it up to the developer to decide how to represent their application identifiers. For example, [testTag modifier attribute in the Jetpack Compose](https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/package-summary#(androidx.compose.ui.Modifier).testTag(kotlin.String)) with [testTagsAsResourceId](https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/package-summary#(androidx.compose.ui.semantics.SemanticsPropertyReceiver).testTagsAsResourceId()) allows developers to set an arbitrary string without the prefix rule. [Interoperability with UiAutomator](https://developer.android.com/jetpack/compose/testing) also explains how to set it. By default UIA2 driver adds the above prefixes automatically to all resource id locators if they are not prefixed, but in case of such "special" apps this feature might be disabled by assigning the setting to `true`.
|
|
310
327
|
includeExtrasInPageSource | boolean | Whether to include `extras` element attribute in the XML page source result. Then, XPath locator can find the element by the extras. Its value consists of combined [getExtras](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#getExtras()) as `keys=value` pair separated by a semicolon (`;`), thus you may need to find the element with partial matching like `contains` e.g. `driver.find_element :xpath, '//*[contains(@extras, "AccessibilityNodeInfo.roleDescription=")]'`. The value could be huge if elements in the XML page source have large `extras`. It could affect the performance of XML page source generation.
|
|
328
|
+
includeA11yActionsInPageSource | boolean | Whether to include `actions` element attribute in the XML page source result. Its value consists of names of available accessibility actions from [getActionList](https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo#getActionList()), separated by a comma. The value could be huge if elements in the XML page source have a lot of actions and could affect the performance of XML page source generation.
|
|
311
329
|
snapshotMaxDepth | int | The number of maximum depth for the source tree snapshot. The default value is `70`. This number should be in range [1, 500]. A part of the elements source tree might be lost if the value is too low. Also, StackOverflowError might be caused if the value is too high (Issues [12545](https://github.com/appium/appium/issues/12545), [12892](https://github.com/appium/appium/issues/12892)). The available driver version is `2.27.0` or higher.
|
|
312
330
|
|
|
313
331
|
|
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @see https://github.com/appium/appium-uiautomator2-driver/blob/master/docs/scheduled-actions.md#mobile-scheduleaction
|
|
3
3
|
* @this {AndroidUiautomator2Driver}
|
|
4
|
-
* @param {
|
|
4
|
+
* @param {string} name
|
|
5
|
+
* @param {import('@appium/types').StringRecord[]} steps
|
|
6
|
+
* @param {number} [maxPass]
|
|
7
|
+
* @param {number} [maxFail]
|
|
8
|
+
* @param {number} [times]
|
|
9
|
+
* @param {number} [intervalMs]
|
|
10
|
+
* @param {number} [maxHistoryItems]
|
|
5
11
|
* @returns {Promise<any>}
|
|
6
12
|
*/
|
|
7
|
-
export function mobileScheduleAction(this: import("../driver").AndroidUiautomator2Driver,
|
|
13
|
+
export function mobileScheduleAction(this: import("../driver").AndroidUiautomator2Driver, name: string, steps: import("@appium/types").StringRecord[], maxPass?: number, maxFail?: number, times?: number, intervalMs?: number, maxHistoryItems?: number): Promise<any>;
|
|
8
14
|
/**
|
|
9
15
|
* @see https://github.com/appium/appium-uiautomator2-driver/blob/master/docs/scheduled-actions.md#mobile-getactionhistory
|
|
10
16
|
* @this {AndroidUiautomator2Driver}
|
|
11
|
-
* @param {
|
|
17
|
+
* @param {string} name
|
|
12
18
|
* @returns {Promise<import('./types').ActionResult>}
|
|
13
19
|
*/
|
|
14
|
-
export function mobileGetActionHistory(this: import("../driver").AndroidUiautomator2Driver,
|
|
20
|
+
export function mobileGetActionHistory(this: import("../driver").AndroidUiautomator2Driver, name: string): Promise<import("./types").ActionResult>;
|
|
15
21
|
/**
|
|
16
22
|
* @this {AndroidUiautomator2Driver}
|
|
17
23
|
* @see https://github.com/appium/appium-uiautomator2-driver/blob/master/docs/scheduled-actions.md#mobile-unscheduleaction
|
|
18
|
-
* @param {
|
|
24
|
+
* @param {string} name
|
|
19
25
|
* @returns {Promise<any>}
|
|
20
26
|
*/
|
|
21
|
-
export function mobileUnscheduleAction(this: import("../driver").AndroidUiautomator2Driver,
|
|
27
|
+
export function mobileUnscheduleAction(this: import("../driver").AndroidUiautomator2Driver, name: string): Promise<any>;
|
|
22
28
|
/**
|
|
23
29
|
* @this {AndroidUiautomator2Driver}
|
|
24
30
|
* @param {import('@appium/types').StringRecord[]} actions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/actions.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../lib/commands/actions.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,gGATW,MAAM,SACN,OAAO,eAAe,EAAE,YAAY,EAAE,YACtC,MAAM,YACN,MAAM,UACN,MAAM,eACN,MAAM,oBACN,MAAM,GACJ,OAAO,CAAC,GAAG,CAAC,CAwBxB;AAED;;;;;GAKG;AACH,kGAHW,MAAM,GACJ,OAAO,CAAC,OAAO,SAAS,EAAE,YAAY,CAAC,CAUnD;AAED;;;;;GAKG;AACH,kGAHW,MAAM,GACJ,OAAO,CAAC,GAAG,CAAC,CAQxB;AAED;;;;GAIG;AACH,6FAHW,OAAO,eAAe,EAAE,YAAY,EAAE,GACpC,OAAO,CAAC,IAAI,CAAC,CAyBzB;AAED;;;GAGG;AACH,qFAFa,OAAO,CAAC,IAAI,CAAC,CAIzB;wCAGY,OAAO,WAAW,EAAE,yBAAyB"}
|
|
@@ -6,31 +6,45 @@ exports.mobileUnscheduleAction = mobileUnscheduleAction;
|
|
|
6
6
|
exports.performActions = performActions;
|
|
7
7
|
exports.releaseActions = releaseActions;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* @see https://github.com/appium/appium-uiautomator2-driver/blob/master/docs/scheduled-actions.md#mobile-scheduleaction
|
|
10
10
|
* @this {AndroidUiautomator2Driver}
|
|
11
|
-
* @param {
|
|
11
|
+
* @param {string} name
|
|
12
|
+
* @param {import('@appium/types').StringRecord[]} steps
|
|
13
|
+
* @param {number} [maxPass]
|
|
14
|
+
* @param {number} [maxFail]
|
|
15
|
+
* @param {number} [times]
|
|
16
|
+
* @param {number} [intervalMs]
|
|
17
|
+
* @param {number} [maxHistoryItems]
|
|
12
18
|
* @returns {Promise<any>}
|
|
13
19
|
*/
|
|
14
|
-
async function mobileScheduleAction(
|
|
15
|
-
return await this.uiautomator2.jwproxy.command('/appium/schedule_action', 'POST',
|
|
20
|
+
async function mobileScheduleAction(name, steps, maxPass, maxFail, times, intervalMs, maxHistoryItems) {
|
|
21
|
+
return await this.uiautomator2.jwproxy.command('/appium/schedule_action', 'POST', {
|
|
22
|
+
name,
|
|
23
|
+
steps,
|
|
24
|
+
maxFail,
|
|
25
|
+
maxPass,
|
|
26
|
+
times,
|
|
27
|
+
intervalMs,
|
|
28
|
+
maxHistoryItems,
|
|
29
|
+
});
|
|
16
30
|
}
|
|
17
31
|
/**
|
|
18
32
|
* @see https://github.com/appium/appium-uiautomator2-driver/blob/master/docs/scheduled-actions.md#mobile-getactionhistory
|
|
19
33
|
* @this {AndroidUiautomator2Driver}
|
|
20
|
-
* @param {
|
|
34
|
+
* @param {string} name
|
|
21
35
|
* @returns {Promise<import('./types').ActionResult>}
|
|
22
36
|
*/
|
|
23
|
-
async function mobileGetActionHistory(
|
|
24
|
-
return /** @type {import('./types').ActionResult} */ (await this.uiautomator2.jwproxy.command('/appium/action_history', 'POST',
|
|
37
|
+
async function mobileGetActionHistory(name) {
|
|
38
|
+
return /** @type {import('./types').ActionResult} */ (await this.uiautomator2.jwproxy.command('/appium/action_history', 'POST', { name }));
|
|
25
39
|
}
|
|
26
40
|
/**
|
|
27
41
|
* @this {AndroidUiautomator2Driver}
|
|
28
42
|
* @see https://github.com/appium/appium-uiautomator2-driver/blob/master/docs/scheduled-actions.md#mobile-unscheduleaction
|
|
29
|
-
* @param {
|
|
43
|
+
* @param {string} name
|
|
30
44
|
* @returns {Promise<any>}
|
|
31
45
|
*/
|
|
32
|
-
async function mobileUnscheduleAction(
|
|
33
|
-
return await this.uiautomator2.jwproxy.command('/appium/unschedule_action', 'POST',
|
|
46
|
+
async function mobileUnscheduleAction(name) {
|
|
47
|
+
return await this.uiautomator2.jwproxy.command('/appium/unschedule_action', 'POST', { name });
|
|
34
48
|
}
|
|
35
49
|
/**
|
|
36
50
|
* @this {AndroidUiautomator2Driver}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../lib/commands/actions.js"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../lib/commands/actions.js"],"names":[],"mappings":";;AAYA,oDAsBC;AAQD,wDAQC;AAQD,wDAMC;AAOD,wCAuBC;AAMD,wCAEC;AAtGD;;;;;;;;;;;GAWG;AACI,KAAK,UAAU,oBAAoB,CACxC,IAAI,EACJ,KAAK,EACL,OAAO,EACP,OAAO,EACP,KAAK,EACL,UAAU,EACV,eAAe;IAEf,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAC5C,yBAAyB,EACzB,MAAM,EACN;QACE,IAAI;QACJ,KAAK;QACL,OAAO;QACP,OAAO;QACP,KAAK;QACL,UAAU;QACV,eAAe;KAChB,CACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,sBAAsB,CAAC,IAAI;IAC/C,OAAO,6CAA6C,CAAC,CACnD,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,wBAAwB,EACxB,MAAM,EACN,EAAC,IAAI,EAAC,CACP,CACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,sBAAsB,CAAC,IAAI;IAC/C,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAC5C,2BAA2B,EAC3B,MAAM,EACN,EAAC,IAAI,EAAC,CACP,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,cAAc,CAAC,OAAO;IAC1C,+EAA+E;IAC/E,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CACjD,MAAM,CAAC,MAAM,CACX,EAAE,EACF,MAAM,EACN,MAAM,CAAC,IAAI,KAAK,SAAS;QACvB,CAAC,CAAC;YACE,UAAU,EAAE;gBACV,WAAW,EAAE,OAAO;aACrB;SACF;QACH,CAAC,CAAC,EAAE,CACP,CACF,CAAC;IACF,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,yBAAyB,IAAI,CAAC,SAAS,CAAC,mBAAmB,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3F,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,UAAU,EACV,MAAM,EACN;QACE,OAAO,EAAE,mBAAmB;KAC7B,CACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,cAAc;IAClC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;AAC/D,CAAC;AAED;;GAEG"}
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
export function getAlertText(this: import("../driver").AndroidUiautomator2Driver): Promise<string>;
|
|
6
6
|
/**
|
|
7
7
|
* @this {AndroidUiautomator2Driver}
|
|
8
|
-
* @param {
|
|
8
|
+
* @param {string} [buttonLabel] The name of the button to click in order to accept the alert.
|
|
9
|
+
* If the name is not provided
|
|
10
|
+
* then the script will try to detect the button automatically.
|
|
9
11
|
* @returns {Promise<void>}
|
|
10
12
|
*/
|
|
11
|
-
export function mobileAcceptAlert(this: import("../driver").AndroidUiautomator2Driver,
|
|
13
|
+
export function mobileAcceptAlert(this: import("../driver").AndroidUiautomator2Driver, buttonLabel?: string): Promise<void>;
|
|
12
14
|
/**
|
|
13
15
|
* @this {AndroidUiautomator2Driver}
|
|
14
16
|
* @returns {Promise<void>}
|
|
@@ -16,10 +18,12 @@ export function mobileAcceptAlert(this: import("../driver").AndroidUiautomator2D
|
|
|
16
18
|
export function postAcceptAlert(this: import("../driver").AndroidUiautomator2Driver): Promise<void>;
|
|
17
19
|
/**
|
|
18
20
|
* @this {AndroidUiautomator2Driver}
|
|
19
|
-
* @param {
|
|
21
|
+
* @param {string} [buttonLabel] The name of the button to click in order to dismiss the alert.
|
|
22
|
+
* If the name is not provided
|
|
23
|
+
* then the script will try to detect the button automatically.
|
|
20
24
|
* @returns {Promise<void>}
|
|
21
25
|
*/
|
|
22
|
-
export function mobileDismissAlert(this: import("../driver").AndroidUiautomator2Driver,
|
|
26
|
+
export function mobileDismissAlert(this: import("../driver").AndroidUiautomator2Driver, buttonLabel?: string): Promise<void>;
|
|
23
27
|
/**
|
|
24
28
|
* @this {AndroidUiautomator2Driver}
|
|
25
29
|
* @returns {Promise<void>}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,mFAFa,OAAO,CAAC,MAAM,CAAC,CAU3B;AAED
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,mFAFa,OAAO,CAAC,MAAM,CAAC,CAU3B;AAED;;;;;;GAMG;AACH,qGALW,MAAM,GAGJ,OAAO,CAAC,IAAI,CAAC,CAQzB;AAED;;;GAGG;AACH,sFAFa,OAAO,CAAC,IAAI,CAAC,CAIzB;AAED;;;;;;GAMG;AACH,sGALW,MAAM,GAGJ,OAAO,CAAC,IAAI,CAAC,CAQzB;AAED;;;GAGG;AACH,uFAFa,OAAO,CAAC,IAAI,CAAC,CAIzB;wCAGY,OAAO,WAAW,EAAE,yBAAyB"}
|
|
@@ -14,11 +14,13 @@ async function getAlertText() {
|
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* @this {AndroidUiautomator2Driver}
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {string} [buttonLabel] The name of the button to click in order to accept the alert.
|
|
18
|
+
* If the name is not provided
|
|
19
|
+
* then the script will try to detect the button automatically.
|
|
18
20
|
* @returns {Promise<void>}
|
|
19
21
|
*/
|
|
20
|
-
async function mobileAcceptAlert(
|
|
21
|
-
await this.uiautomator2.jwproxy.command('/alert/accept', 'POST',
|
|
22
|
+
async function mobileAcceptAlert(buttonLabel) {
|
|
23
|
+
await this.uiautomator2.jwproxy.command('/alert/accept', 'POST', { buttonLabel });
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
24
26
|
* @this {AndroidUiautomator2Driver}
|
|
@@ -29,11 +31,13 @@ async function postAcceptAlert() {
|
|
|
29
31
|
}
|
|
30
32
|
/**
|
|
31
33
|
* @this {AndroidUiautomator2Driver}
|
|
32
|
-
* @param {
|
|
34
|
+
* @param {string} [buttonLabel] The name of the button to click in order to dismiss the alert.
|
|
35
|
+
* If the name is not provided
|
|
36
|
+
* then the script will try to detect the button automatically.
|
|
33
37
|
* @returns {Promise<void>}
|
|
34
38
|
*/
|
|
35
|
-
async function mobileDismissAlert(
|
|
36
|
-
await this.uiautomator2.jwproxy.command('/alert/dismiss', 'POST',
|
|
39
|
+
async function mobileDismissAlert(buttonLabel) {
|
|
40
|
+
await this.uiautomator2.jwproxy.command('/alert/dismiss', 'POST', { buttonLabel });
|
|
37
41
|
}
|
|
38
42
|
/**
|
|
39
43
|
* @this {AndroidUiautomator2Driver}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":";;AAIA,oCAQC;
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../../lib/commands/alert.js"],"names":[],"mappings":";;AAIA,oCAQC;AASD,8CAMC;AAMD,0CAEC;AASD,gDAMC;AAMD,4CAEC;AA1DD;;;GAGG;AACI,KAAK,UAAU,YAAY;IAChC,OAAO,MAAM,CACX,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,aAAa,EACb,KAAK,EACL,EAAE,CACH,CACF,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,iBAAiB,CAAC,WAAW;IACjD,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,eAAe,EACf,MAAM,EACN,EAAC,WAAW,EAAC,CACd,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,eAAe;IACnC,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;AACjC,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,kBAAkB,CAAC,WAAW;IAClD,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,gBAAgB,EAChB,MAAM,EACN,EAAC,WAAW,EAAC,CACd,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,gBAAgB;IACpC,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;AAClC,CAAC;AAED;;GAEG"}
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Install multiple APKs with `install-multiple` option.
|
|
3
|
-
* @this {AndroidUiautomator2Driver}
|
|
4
|
-
* @param {
|
|
3
|
+
* @this {AndroidUiautomator2Driver}
|
|
4
|
+
* @param {string[]} apks The list of APKs to install. Each APK should be a path to a apk
|
|
5
|
+
* or downloadable URL as HTTP/HTTPS.
|
|
6
|
+
* @param {import('./types').InstallOptions} [options] Installation options.
|
|
5
7
|
* @throws {Error} if an error occured while installing the given APKs.
|
|
6
8
|
* @returns {Promise<void>}
|
|
7
9
|
*/
|
|
8
|
-
export function mobileInstallMultipleApks(this: import("../driver").AndroidUiautomator2Driver,
|
|
10
|
+
export function mobileInstallMultipleApks(this: import("../driver").AndroidUiautomator2Driver, apks: string[], options?: import("./types").InstallOptions): Promise<void>;
|
|
9
11
|
/**
|
|
10
|
-
* Puts the app to background and waits the given number of seconds
|
|
12
|
+
* Puts the app to background and waits the given number of seconds then restores the app
|
|
11
13
|
* if necessary. The call is blocking.
|
|
14
|
+
*
|
|
12
15
|
* @this {AndroidUiautomator2Driver}
|
|
13
|
-
* @param {
|
|
16
|
+
* @param {number} [seconds=-1] The amount of seconds to wait between putting the app to background and restoring it.
|
|
17
|
+
* Any negative value means to not restore the app after putting it to background.
|
|
14
18
|
* @returns {Promise<void>}
|
|
15
19
|
*/
|
|
16
|
-
export function mobileBackgroundApp(this: import("../driver").AndroidUiautomator2Driver,
|
|
20
|
+
export function mobileBackgroundApp(this: import("../driver").AndroidUiautomator2Driver, seconds?: number): Promise<void>;
|
|
17
21
|
export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
|
|
18
22
|
export type StringRecord<T = any> = import("@appium/types").StringRecord<T>;
|
|
19
23
|
//# sourceMappingURL=app-management.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-management.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"app-management.d.ts","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH,qGANW,MAAM,EAAE,YAER,OAAO,SAAS,EAAE,cAAc,GAE9B,OAAO,CAAC,IAAI,CAAC,CAUzB;AAED;;;;;;;;GAQG;AACH,mGAJW,MAAM,GAEJ,OAAO,CAAC,IAAI,CAAC,CAIzB;wCAGY,OAAO,WAAW,EAAE,yBAAyB;yBAI5C,CAAC,UACF,OAAO,eAAe,EAAE,YAAY,CAAC,CAAC,CAAC"}
|
|
@@ -11,27 +11,30 @@ const driver_1 = require("appium/driver");
|
|
|
11
11
|
const extensions_1 = require("../extensions");
|
|
12
12
|
/**
|
|
13
13
|
* Install multiple APKs with `install-multiple` option.
|
|
14
|
-
* @this {AndroidUiautomator2Driver}
|
|
15
|
-
* @param {
|
|
14
|
+
* @this {AndroidUiautomator2Driver}
|
|
15
|
+
* @param {string[]} apks The list of APKs to install. Each APK should be a path to a apk
|
|
16
|
+
* or downloadable URL as HTTP/HTTPS.
|
|
17
|
+
* @param {import('./types').InstallOptions} [options] Installation options.
|
|
16
18
|
* @throws {Error} if an error occured while installing the given APKs.
|
|
17
19
|
* @returns {Promise<void>}
|
|
18
20
|
*/
|
|
19
|
-
async function mobileInstallMultipleApks(
|
|
20
|
-
if (!lodash_1.default.isArray(
|
|
21
|
+
async function mobileInstallMultipleApks(apks, options) {
|
|
22
|
+
if (!lodash_1.default.isArray(apks) || lodash_1.default.isEmpty(apks)) {
|
|
21
23
|
throw new driver_1.errors.InvalidArgumentError('No apks are given to install');
|
|
22
24
|
}
|
|
23
|
-
const
|
|
24
|
-
await this.adb.installMultipleApks(
|
|
25
|
+
const configuredApks = await bluebird_1.default.all(apks.map((app) => this.helpers.configureApp(app, [extensions_1.APK_EXTENSION])));
|
|
26
|
+
await this.adb.installMultipleApks(configuredApks, options);
|
|
25
27
|
}
|
|
26
28
|
/**
|
|
27
|
-
* Puts the app to background and waits the given number of seconds
|
|
29
|
+
* Puts the app to background and waits the given number of seconds then restores the app
|
|
28
30
|
* if necessary. The call is blocking.
|
|
31
|
+
*
|
|
29
32
|
* @this {AndroidUiautomator2Driver}
|
|
30
|
-
* @param {
|
|
33
|
+
* @param {number} [seconds=-1] The amount of seconds to wait between putting the app to background and restoring it.
|
|
34
|
+
* Any negative value means to not restore the app after putting it to background.
|
|
31
35
|
* @returns {Promise<void>}
|
|
32
36
|
*/
|
|
33
|
-
async function mobileBackgroundApp(
|
|
34
|
-
const { seconds = -1 } = opts;
|
|
37
|
+
async function mobileBackgroundApp(seconds = -1) {
|
|
35
38
|
await this.background(seconds);
|
|
36
39
|
}
|
|
37
40
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-management.js","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"app-management.js","sourceRoot":"","sources":["../../../lib/commands/app-management.js"],"names":[],"mappings":";;;;;AAcA,8DAQC;AAWD,kDAEC;AAnCD,oDAAuB;AACvB,wDAAyB;AACzB,0CAAqC;AACrC,8CAA4C;AAE5C;;;;;;;;GAQG;AACI,KAAK,UAAU,yBAAyB,CAAC,IAAI,EAAE,OAAO;IAC3D,IAAI,CAAC,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,gBAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,eAAM,CAAC,oBAAoB,CAAC,8BAA8B,CAAC,CAAC;IACxE,CAAC;IACD,MAAM,cAAc,GAAG,MAAM,kBAAC,CAAC,GAAG,CAChC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,0BAAa,CAAC,CAAC,CAAC,CACnE,CAAC;IACF,MAAM,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,mBAAmB,CAAC,OAAO,GAAG,CAAC,CAAC;IACpD,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAED;;GAEG;AAEH;;;GAGG"}
|
|
@@ -4,12 +4,6 @@
|
|
|
4
4
|
* or an empty string if the clipboard is empty.
|
|
5
5
|
*/
|
|
6
6
|
export function getClipboard(this: import("../driver").AndroidUiautomator2Driver): Promise<string>;
|
|
7
|
-
/**
|
|
8
|
-
* @this {AndroidUiautomator2Driver}
|
|
9
|
-
* @returns {Promise<string>} Base64-encoded content of the clipboard
|
|
10
|
-
* or an empty string if the clipboard is empty.
|
|
11
|
-
*/
|
|
12
|
-
export function mobileGetClipboard(this: import("../driver").AndroidUiautomator2Driver): Promise<string>;
|
|
13
7
|
/**
|
|
14
8
|
* @this {AndroidUiautomator2Driver}
|
|
15
9
|
* @param {string} content Base64-encoded clipboard payload
|
|
@@ -20,11 +14,5 @@ export function mobileGetClipboard(this: import("../driver").AndroidUiautomator2
|
|
|
20
14
|
* @returns {Promise<void>}
|
|
21
15
|
*/
|
|
22
16
|
export function setClipboard(this: import("../driver").AndroidUiautomator2Driver, content: string, contentType?: "plaintext", label?: string): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* @this {AndroidUiautomator2Driver}
|
|
25
|
-
* @param {import('./types').SetClipboardOpts} opts
|
|
26
|
-
* @returns {Promise<void>}
|
|
27
|
-
*/
|
|
28
|
-
export function mobileSetClipboard(this: import("../driver").AndroidUiautomator2Driver, opts: import("./types").SetClipboardOpts): Promise<void>;
|
|
29
17
|
export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
|
|
30
18
|
//# sourceMappingURL=clipboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mFAHa,OAAO,CAAC,MAAM,CAAC,CAa3B;AAED
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mFAHa,OAAO,CAAC,MAAM,CAAC,CAa3B;AAED;;;;;;;;GAQG;AACH,2FAPW,MAAM,gBACN,WAAW,UAEX,MAAM,GAEJ,OAAO,CAAC,IAAI,CAAC,CAQzB;wCAGY,OAAO,WAAW,EAAE,yBAAyB"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getClipboard = getClipboard;
|
|
4
|
-
exports.mobileGetClipboard = mobileGetClipboard;
|
|
5
4
|
exports.setClipboard = setClipboard;
|
|
6
|
-
exports.mobileSetClipboard = mobileSetClipboard;
|
|
7
5
|
/**
|
|
8
6
|
* @this {AndroidUiautomator2Driver}
|
|
9
7
|
* @returns {Promise<string>} Base64-encoded content of the clipboard
|
|
@@ -14,14 +12,6 @@ async function getClipboard() {
|
|
|
14
12
|
? await this.uiautomator2.jwproxy.command('/appium/device/get_clipboard', 'POST', {})
|
|
15
13
|
: await this.settingsApp.getClipboard());
|
|
16
14
|
}
|
|
17
|
-
/**
|
|
18
|
-
* @this {AndroidUiautomator2Driver}
|
|
19
|
-
* @returns {Promise<string>} Base64-encoded content of the clipboard
|
|
20
|
-
* or an empty string if the clipboard is empty.
|
|
21
|
-
*/
|
|
22
|
-
async function mobileGetClipboard() {
|
|
23
|
-
return await this.getClipboard();
|
|
24
|
-
}
|
|
25
15
|
/**
|
|
26
16
|
* @this {AndroidUiautomator2Driver}
|
|
27
17
|
* @param {string} content Base64-encoded clipboard payload
|
|
@@ -34,14 +24,6 @@ async function mobileGetClipboard() {
|
|
|
34
24
|
async function setClipboard(content, contentType, label) {
|
|
35
25
|
await this.uiautomator2.jwproxy.command('/appium/device/set_clipboard', 'POST', { content, contentType, label });
|
|
36
26
|
}
|
|
37
|
-
/**
|
|
38
|
-
* @this {AndroidUiautomator2Driver}
|
|
39
|
-
* @param {import('./types').SetClipboardOpts} opts
|
|
40
|
-
* @returns {Promise<void>}
|
|
41
|
-
*/
|
|
42
|
-
async function mobileSetClipboard(opts) {
|
|
43
|
-
await this.setClipboard(opts.content, opts.contentType, opts.label);
|
|
44
|
-
}
|
|
45
27
|
/**
|
|
46
28
|
* @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
|
|
47
29
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":";;AAKA,oCAUC;
|
|
1
|
+
{"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../../lib/commands/clipboard.js"],"names":[],"mappings":";;AAKA,oCAUC;AAWD,oCAMC;AAhCD;;;;GAIG;AACI,KAAK,UAAU,YAAY;IAChC,OAAO,MAAM,CACX,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,EAAE;QACjC,CAAC,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,8BAA8B,EAC9B,MAAM,EACN,EAAE,CACH;QACH,CAAC,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAC1C,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,YAAY,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK;IAC5D,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,8BAA8B,EAC9B,MAAM,EACN,EAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAC,CAC9B,CAAC;AACJ,CAAC;AAED;;GAEG"}
|
|
@@ -92,10 +92,11 @@ export function getElementRect(this: import("../driver").AndroidUiautomator2Driv
|
|
|
92
92
|
/**
|
|
93
93
|
* Sends text to the given element by replacing its previous content
|
|
94
94
|
* @this {AndroidUiautomator2Driver}
|
|
95
|
-
* @param {
|
|
95
|
+
* @param {string} elementId The id of the element whose content will be replaced.
|
|
96
|
+
* @param {string} text The actual text to set.
|
|
96
97
|
* @throws {Error} If there was a faulre while setting the text
|
|
97
98
|
* @returns {Promise<void>}
|
|
98
99
|
*/
|
|
99
|
-
export function mobileReplaceElementValue(this: import("../driver").AndroidUiautomator2Driver,
|
|
100
|
+
export function mobileReplaceElementValue(this: import("../driver").AndroidUiautomator2Driver, elementId: string, text: string): Promise<void>;
|
|
100
101
|
export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
|
|
101
102
|
//# sourceMappingURL=element.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../lib/commands/element.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../lib/commands/element.js"],"names":[],"mappings":"AAIA;;;GAGG;AACH,6EAFa,OAAO,CAAC,OAAO,eAAe,EAAE,OAAO,CAAC,CASpD;AAED;;;;;GAKG;AACH,6FAJW,MAAM,aACN,MAAM,GACJ,OAAO,CAAC,MAAM,OAAC,CAAC,CAU5B;AAED;;;;GAIG;AACH,iGAHW,MAAM,GACJ,OAAO,CAAC,OAAO,CAAC,CAI5B;AAED;;;;GAIG;AACH,+FAHW,MAAM,GACJ,OAAO,CAAC,OAAO,CAAC,CAI5B;AAED;;;;GAIG;AACH,gGAHW,MAAM,GACJ,OAAO,CAAC,OAAO,CAAC,CAI5B;AAED;;;;GAIG;AACH,wFAHW,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAU3B;AAED;;;;GAIG;AACH,4FAHW,MAAM,GACJ,OAAO,CAAC,OAAO,eAAe,EAAE,QAAQ,CAAC,CAUrD;AAED;;;;GAIG;AACH,wFAHW,MAAM,GACJ,OAAO,CAAC,OAAO,eAAe,EAAE,IAAI,CAAC,CAUjD;AAED;;;;GAIG;AACH,+FAHW,OAAO,uBAAuB,EAAE,qBAAqB,GACnD,OAAO,CAAC,IAAI,CAAC,CAQzB;AAED;;;;;GAKG;AACH,6FAJW,MAAM,GAAC,MAAM,EAAE,aACf,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAYzB;AAED;;;;GAIG;AACH,wFAHW,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAU3B;AAED;;;;GAIG;AACH,oFAHW,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAQzB;AAED;;;;GAIG;AACH,mGAHW,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,CAU3B;AAED;;;;GAIG;AACH,sFAHW,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAUzB;AAED;;;;GAIG;AACH,+FAHW,MAAM,GACJ,OAAO,CAAC,OAAO,eAAe,EAAE,IAAI,CAAC,CA4BjD;AAED;;;;;;;GAOG;AACH,0GALW,MAAM,QACN,MAAM,GAEJ,OAAO,CAAC,IAAI,CAAC,CAWzB;wCAeY,OAAO,WAAW,EAAE,yBAAyB"}
|
|
@@ -22,7 +22,6 @@ exports.mobileReplaceElementValue = mobileReplaceElementValue;
|
|
|
22
22
|
const bluebird_1 = __importDefault(require("bluebird"));
|
|
23
23
|
const lodash_1 = __importDefault(require("lodash"));
|
|
24
24
|
const driver_1 = require("appium/driver");
|
|
25
|
-
const appium_android_driver_1 = require("appium-android-driver");
|
|
26
25
|
/**
|
|
27
26
|
* @this {AndroidUiautomator2Driver}
|
|
28
27
|
* @returns {Promise<import('@appium/types').Element>}
|
|
@@ -166,12 +165,12 @@ async function getElementRect(elementId) {
|
|
|
166
165
|
/**
|
|
167
166
|
* Sends text to the given element by replacing its previous content
|
|
168
167
|
* @this {AndroidUiautomator2Driver}
|
|
169
|
-
* @param {
|
|
168
|
+
* @param {string} elementId The id of the element whose content will be replaced.
|
|
169
|
+
* @param {string} text The actual text to set.
|
|
170
170
|
* @throws {Error} If there was a faulre while setting the text
|
|
171
171
|
* @returns {Promise<void>}
|
|
172
172
|
*/
|
|
173
|
-
async function mobileReplaceElementValue(
|
|
174
|
-
const { elementId, text } = appium_android_driver_1.utils.requireArgs(['elementId', 'text'], opts);
|
|
173
|
+
async function mobileReplaceElementValue(elementId, text) {
|
|
175
174
|
await this.uiautomator2.jwproxy.command(`/element/${elementId}/value`, 'POST', {
|
|
176
175
|
text,
|
|
177
176
|
replace: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.js","sourceRoot":"","sources":["../../../lib/commands/element.js"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"element.js","sourceRoot":"","sources":["../../../lib/commands/element.js"],"names":[],"mappings":";;;;;AAQA,wBAOC;AAQD,oCAQC;AAOD,4CAEC;AAOD,wCAEC;AAOD,0CAEC;AAOD,0BAQC;AAOD,kCAQC;AAOD,0BAQC;AAOD,8CAMC;AAQD,8CAUC;AAOD,0BAQC;AAOD,sBAMC;AAOD,oDAQC;AAOD,sBAQC;AAOD,wCA0BC;AAUD,8DASC;AApPD,wDAAyB;AACzB,oDAAuB;AACvB,0CAAwC;AAExC;;;GAGG;AACI,KAAK,UAAU,MAAM;IAC1B,OAAO,8CAA8C,CAAC,CACpD,MAAM,IAAI,CAAC,YAAY,CAAC,OAA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