appium-uiautomator2-driver 6.7.4 → 6.7.6
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 +12 -0
- package/build/lib/commands/element.d.ts +35 -69
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +35 -84
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/gestures.d.ts +24 -189
- package/build/lib/commands/gestures.d.ts.map +1 -1
- package/build/lib/commands/gestures.js +14 -204
- package/build/lib/commands/gestures.js.map +1 -1
- package/build/lib/commands/misc.d.ts +15 -35
- package/build/lib/commands/misc.d.ts.map +1 -1
- package/build/lib/commands/misc.js +11 -30
- package/build/lib/commands/misc.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/lib/commands/element.ts +151 -0
- package/lib/commands/gestures.ts +234 -0
- package/lib/commands/misc.ts +63 -0
- package/npm-shrinkwrap.json +17 -47
- package/package.json +2 -2
- package/lib/commands/element.js +0 -261
- package/lib/commands/gestures.js +0 -446
- package/lib/commands/misc.js +0 -109
package/lib/commands/misc.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @this {AndroidUiautomator2Driver}
|
|
3
|
-
* @returns {Promise<string>}
|
|
4
|
-
*/
|
|
5
|
-
export async function getPageSource() {
|
|
6
|
-
return String(
|
|
7
|
-
await this.uiautomator2.jwproxy.command(
|
|
8
|
-
'/source',
|
|
9
|
-
'GET',
|
|
10
|
-
{}
|
|
11
|
-
)
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @this {AndroidUiautomator2Driver}
|
|
17
|
-
* @returns {Promise<import('@appium/types').Orientation>}
|
|
18
|
-
*/
|
|
19
|
-
export async function getOrientation() {
|
|
20
|
-
return /** @type {import('@appium/types').Orientation} */ (
|
|
21
|
-
await this.uiautomator2.jwproxy.command(
|
|
22
|
-
`/orientation`,
|
|
23
|
-
'GET',
|
|
24
|
-
{}
|
|
25
|
-
)
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @this {AndroidUiautomator2Driver}
|
|
31
|
-
* @param {import('@appium/types').Orientation} orientation
|
|
32
|
-
* @returns {Promise<void>}
|
|
33
|
-
*/
|
|
34
|
-
export async function setOrientation(orientation) {
|
|
35
|
-
orientation = /** @type {import('@appium/types').Orientation} */ (orientation.toUpperCase());
|
|
36
|
-
await this.uiautomator2.jwproxy.command(
|
|
37
|
-
`/orientation`,
|
|
38
|
-
'POST',
|
|
39
|
-
{orientation}
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @this {AndroidUiautomator2Driver}
|
|
45
|
-
* @returns {Promise<void>}
|
|
46
|
-
*/
|
|
47
|
-
export async function openNotifications() {
|
|
48
|
-
await this.uiautomator2.jwproxy.command(
|
|
49
|
-
'/appium/device/open_notifications',
|
|
50
|
-
'POST',
|
|
51
|
-
{}
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Stop proxying to any Chromedriver and redirect to uiautomator2
|
|
57
|
-
* @this {AndroidUiautomator2Driver}
|
|
58
|
-
* @returns {void}
|
|
59
|
-
*/
|
|
60
|
-
export function suspendChromedriverProxy() {
|
|
61
|
-
if (!this.uiautomator2?.proxyReqRes || !this.uiautomator2?.proxyCommand) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
this.chromedriver = undefined;
|
|
66
|
-
this.proxyReqRes = this.uiautomator2.proxyReqRes.bind(
|
|
67
|
-
this.uiautomator2
|
|
68
|
-
);
|
|
69
|
-
this.proxyCommand = /** @type {typeof this.proxyCommand} */ (
|
|
70
|
-
this.uiautomator2.proxyCommand.bind(this.uiautomator2)
|
|
71
|
-
);
|
|
72
|
-
this.jwpProxyActive = true;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* The list of available info entries can be found at
|
|
77
|
-
* https://github.com/appium/appium-uiautomator2-server/blob/master/app/src/main/java/io/appium/uiautomator2/handler/GetDeviceInfo.java
|
|
78
|
-
* @this {AndroidUiautomator2Driver}
|
|
79
|
-
* @returns {Promise<StringRecord>}
|
|
80
|
-
*/
|
|
81
|
-
export async function mobileGetDeviceInfo() {
|
|
82
|
-
return /** @type {StringRecord} */ (
|
|
83
|
-
await this.uiautomator2.jwproxy.command(
|
|
84
|
-
'/appium/device/info',
|
|
85
|
-
'GET'
|
|
86
|
-
)
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Resets the accessibility cache on the device.
|
|
92
|
-
* This can be useful when the accessibility service cache becomes stale
|
|
93
|
-
* and needs to be refreshed to reflect the current UI state.
|
|
94
|
-
* @this {AndroidUiautomator2Driver}
|
|
95
|
-
* @returns {Promise<void>}
|
|
96
|
-
*/
|
|
97
|
-
export async function mobileResetAccessibilityCache() {
|
|
98
|
-
await this.uiautomator2.jwproxy.command(
|
|
99
|
-
'/appium/reset_ax_cache',
|
|
100
|
-
'POST',
|
|
101
|
-
{}
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* @template [T=any]
|
|
107
|
-
* @typedef {import('@appium/types').StringRecord<T>} StringRecord
|
|
108
|
-
* @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
|
|
109
|
-
*/
|