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

autoGrantPermissions is not working for Chrome on Android #10008

Closed
sajidcosmo opened this issue Jan 17, 2018 · 3 comments
Closed

autoGrantPermissions is not working for Chrome on Android #10008

sajidcosmo opened this issue Jan 17, 2018 · 3 comments
Labels
Mobile Chrome related to mobile Chrome driver ThirdParty upstream problems

Comments

@sajidcosmo
Copy link

The problem

autoGrantPermissions is not working for Chrome on Android.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.7.1
  • Last Appium version that did not exhibit the issue (if applicable): N/A
  • Desktop OS/version used to run Appium: MAC OS X 10.12.6
  • Node.js version (unless using Appium.app|exe): 9.3.0
  • Mobile platform/version under test: Android 6.0.1
  • Real device or emulator/simulator: OPPO A57 Real Device
  • Appium CLI or Appium.app|exe: Appium CLI

Details

I am trying to test a video conferencing website using appium on Chrome on Android. The site requires permission to use microphone and camera. I am providing autoGrantPermissions = true in my capabilities. It simply is not working for me.

Additional Digging:

I digged into appium-adb and found out that if I use await this.grantPermissions(); after setupNewChromedriver in startChromeSession in driver.js then I can be able to see all the permissions granted to chrome but to no effect in the test. To my understanding the permissions should be granted somewhere in the middle of setupNewChromedriver function to make it for this case.

@mykola-mokhnach
Copy link
Collaborator

autoGrantPermissions capability grants Android system permissions for a newly installed application on global level. This won't work for Chrome. Check if mobile driver for chrome itself provides any internal capabilities to handle such requests, since this behaviour cannot be controlled form Appium directly

@mykola-mokhnach mykola-mokhnach added Mobile Chrome related to mobile Chrome driver ThirdParty upstream problems labels Jan 17, 2018
@sajidcosmo
Copy link
Author

What I have seen with autoGrantPermissions, appium runs adb commands to get the permissions, that is totally out of scope of chrome driver. Is there any capability that stops appium resetting the permissions of chrome before launching it?

@lock
Copy link

lock bot commented Apr 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Mobile Chrome related to mobile Chrome driver ThirdParty upstream problems
Projects
None yet
Development

No branches or pull requests

2 participants