-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
[Question] Does anyone know how to get rid of Chrome push notifications popup before starting tests on Android Emulator #811
Comments
I am looking for solution this as well, I reset the chrome browser on real android device after each test execution via ADB shell command and then on the next test execution I get this popup which needs to be manually closed before i can interact with the webpage in chrome browser. @mykola-mokhnach Perhaps you know if there is a way to bypass this popup on android devices? maybe there is some chrome option |
|
Thank so so much for the hint. I tried with the following permission https://developer.android.com/reference/android/Manifest.permission#POST_NOTIFICATIONS and it worked for me. After the driver session is created, I execued below script which made chrome not to display this Notifications popup on fresh chrome launch. All the other permissions from app under test are not impacted by this, since in this case the app under test is different from chrome. Command//Java code
((JavascriptExecutor) driver).executeScript("mobile: changePermissions", ImmutableMap.of(
"permissions", new String[]{"android.permission.POST_NOTIFICATIONS"}
,"appPackage", "com.android.chrome"
,"action", "grant"
)); Appium Logs:
@KazuCocoa Not sure if this is indeed the correct way to deal with this problem, but it worked for me so this issue may be closed. Note: Also I did not pass any server flag like @pawlakmaly Please verify if this solution works for you as well. |
Yes, the method looks correct way. Basically the popup is managed by System's config (permission related), so this is not the same with Desktop's chrome. |
Hi all,
I want to get rid of this

Which is displayed displayed every time I restart/recreate my emulator in docker.
I was able to bypass the welcome screen using '--disable-fre' flag. I've tried different flags as well, but with any success.
Does any one know how to do dat using adb, capabilities or or any other method that requires clicking ?
The text was updated successfully, but these errors were encountered: