Appium 1.8.0 does not use specified Android appActivity to bring application to front
See original GitHub issueThe problem
Appium does not use appActivity
I specified in desired caps to bring application from background, always uses .activity.MainActivity
instead.
Environment
- Appium version (or git revision) that exhibits the issue: 1.8.0
- Desktop OS/version used to run Appium: Linux x86-64
- Mobile platform/version under test: Android 6.0.1
- Real device or emulator/simulator: Samsung Galaxy S5
- Appium CLI or Appium.app|exe: Appium Desktop 1.6.0
Details
The application I am testing has specified different activity as launcher. I already specified appActivity: .activity.setup.WelcomeActivity
in desired capabilities and indeed this activity is properly used when starting application. But calling driver.background_app()
I get “The permission to start ‘.activity.MainActivity’ activity has been denied.Make sure the activity/package names are correct.” error when driver tries to bring application back to front (I am using Python client but this should not be relevant here).
Link to Appium logs
https://gist.github.com/zgoda-mobica/bb8e158a9db003de6e6ad4134fa2c942
Issue Analytics
- State:
- Created 5 years ago
- Comments:12
Top Results From Across the Web
Appium Native app throws - Returned value cannot be ...
Hi, while trying to automate native app for android, I'm facing the following ... element could not be located on the page using...
Read more >Desired Capabilities - Appium
Appium will attempt to install this app binary on the appropriate device first. Note that this capability is not required for Android if...
Read more >Want to take application back in foreground - Appium Discuss
Hi, I have 2 applications. I want to perform some activity on first application. Move the first application in background.
Read more >I'm unable to set package and activity in the appium
In the new version of Appium exe app, the app activity and package are identified by Appium to make ... Using AndroidDriver<WebElement> to...
Read more >Getting app back to life from background - Appium Discuss
Unlock/Active the phone and run again (from last acitivity) app to foreground. I have tried with Thread.sleep (yes I know it is not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
the improvement has been merged to appium@beta
Actually, yoy can try a workaround even with the current build. Just call background with -1 duration to leave the app there and then call
activateApp
with the actual application id in order to restore it.