How can I click "Allow" in the pop up using Selenium with java? There is no way to inspect this pop up so I don't know the id, or name or xpath.

enter image description here


This is not an alert. This is a browser level notification.

Try these:

  1. How to handle browser level notification using Selenium Webdriver

  2. How to Disable Chrome notifications popup in Selenium WebDriver


Use below code to allow :

driver.switchTo().alert().accept(); //This will allow the access

To block the access use below code :

  • Thank you but is not working, I tried allowing that is what I need and the pop up is being displayed and in the Eclipse console I am receiving this message: Exception in thread "main" org.openqa.selenium.NoAlertPresentException: no alert open (Session info: chrome=66.0.3359.181) (Driver info: chromedriver=2.37.544337 (8c0344a12e552148c185f7d5117db1f28d6c9e85),platform=Mac OS X 10.13.4 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:33:08.63 – ArturoM May 30 '18 at 12:12
  • Yes this is not a alert. try the below comment – Prasanna venkatesh May 30 '18 at 13:09

There is currently no support for permissions prompts in WebDriver, though there is a draft of an endpoint to control them (as of writing, I believe no WebDriver implementation exposes them, and there is no Selenium API for them).


Firefox profiles are to blame. I suggest creating and configuring a profile for Selenium to use that suits your needs.

See: https://stackoverflow.com/questions/21310797/using-selenium-webdriver-and-python-how-do-i-suppress-the-prompt-to-share-my-ca

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.