Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove duplicated mobile: backgroundApp definition from uia2 #871

Merged
merged 1 commit into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions lib/commands/app-management.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,6 @@ export async function mobileInstallMultipleApks(apks, options) {
await this.adb.installMultipleApks(configuredApks, options);
}

/**
* Puts the app to background and waits the given number of seconds then restores the app
* if necessary. The call is blocking.
*
* @this {AndroidUiautomator2Driver}
* @param {number} [seconds=-1] The amount of seconds to wait between putting the app to background and restoring it.
* Any negative value means to not restore the app after putting it to background.
* @returns {Promise<void>}
*/
export async function mobileBackgroundApp(seconds = -1) {
await this.background(seconds);
}

/**
* @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
*/
Expand Down
2 changes: 0 additions & 2 deletions lib/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ import {
} from './commands/alert';
import {
mobileInstallMultipleApks,
mobileBackgroundApp,
} from './commands/app-management';
import {
mobileGetBatteryInfo,
Expand Down Expand Up @@ -1010,7 +1009,6 @@ class AndroidUiautomator2Driver
postDismissAlert = postDismissAlert;

mobileInstallMultipleApks = mobileInstallMultipleApks;
mobileBackgroundApp = mobileBackgroundApp;

mobileGetBatteryInfo = mobileGetBatteryInfo;

Expand Down
7 changes: 0 additions & 7 deletions lib/execute-method-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,6 @@ export const executeMethodMap = {
}
},

'mobile: backgroundApp': {
command: 'mobileBackgroundApp',
params: {
optional: ['seconds'],
}
},

'mobile: pressKey': {
command: 'mobilePressKey',
params: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
},
"dependencies": {
"appium-adb": "^12.12.0",
"appium-android-driver": "^10.2.2",
"appium-android-driver": "^10.2.3",
"appium-uiautomator2-server": "^7.2.0",
"asyncbox": "^3.0.0",
"axios": "^1.6.5",
Expand Down