Skip to content

Commit 1602c51

Browse files
authored
chore: remove duplicated mobile: backgroundApp definition from uia2 (#871)
1 parent c93f4f7 commit 1602c51

File tree

4 files changed

+1
-23
lines changed

4 files changed

+1
-23
lines changed

lib/commands/app-management.js

-13
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,6 @@ export async function mobileInstallMultipleApks(apks, options) {
2222
await this.adb.installMultipleApks(configuredApks, options);
2323
}
2424

25-
/**
26-
* Puts the app to background and waits the given number of seconds then restores the app
27-
* if necessary. The call is blocking.
28-
*
29-
* @this {AndroidUiautomator2Driver}
30-
* @param {number} [seconds=-1] The amount of seconds to wait between putting the app to background and restoring it.
31-
* Any negative value means to not restore the app after putting it to background.
32-
* @returns {Promise<void>}
33-
*/
34-
export async function mobileBackgroundApp(seconds = -1) {
35-
await this.background(seconds);
36-
}
37-
3825
/**
3926
* @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
4027
*/

lib/driver.ts

-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ import {
5353
} from './commands/alert';
5454
import {
5555
mobileInstallMultipleApks,
56-
mobileBackgroundApp,
5756
} from './commands/app-management';
5857
import {
5958
mobileGetBatteryInfo,
@@ -1010,7 +1009,6 @@ class AndroidUiautomator2Driver
10101009
postDismissAlert = postDismissAlert;
10111010

10121011
mobileInstallMultipleApks = mobileInstallMultipleApks;
1013-
mobileBackgroundApp = mobileBackgroundApp;
10141012

10151013
mobileGetBatteryInfo = mobileGetBatteryInfo;
10161014

lib/execute-method-map.ts

-7
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,6 @@ export const executeMethodMap = {
214214
}
215215
},
216216

217-
'mobile: backgroundApp': {
218-
command: 'mobileBackgroundApp',
219-
params: {
220-
optional: ['seconds'],
221-
}
222-
},
223-
224217
'mobile: pressKey': {
225218
command: 'mobilePressKey',
226219
params: {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
},
5858
"dependencies": {
5959
"appium-adb": "^12.12.0",
60-
"appium-android-driver": "^10.2.2",
60+
"appium-android-driver": "^10.2.3",
6161
"appium-uiautomator2-server": "^7.2.0",
6262
"asyncbox": "^3.0.0",
6363
"axios": "^1.6.5",

0 commit comments

Comments
 (0)