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

fix: add backgroundApp #988

Merged
merged 4 commits into from
Mar 17, 2025
Merged

fix: add backgroundApp #988

merged 4 commits into from
Mar 17, 2025

Conversation

KazuCocoa
Copy link
Member

@KazuCocoa KazuCocoa commented Mar 17, 2025

Espresso driver missed this background app right now.

https://github.com/appium/appium-espresso-driver?tab=readme-ov-file#mobile-backgroundapp

Past implementation in espresso driver is the same as uia2's one, so this android driver can have it and both drivers refer to this.

I'll remove uia2's current method as redundant after this

lib/driver.ts Outdated
@@ -413,6 +413,7 @@ class AndroidDriver
activateApp = activateApp;
queryAppState = queryAppState;
isAppInstalled = isAppInstalled;
mobileBackgroundApp = background;
Copy link
Contributor

@mykola-mokhnach mykola-mokhnach Mar 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mobileBackgroundApp and background definitions are not the same. mobileBackgroundApp sets the background argument to -1 by default, which changes the behavior

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right (default one)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added as a new mobile command: 2a847cf

@mykola-mokhnach
Copy link
Contributor

I assume after this update is published we don't need to do anything explicit in espresso driver except of the package bump. For UIA2 though we'd need to remove duplicated method definitions.

@KazuCocoa KazuCocoa merged commit a6424cc into master Mar 17, 2025
8 checks passed
@KazuCocoa KazuCocoa deleted the background branch March 17, 2025 08:46
github-actions bot pushed a commit that referenced this pull request Mar 17, 2025
## [10.2.3](v10.2.2...v10.2.3) (2025-03-17)

### Bug Fixes

* add backgroundApp ([#988](#988)) ([a6424cc](a6424cc))
Copy link

🎉 This PR is included in version 10.2.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants