appium-android-driver 12.4.9 → 12.4.10
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 +6 -0
- package/build/lib/commands/element.d.ts +90 -66
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +74 -53
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/log.d.ts +7 -7
- package/build/lib/commands/log.d.ts.map +1 -1
- package/build/lib/commands/log.js +0 -1
- package/build/lib/commands/log.js.map +1 -1
- package/build/lib/commands/media-projection.d.ts +32 -36
- package/build/lib/commands/media-projection.d.ts.map +1 -1
- package/build/lib/commands/media-projection.js +27 -54
- package/build/lib/commands/media-projection.js.map +1 -1
- package/build/lib/commands/permissions.d.ts +47 -19
- package/build/lib/commands/permissions.d.ts.map +1 -1
- package/build/lib/commands/permissions.js +21 -36
- package/build/lib/commands/permissions.js.map +1 -1
- package/build/lib/commands/system-bars.d.ts +27 -21
- package/build/lib/commands/system-bars.d.ts.map +1 -1
- package/build/lib/commands/system-bars.js +23 -40
- package/build/lib/commands/system-bars.js.map +1 -1
- package/lib/commands/element.ts +234 -0
- package/lib/commands/log.ts +9 -9
- package/lib/commands/{media-projection.js → media-projection.ts} +69 -68
- package/lib/commands/{permissions.js → permissions.ts} +58 -50
- package/lib/commands/{system-bars.js → system-bars.ts} +59 -50
- package/package.json +1 -1
- package/lib/commands/element.js +0 -158
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [12.4.10](https://github.com/appium/appium-android-driver/compare/v12.4.9...v12.4.10) (2025-12-20)
|
|
2
|
+
|
|
3
|
+
### Miscellaneous Chores
|
|
4
|
+
|
|
5
|
+
* Migrate more command modules to Typescript (part 4) ([#1041](https://github.com/appium/appium-android-driver/issues/1041)) ([ca117ac](https://github.com/appium/appium-android-driver/commit/ca117ac1a5781b94a2816028b5da04192ad146cf))
|
|
6
|
+
|
|
1
7
|
## [12.4.9](https://github.com/appium/appium-android-driver/compare/v12.4.8...v12.4.9) (2025-12-19)
|
|
2
8
|
|
|
3
9
|
### Miscellaneous Chores
|
|
@@ -1,102 +1,126 @@
|
|
|
1
|
+
import type { Position, Size } from '@appium/types';
|
|
2
|
+
import type { AndroidDriver } from '../driver';
|
|
3
|
+
import type { DoSetElementValueOpts } from './types';
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @param
|
|
5
|
-
* @
|
|
5
|
+
* Gets an attribute value from an element.
|
|
6
|
+
*
|
|
7
|
+
* @param attribute The name of the attribute to retrieve.
|
|
8
|
+
* @param elementId The element identifier.
|
|
9
|
+
* @returns Promise that resolves to the attribute value, or `null` if not found.
|
|
10
|
+
* @throws {errors.NotImplementedError} This method is not implemented.
|
|
6
11
|
*/
|
|
7
|
-
export function getAttribute(this:
|
|
12
|
+
export declare function getAttribute(this: AndroidDriver, attribute: string, elementId: string): Promise<string | null>;
|
|
8
13
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @
|
|
14
|
+
* Clicks on an element.
|
|
15
|
+
*
|
|
16
|
+
* @param elementId The element identifier.
|
|
17
|
+
* @returns Promise that resolves when the click is performed.
|
|
18
|
+
* @throws {errors.NotImplementedError} This method is not implemented.
|
|
12
19
|
*/
|
|
13
|
-
export function click(this:
|
|
20
|
+
export declare function click(this: AndroidDriver, elementId: string): Promise<void>;
|
|
14
21
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* @
|
|
22
|
+
* Gets the text content of an element.
|
|
23
|
+
*
|
|
24
|
+
* @param elementId The element identifier.
|
|
25
|
+
* @returns Promise that resolves to the element's text content.
|
|
26
|
+
* @throws {errors.NotImplementedError} This method is not implemented.
|
|
18
27
|
*/
|
|
19
|
-
export function getText(this:
|
|
28
|
+
export declare function getText(this: AndroidDriver, elementId: string): Promise<string>;
|
|
20
29
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @
|
|
30
|
+
* Gets the location of an element on the screen.
|
|
31
|
+
*
|
|
32
|
+
* @param elementId The element identifier.
|
|
33
|
+
* @returns Promise that resolves to the element's position (x, y coordinates).
|
|
34
|
+
* @throws {errors.NotImplementedError} This method is not implemented.
|
|
24
35
|
*/
|
|
25
|
-
export function getLocation(this:
|
|
36
|
+
export declare function getLocation(this: AndroidDriver, elementId: string): Promise<Position>;
|
|
26
37
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* @
|
|
38
|
+
* Gets the size of an element.
|
|
39
|
+
*
|
|
40
|
+
* @param elementId The element identifier.
|
|
41
|
+
* @returns Promise that resolves to the element's size (width, height).
|
|
42
|
+
* @throws {errors.NotImplementedError} This method is not implemented.
|
|
30
43
|
*/
|
|
31
|
-
export function getSize(this:
|
|
44
|
+
export declare function getSize(this: AndroidDriver, elementId: string): Promise<Size>;
|
|
32
45
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* @
|
|
46
|
+
* Gets the class name of an element.
|
|
47
|
+
*
|
|
48
|
+
* @param elementId The element identifier.
|
|
49
|
+
* @returns Promise that resolves to the element's class name.
|
|
36
50
|
*/
|
|
37
|
-
export function getName(this:
|
|
51
|
+
export declare function getName(this: AndroidDriver, elementId: string): Promise<string>;
|
|
38
52
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* @
|
|
53
|
+
* Checks if an element is displayed.
|
|
54
|
+
*
|
|
55
|
+
* @param elementId The element identifier.
|
|
56
|
+
* @returns Promise that resolves to `true` if the element is displayed, `false` otherwise.
|
|
42
57
|
*/
|
|
43
|
-
export function elementDisplayed(this:
|
|
58
|
+
export declare function elementDisplayed(this: AndroidDriver, elementId: string): Promise<boolean>;
|
|
44
59
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* @
|
|
60
|
+
* Checks if an element is enabled.
|
|
61
|
+
*
|
|
62
|
+
* @param elementId The element identifier.
|
|
63
|
+
* @returns Promise that resolves to `true` if the element is enabled, `false` otherwise.
|
|
48
64
|
*/
|
|
49
|
-
export function elementEnabled(this:
|
|
65
|
+
export declare function elementEnabled(this: AndroidDriver, elementId: string): Promise<boolean>;
|
|
50
66
|
/**
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* @
|
|
67
|
+
* Checks if an element is selected.
|
|
68
|
+
*
|
|
69
|
+
* @param elementId The element identifier.
|
|
70
|
+
* @returns Promise that resolves to `true` if the element is selected, `false` otherwise.
|
|
54
71
|
*/
|
|
55
|
-
export function elementSelected(this:
|
|
72
|
+
export declare function elementSelected(this: AndroidDriver, elementId: string): Promise<boolean>;
|
|
56
73
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* @param
|
|
60
|
-
* @param
|
|
61
|
-
* @
|
|
74
|
+
* Sets the value of an element.
|
|
75
|
+
*
|
|
76
|
+
* @param keys The text to set, either as a string or an array of strings (which will be joined).
|
|
77
|
+
* @param elementId The element identifier.
|
|
78
|
+
* @param replace If `true`, replaces the existing value. If `false`, appends to it. Defaults to `false`.
|
|
79
|
+
* @returns Promise that resolves when the value is set.
|
|
62
80
|
*/
|
|
63
|
-
export function setElementValue(this:
|
|
81
|
+
export declare function setElementValue(this: AndroidDriver, keys: string | string[], elementId: string, replace?: boolean): Promise<void>;
|
|
64
82
|
/**
|
|
83
|
+
* Sets the value of an element.
|
|
84
|
+
*
|
|
65
85
|
* Reason for isolating doSetElementValue from setElementValue is for reusing setElementValue
|
|
66
86
|
* across android-drivers (like appium-uiautomator2-driver) and to avoid code duplication.
|
|
67
87
|
* Other android-drivers (like appium-uiautomator2-driver) need to override doSetElementValue
|
|
68
88
|
* to facilitate setElementValue.
|
|
69
89
|
*
|
|
70
|
-
* @
|
|
71
|
-
* @
|
|
72
|
-
* @
|
|
90
|
+
* @param params The parameters for setting the element value.
|
|
91
|
+
* @returns Promise that resolves when the value is set.
|
|
92
|
+
* @throws {errors.NotImplementedError} This method is not implemented.
|
|
73
93
|
*/
|
|
74
|
-
export function doSetElementValue(this:
|
|
94
|
+
export declare function doSetElementValue(this: AndroidDriver, params: DoSetElementValueOpts): Promise<void>;
|
|
75
95
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* @param
|
|
79
|
-
* @
|
|
96
|
+
* Sets the value of an element (appends to existing value).
|
|
97
|
+
*
|
|
98
|
+
* @param keys The text to set, either as a string or an array of strings (which will be joined).
|
|
99
|
+
* @param elementId The element identifier.
|
|
100
|
+
* @returns Promise that resolves when the value is set.
|
|
80
101
|
*/
|
|
81
|
-
export function setValue(this:
|
|
102
|
+
export declare function setValue(this: AndroidDriver, keys: string | string[], elementId: string): Promise<void>;
|
|
82
103
|
/**
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* @param
|
|
86
|
-
* @
|
|
104
|
+
* Replaces the value of an element.
|
|
105
|
+
*
|
|
106
|
+
* @param keys The text to set, either as a string or an array of strings (which will be joined).
|
|
107
|
+
* @param elementId The element identifier.
|
|
108
|
+
* @returns Promise that resolves when the value is replaced.
|
|
87
109
|
*/
|
|
88
|
-
export function replaceValue(this:
|
|
110
|
+
export declare function replaceValue(this: AndroidDriver, keys: string | string[], elementId: string): Promise<void>;
|
|
89
111
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* @param
|
|
93
|
-
* @
|
|
112
|
+
* Sets the value of an element immediately using ADB input.
|
|
113
|
+
*
|
|
114
|
+
* @param keys The text to set, either as a string or an array of strings (which will be joined).
|
|
115
|
+
* @param elementId The element identifier.
|
|
116
|
+
* @returns Promise that resolves when the value is set.
|
|
94
117
|
*/
|
|
95
|
-
export function setValueImmediate(this:
|
|
118
|
+
export declare function setValueImmediate(this: AndroidDriver, keys: string | string[], elementId: string): Promise<void>;
|
|
96
119
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
* @
|
|
120
|
+
* Gets the location of an element relative to the view.
|
|
121
|
+
*
|
|
122
|
+
* @param elementId The element identifier.
|
|
123
|
+
* @returns Promise that resolves to the element's position (x, y coordinates).
|
|
100
124
|
*/
|
|
101
|
-
export function getLocationInView(this:
|
|
125
|
+
export declare function getLocationInView(this: AndroidDriver, elementId: string): Promise<Position>;
|
|
102
126
|
//# sourceMappingURL=element.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../lib/commands/element.
|
|
1
|
+
{"version":3,"file":"element.d.ts","sourceRoot":"","sources":["../../../lib/commands/element.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,QAAQ,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,SAAS,CAAC;AAEnD;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,aAAa,EACnB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAExB;AAED;;;;;;GAMG;AACH,wBAAsB,KAAK,CACzB,IAAI,EAAE,aAAa,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;;;;;GAMG;AACH,wBAAsB,OAAO,CAC3B,IAAI,EAAE,aAAa,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,CAEjB;AAED;;;;;;GAMG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,aAAa,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,QAAQ,CAAC,CAEnB;AAED;;;;;;GAMG;AACH,wBAAsB,OAAO,CAC3B,IAAI,EAAE,aAAa,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;;;;GAKG;AACH,wBAAsB,OAAO,CAC3B,IAAI,E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CAMf;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,aAAa,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,QAAQ,CAAC,CAEnB"}
|
|
@@ -18,84 +18,99 @@ exports.setValueImmediate = setValueImmediate;
|
|
|
18
18
|
exports.getLocationInView = getLocationInView;
|
|
19
19
|
const driver_1 = require("appium/driver");
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
24
|
-
* @
|
|
21
|
+
* Gets an attribute value from an element.
|
|
22
|
+
*
|
|
23
|
+
* @param attribute The name of the attribute to retrieve.
|
|
24
|
+
* @param elementId The element identifier.
|
|
25
|
+
* @returns Promise that resolves to the attribute value, or `null` if not found.
|
|
26
|
+
* @throws {errors.NotImplementedError} This method is not implemented.
|
|
25
27
|
*/
|
|
26
28
|
async function getAttribute(attribute, elementId) {
|
|
27
29
|
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
28
30
|
}
|
|
29
31
|
/**
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* @
|
|
32
|
+
* Clicks on an element.
|
|
33
|
+
*
|
|
34
|
+
* @param elementId The element identifier.
|
|
35
|
+
* @returns Promise that resolves when the click is performed.
|
|
36
|
+
* @throws {errors.NotImplementedError} This method is not implemented.
|
|
33
37
|
*/
|
|
34
38
|
async function click(elementId) {
|
|
35
39
|
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
36
40
|
}
|
|
37
41
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* @
|
|
42
|
+
* Gets the text content of an element.
|
|
43
|
+
*
|
|
44
|
+
* @param elementId The element identifier.
|
|
45
|
+
* @returns Promise that resolves to the element's text content.
|
|
46
|
+
* @throws {errors.NotImplementedError} This method is not implemented.
|
|
41
47
|
*/
|
|
42
48
|
async function getText(elementId) {
|
|
43
49
|
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
44
50
|
}
|
|
45
51
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* @
|
|
52
|
+
* Gets the location of an element on the screen.
|
|
53
|
+
*
|
|
54
|
+
* @param elementId The element identifier.
|
|
55
|
+
* @returns Promise that resolves to the element's position (x, y coordinates).
|
|
56
|
+
* @throws {errors.NotImplementedError} This method is not implemented.
|
|
49
57
|
*/
|
|
50
58
|
async function getLocation(elementId) {
|
|
51
59
|
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
52
60
|
}
|
|
53
61
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* @
|
|
62
|
+
* Gets the size of an element.
|
|
63
|
+
*
|
|
64
|
+
* @param elementId The element identifier.
|
|
65
|
+
* @returns Promise that resolves to the element's size (width, height).
|
|
66
|
+
* @throws {errors.NotImplementedError} This method is not implemented.
|
|
57
67
|
*/
|
|
58
68
|
async function getSize(elementId) {
|
|
59
69
|
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
60
70
|
}
|
|
61
71
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* @
|
|
72
|
+
* Gets the class name of an element.
|
|
73
|
+
*
|
|
74
|
+
* @param elementId The element identifier.
|
|
75
|
+
* @returns Promise that resolves to the element's class name.
|
|
65
76
|
*/
|
|
66
77
|
async function getName(elementId) {
|
|
67
|
-
return
|
|
78
|
+
return await this.getAttribute('className', elementId);
|
|
68
79
|
}
|
|
69
80
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* @
|
|
81
|
+
* Checks if an element is displayed.
|
|
82
|
+
*
|
|
83
|
+
* @param elementId The element identifier.
|
|
84
|
+
* @returns Promise that resolves to `true` if the element is displayed, `false` otherwise.
|
|
73
85
|
*/
|
|
74
86
|
async function elementDisplayed(elementId) {
|
|
75
87
|
return (await this.getAttribute('displayed', elementId)) === 'true';
|
|
76
88
|
}
|
|
77
89
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
* @
|
|
90
|
+
* Checks if an element is enabled.
|
|
91
|
+
*
|
|
92
|
+
* @param elementId The element identifier.
|
|
93
|
+
* @returns Promise that resolves to `true` if the element is enabled, `false` otherwise.
|
|
81
94
|
*/
|
|
82
95
|
async function elementEnabled(elementId) {
|
|
83
96
|
return (await this.getAttribute('enabled', elementId)) === 'true';
|
|
84
97
|
}
|
|
85
98
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* @
|
|
99
|
+
* Checks if an element is selected.
|
|
100
|
+
*
|
|
101
|
+
* @param elementId The element identifier.
|
|
102
|
+
* @returns Promise that resolves to `true` if the element is selected, `false` otherwise.
|
|
89
103
|
*/
|
|
90
104
|
async function elementSelected(elementId) {
|
|
91
105
|
return (await this.getAttribute('selected', elementId)) === 'true';
|
|
92
106
|
}
|
|
93
107
|
/**
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* @param
|
|
97
|
-
* @param
|
|
98
|
-
* @
|
|
108
|
+
* Sets the value of an element.
|
|
109
|
+
*
|
|
110
|
+
* @param keys The text to set, either as a string or an array of strings (which will be joined).
|
|
111
|
+
* @param elementId The element identifier.
|
|
112
|
+
* @param replace If `true`, replaces the existing value. If `false`, appends to it. Defaults to `false`.
|
|
113
|
+
* @returns Promise that resolves when the value is set.
|
|
99
114
|
*/
|
|
100
115
|
async function setElementValue(keys, elementId, replace = false) {
|
|
101
116
|
const text = keys instanceof Array ? keys.join('') : keys;
|
|
@@ -106,53 +121,59 @@ async function setElementValue(keys, elementId, replace = false) {
|
|
|
106
121
|
});
|
|
107
122
|
}
|
|
108
123
|
/**
|
|
124
|
+
* Sets the value of an element.
|
|
125
|
+
*
|
|
109
126
|
* Reason for isolating doSetElementValue from setElementValue is for reusing setElementValue
|
|
110
127
|
* across android-drivers (like appium-uiautomator2-driver) and to avoid code duplication.
|
|
111
128
|
* Other android-drivers (like appium-uiautomator2-driver) need to override doSetElementValue
|
|
112
129
|
* to facilitate setElementValue.
|
|
113
130
|
*
|
|
114
|
-
* @
|
|
115
|
-
* @
|
|
116
|
-
* @
|
|
131
|
+
* @param params The parameters for setting the element value.
|
|
132
|
+
* @returns Promise that resolves when the value is set.
|
|
133
|
+
* @throws {errors.NotImplementedError} This method is not implemented.
|
|
117
134
|
*/
|
|
118
135
|
async function doSetElementValue(params) {
|
|
119
136
|
throw new driver_1.errors.NotImplementedError('Not implemented');
|
|
120
137
|
}
|
|
121
138
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* @param
|
|
125
|
-
* @
|
|
139
|
+
* Sets the value of an element (appends to existing value).
|
|
140
|
+
*
|
|
141
|
+
* @param keys The text to set, either as a string or an array of strings (which will be joined).
|
|
142
|
+
* @param elementId The element identifier.
|
|
143
|
+
* @returns Promise that resolves when the value is set.
|
|
126
144
|
*/
|
|
127
145
|
async function setValue(keys, elementId) {
|
|
128
146
|
return await this.setElementValue(keys, elementId, false);
|
|
129
147
|
}
|
|
130
148
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
* @param
|
|
134
|
-
* @
|
|
149
|
+
* Replaces the value of an element.
|
|
150
|
+
*
|
|
151
|
+
* @param keys The text to set, either as a string or an array of strings (which will be joined).
|
|
152
|
+
* @param elementId The element identifier.
|
|
153
|
+
* @returns Promise that resolves when the value is replaced.
|
|
135
154
|
*/
|
|
136
155
|
async function replaceValue(keys, elementId) {
|
|
137
156
|
return await this.setElementValue(keys, elementId, true);
|
|
138
157
|
}
|
|
139
158
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* @param
|
|
143
|
-
* @
|
|
159
|
+
* Sets the value of an element immediately using ADB input.
|
|
160
|
+
*
|
|
161
|
+
* @param keys The text to set, either as a string or an array of strings (which will be joined).
|
|
162
|
+
* @param elementId The element identifier.
|
|
163
|
+
* @returns Promise that resolves when the value is set.
|
|
144
164
|
*/
|
|
145
165
|
async function setValueImmediate(keys, elementId) {
|
|
146
166
|
const text = Array.isArray(keys) ? keys.join('') : keys;
|
|
147
167
|
// first, make sure we are focused on the element
|
|
148
168
|
await this.click(elementId);
|
|
149
169
|
// then send through adb
|
|
150
|
-
await this.adb.inputText(
|
|
170
|
+
await this.adb.inputText(text);
|
|
151
171
|
}
|
|
152
172
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
* @
|
|
173
|
+
* Gets the location of an element relative to the view.
|
|
174
|
+
*
|
|
175
|
+
* @param elementId The element identifier.
|
|
176
|
+
* @returns Promise that resolves to the element's position (x, y coordinates).
|
|
156
177
|
*/
|
|
157
178
|
async function getLocationInView(elementId) {
|
|
158
179
|
return await this.getLocation(elementId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element.js","sourceRoot":"","sources":["../../../lib/commands/element.
|
|
1
|
+
{"version":3,"file":"element.js","sourceRoot":"","sources":["../../../lib/commands/element.ts"],"names":[],"mappings":";AAAA,sDAAsD;;AAetD,oCAMC;AASD,sBAKC;AASD,0BAKC;AASD,kCAKC;AASD,0BAKC;AAQD,0BAKC;AAQD,4CAKC;AAQD,wCAKC;AAQD,0CAKC;AAUD,0CAYC;AAcD,8CAKC;AASD,4BAMC;AASD,oCAMC;AASD,8CAUC;AAQD,8CAKC;AAtOD,0CAAqC;AAKrC;;;;;;;GAOG;AACI,KAAK,UAAU,YAAY,CAEhC,SAAiB,EACjB,SAAiB;IAEjB,MAAM,IAAI,eAAM,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,KAAK,CAEzB,SAAiB;IAEjB,MAAM,IAAI,eAAM,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,OAAO,CAE3B,SAAiB;IAEjB,MAAM,IAAI,eAAM,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,W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;GAWG;AACI,KAAK,UAAU,iBAAiB,CAErC,MAA6B;IAE7B,MAAM,IAAI,eAAM,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,QAAQ,CAE5B,IAAuB,EACvB,SAAiB;IAEjB,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;AAC5D,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,YAAY,CAEhC,IAAuB,EACvB,SAAiB;IAEjB,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;AAC3D,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,iBAAiB,CAErC,IAAuB,EACvB,SAAiB;IAEjB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACxD,iDAAiD;IACjD,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC5B,wBAAwB;IACxB,MAAM,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,iBAAiB,CAErC,SAAiB;IAEjB,OAAO,MAAM,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -39,13 +39,6 @@ export declare function mobileStopLogsBroadcast(this: AndroidDriver): Promise<vo
|
|
|
39
39
|
* @returns Promise that resolves to an array of log type names.
|
|
40
40
|
*/
|
|
41
41
|
export declare function getLogTypes(this: AndroidDriver): Promise<string[]>;
|
|
42
|
-
export interface BiDiListenerProperties {
|
|
43
|
-
type: string;
|
|
44
|
-
srcEventName?: string;
|
|
45
|
-
context?: string;
|
|
46
|
-
entryTransformer?: (x: LogEntry) => LogEntry;
|
|
47
|
-
}
|
|
48
|
-
export type LogListener = (logEntry: LogEntry) => any;
|
|
49
42
|
/**
|
|
50
43
|
* Assigns a BiDi log listener to an event emitter.
|
|
51
44
|
*
|
|
@@ -64,4 +57,11 @@ export declare function assignBiDiLogListener<EE extends EventEmitter>(this: And
|
|
|
64
57
|
* @returns Promise that resolves to the logs for the specified type.
|
|
65
58
|
*/
|
|
66
59
|
export declare function getLog(this: AndroidDriver, logType: string): Promise<any>;
|
|
60
|
+
export interface BiDiListenerProperties {
|
|
61
|
+
type: string;
|
|
62
|
+
srcEventName?: string;
|
|
63
|
+
context?: string;
|
|
64
|
+
entryTransformer?: (x: LogEntry) => LogEntry;
|
|
65
|
+
}
|
|
66
|
+
export type LogListener = (logEntry: LogEntry) => any;
|
|
67
67
|
//# sourceMappingURL=log.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../../lib/commands/log.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AAG9C,OAAO,EAIL,KAAK,QAAQ,EACd,MAAM,UAAU,CAAC;AAIlB,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,WAAW,CAAC;AAE7C,eAAO,MAAM,iBAAiB;;;gCAGX,aAAa;;;;gCAIP,aAAa;;;;gCAQnB,aAAa;;CAKtB,CAAC;AAEX;;;;;;;;;GASG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,IAAI,CAAC,CAsDf;AAED;;;;;GAKG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,IAAI,CAAC,CAYf;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,MAAM,EAAE,CAAC,CAQnB;AAED,
|
|
1
|
+
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 @@ async function getLog(logType) {
|
|
|
168
168
|
* @returns The websocket endpoint path.
|
|
169
169
|
*/
|
|
170
170
|
const WEBSOCKET_ENDPOINT = (sessionId) => `${driver_1.DEFAULT_WS_PATHNAME_PREFIX}/session/${sessionId}/appium/device/logcat`;
|
|
171
|
-
// #endregion
|
|
172
171
|
//# sourceMappingURL=log.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../../lib/commands/log.ts"],"names":[],"mappings":";;;;;;AAmDA,4DAwDC;AAQD,0DAcC;AAOD,kCAUC;
|
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../../lib/commands/log.ts"],"names":[],"mappings":";;;;;;AAmDA,4DAwDC;AAQD,0DAcC;AAOD,kCAUC;AAYD,sDAiBC;AAQD,wBAQC;AA/LD,0CAAqE;AACrE,oDAAuB;AACvB,sDAAyB;AACzB,4CAA2B;AAK3B,oCAKkB;AAClB,+CAA+C;AAC/C,gDAAmD;AACnD,0CAAuD;AAG1C,QAAA,iBAAiB,GAAG;IAC/B,MAAM,EAAE;QACN,WAAW,EAAE,oEAAoE;QACjF,MAAM,EAAE,CAAC,IAAmB,EAAE,EAAE,CAAE,IAAI,CAAC,GAAW,CAAC,aAAa,EAAE;KACnE;IACD,SAAS,EAAE;QACT,WAAW,EAAE,uDAAuD;QACpE,MAAM,EAAE,KAAK,EAAE,IAAmB,EAAE,EAAE;YACpC,MAAM,MAAM,GAAG,MAAO,IAAI,CAAC,GAAW,CAAC,SAAS,EAAE,CAAC;YACnD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YAC7B,OAAO,MAAM,CAAC,KAAK,CAAC,iBAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mBAAW,EAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;QACpE,CAAC;KACF;IACD,MAAM,EAAE;QACN,WAAW,E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,CAAC;IACf,MAAM,QAAQ,GAAgB,CAAC,QAAkB,EAAE,EAAE;QACnD,MAAM,UAAU,GAAG,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC5E,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,2BAAe,EAAE,IAAA,+BAAsB,EAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IAC7F,CAAC,CAAC;IACF,UAAU,CAAC,EAAE,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACtC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,MAAM,CAE1B,OAAe;IAEf,IAAI,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,gBAAC,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7E,OAAO,MAAO,IAAI,CAAC,YAA6B,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC,CAAC;IACpG,CAAC;IACD,OAAO,MAAM,mBAAU,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/D,CAAC;AAED,2BAA2B;AAE3B;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAU,EAAE,CACvD,GAAG,mCAA0B,YAAY,SAAS,uBAAuB,CAAC"}
|
|
@@ -1,56 +1,52 @@
|
|
|
1
|
+
import type { HTTPMethod, StringRecord } from '@appium/types';
|
|
2
|
+
import type { AndroidDriver } from '../driver';
|
|
3
|
+
import type { FormFields } from './types';
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
5
|
+
* Starts media projection-based screen recording on the Android device.
|
|
6
|
+
*
|
|
7
|
+
* @param resolution Maximum supported resolution on-device (Detected automatically by the app
|
|
4
8
|
* itself), which usually equals to Full HD 1920x1080 on most phones however
|
|
5
9
|
* you can change it to following supported resolutions as well: "1920x1080",
|
|
6
10
|
* "1280x720", "720x480", "320x240", "176x144".
|
|
7
|
-
* @param
|
|
11
|
+
* @param priority Recording thread priority.
|
|
8
12
|
* If you face performance drops during testing with recording enabled, you
|
|
9
|
-
* can reduce recording priority
|
|
10
|
-
*
|
|
11
|
-
* @param {number} [maxDurationSec] Maximum allowed duration is 15 minutes; you can increase it if your test
|
|
13
|
+
* can reduce recording priority. 'high' by default.
|
|
14
|
+
* @param maxDurationSec Maximum allowed duration is 15 minutes; you can increase it if your test
|
|
12
15
|
* takes longer than that. 900s by default.
|
|
13
|
-
* @param
|
|
16
|
+
* @param filename You can type recording video file name as you want, but recording currently
|
|
14
17
|
* supports only "mp4" format so your filename must end with ".mp4". An
|
|
15
18
|
* invalid file name will fail to start the recording. If not provided then
|
|
16
19
|
* the current timestamp will be used as file name.
|
|
17
|
-
* @returns
|
|
20
|
+
* @returns Promise that resolves to `true` if recording was started, `false` if another recording is already in progress.
|
|
18
21
|
*/
|
|
19
|
-
export function mobileStartMediaProjectionRecording(this:
|
|
22
|
+
export declare function mobileStartMediaProjectionRecording(this: AndroidDriver, resolution?: string, priority?: 'high' | 'normal' | 'low', maxDurationSec?: number, filename?: string): Promise<boolean>;
|
|
20
23
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
24
|
+
* Checks if media projection recording is currently running.
|
|
25
|
+
*
|
|
26
|
+
* @returns Promise that resolves to `true` if recording is running, `false` otherwise.
|
|
23
27
|
*/
|
|
24
|
-
export function mobileIsMediaProjectionRecordingRunning(this:
|
|
28
|
+
export declare function mobileIsMediaProjectionRecordingRunning(this: AndroidDriver): Promise<boolean>;
|
|
25
29
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
30
|
+
* Stops the media projection recording and returns the recorded video.
|
|
31
|
+
*
|
|
32
|
+
* @param remotePath The path to the remote location, where the resulting video should be
|
|
28
33
|
* uploaded. The following protocols are supported: http/https, ftp. Null or
|
|
29
34
|
* empty string value (the default setting) means the content of resulting
|
|
30
|
-
* file should be encoded as Base64 and passed as the
|
|
35
|
+
* file should be encoded as Base64 and passed as the endpoint response value.
|
|
31
36
|
* An exception will be thrown if the generated media file is too big to fit
|
|
32
37
|
* into the available process memory.
|
|
33
|
-
* @param
|
|
34
|
-
* @param
|
|
35
|
-
* @param
|
|
36
|
-
*
|
|
37
|
-
* @param
|
|
38
|
-
* @param {string} [fileFieldName] The name of the form field, where the file content BLOB should be stored
|
|
38
|
+
* @param user The name of the user for the remote authentication.
|
|
39
|
+
* @param pass The password for the remote authentication.
|
|
40
|
+
* @param method The http multipart upload method name. 'PUT' by default.
|
|
41
|
+
* @param headers Additional headers mapping for multipart http(s) uploads.
|
|
42
|
+
* @param fileFieldName The name of the form field, where the file content BLOB should be stored
|
|
39
43
|
* for http(s) uploads. 'file' by default.
|
|
40
|
-
* @param
|
|
41
|
-
* @param
|
|
42
|
-
* Defaults to `@appium/support.net.DEFAULT_TIMEOUT_MS
|
|
43
|
-
* @returns
|
|
44
|
+
* @param formFields Additional form fields for multipart http(s) uploads.
|
|
45
|
+
* @param uploadTimeout The actual media upload request timeout in milliseconds.
|
|
46
|
+
* Defaults to `@appium/support.net.DEFAULT_TIMEOUT_MS`.
|
|
47
|
+
* @returns Promise that resolves to the recorded video as a base64-encoded string
|
|
48
|
+
* if `remotePath` is not provided, or an empty string if the video was uploaded to a remote location.
|
|
49
|
+
* @throws {Error} If no recent recording was found.
|
|
44
50
|
*/
|
|
45
|
-
export function mobileStopMediaProjectionRecording(this:
|
|
46
|
-
export type UploadOptions = {
|
|
47
|
-
user?: string | undefined;
|
|
48
|
-
pass?: string | undefined;
|
|
49
|
-
method?: import("@appium/types").HTTPMethod | undefined;
|
|
50
|
-
headers?: import("@appium/types").StringRecord<any> | undefined;
|
|
51
|
-
fileFieldName?: string | undefined;
|
|
52
|
-
formFields?: import("./types").FormFields | undefined;
|
|
53
|
-
uploadTimeout?: number | undefined;
|
|
54
|
-
};
|
|
55
|
-
export type ADB = import("appium-adb").ADB;
|
|
51
|
+
export declare function mobileStopMediaProjectionRecording(this: AndroidDriver, remotePath?: string, user?: string, pass?: string, method?: HTTPMethod, headers?: StringRecord, fileFieldName?: string, formFields?: FormFields, uploadTimeout?: number): Promise<string>;
|
|
56
52
|
//# sourceMappingURL=media-projection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-projection.d.ts","sourceRoot":"","sources":["../../../lib/commands/media-projection.
|
|
1
|
+
{"version":3,"file":"media-projection.d.ts","sourceRoot":"","sources":["../../../lib/commands/media-projection.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,WAAW,CAAC;AAE7C,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AAOxC;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,mCAAmC,CACvD,IAAI,EAAE,aAAa,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,EACpC,cAAc,CAAC,EAAE,MAAM,EACvB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,CAAC,CAmBlB;AAED;;;;GAIG;AACH,wBAAsB,uCAAuC,CAC3D,IAAI,EAAE,aAAa,GAClB,OAAO,CAAC,OAAO,CAAC,CAKlB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,kCAAkC,CACtD,IAAI,EAAE,aAAa,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,YAAY,EACtB,aAAa,CAAC,EAAE,MAAM,EACtB,UAAU,CAAC,EAAE,UAAU,EACvB,aAAa,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC,MAAM,CAAC,CAiCjB"}
|