question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

driver.activate_app() referencing entirely different app from driver.terminate_app() [Android Samsung]

See original GitHub issue

My tests involves rebooting the app in which I use

self._driver.terminate_app('com.xxx.xxx.debug')
self._driver.activate_app('com.xxx.xxx.debug')

terminate_app works completely fine, it will close the app under test as expected. But running activate_app for some reason, opens the native Pictures app (Samsung Gallery)! There’s no way these apps have the same package name so I’m very very confused.

Environment

  • Appium v2.0.0-beta.40
  • uiautomator2@2.4.0
  • Mac OS
  • Samsung S21 - Android 12 - real device

Link to Appium logs

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
tking16commented, Jul 5, 2022

@mykola-mokhnach Thanks a lot, the patch update is opening the correct app now 😌

0reactions
mykola-mokhnachcommented, Jul 5, 2022

I’ve added a patch, which makes the driver to use another strategy for activity detection if the above result is returned. The patch is available in uia2 v 2.4.1+

Read more comments on GitHub >

github_iconTop Results From Across the Web

Terminate App - Appium
Terminate App ; Example Usage; Description; Support; Appium Server; Appium Clients ... driver.terminateApp('com.apple.Preferences'); driver.
Read more >
java - How to fix driver.activateApp() resulting in adb error ...
I have a project in Java using Appium to test a native iOS and Android app. The app is a complete new version...
Read more >
Top Appium Commands every Developer must know
As a mobile developer, it's important to know the most popular Appium commands. Read this article to learn the top Appium commands.
Read more >
Appium Tutorial to Automate Inbuilt Mobile Features - Codoid
Are you looking for an Appium Tutorial to automate the inbuilt features of the device you are testing? Look no further and continue...
Read more >
How do I switch from my app to another native app in a mobile ...
The below examples are both for iOS, but a similar rationale would be used ... driver.activateApp('com.apple.camera'); // Opens Camera app
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found