Click Allow on Show Notifications popup using Selenium Webdriver

0 votes

I'm trying to login to Facebook. After a successful login, I get a browser popup:

Can I click Allow and proceed forward using selenium webdriver?

Jun 20, 2018 in Selenium by Martin
• 4,210 points
2,928 views
sorry no allow this code because i am using
Can you please be little more specific? Can't really understand what you're trying to say.

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+1 vote

Create a instance of ChromeOptions class

ChromeOptions options = new ChromeOptions();

Then Add chrome switch to disable notification - "--disable-notifications"

options.addArguments("--disable-notifications");

After that set path for driver exe

System.setProperty("webdriver.chrome.driver","path/to/driver/exe");

and then pass ChromeOptions instance to ChromeDriver Constructor

WebDriver driver =new ChromeDriver(options);

answered Jun 20, 2018 by Samarpit
• 5,130 points
But the request is not to disable notifications. The request is to click "Allow".
@pinkninjatester, unfortunately there is no option to do that. Because the above subject is not treated as a browser popup, but infact it is treated as a browser notification.

Disabling this notification should hopefully solve your problem as the execution will continues without any hindrance. Let me know if anything otherwise happens :)

Related Questions In Selenium

0 votes
1 answer

Double click a record in a grid using Selenium webdriver

Try Actions class to perform this Actions action ...READ MORE

answered Mar 29, 2018 in Selenium by Damon Salvatore
• 5,250 points
578 views
0 votes
1 answer

Handling calendar popup using Selenium WebDriver

You are selecting wrongly your elements in ...READ MORE

answered Apr 17, 2018 in Selenium by Shubham
• 12,030 points
938 views
+2 votes
1 answer

How can we handle authentication popup in Selenium WebDriver using Java

The Alert Method, authenticateUsing() lets us skip ...READ MORE

answered Apr 18, 2018 in Selenium by king_kenny
• 3,590 points
2,743 views
0 votes
1 answer

30 min Wait on a page and then perform any Operation using Selenium Webdriver

Implicit wait tells webdriver to poll the ...READ MORE

answered Apr 19, 2018 in Selenium by Shubham
• 12,030 points
67 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,030 points
51 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
413 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
40 views
0 votes
1 answer

Wait until page loads before click() using Selenium Webdriver

Change the following guestlogin_button = wait.until(EC.visibility_of_element_located((By.id, ".ch4_loginGuestBtn"))) to guestlogin_button = ...READ MORE

answered Aug 8, 2018 in Selenium by Samarpit
• 5,130 points
117 views
0 votes
1 answer

Firefox browser not opening with given URL using Selenium Webdriver with Java

Download the latest selenium jar and replace ...READ MORE

answered Apr 30, 2018 in Selenium by Samarpit
• 5,130 points
1,499 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.