Geo-location microphone camera pop up

0 votes

I'm not able to click on Allow button of access camera authentication pop up.

Have a look of pop up .here

May 11, 2018 in Selenium by Martin
• 4,340 points
2,765 views

1 answer to this question.

0 votes

To Allow or Block the notification, access using Selenium and you have to use ChromeOptions Class:

Below will help you

from selenium import webdriver

from selenium.webdriver.chrome.options import Options


opt = Options()

opt.add_argument("--disable-infobars")

opt.add_argument("start-maximized")

opt.add_argument("--disable-extensions")

# Pass the argument 1 to allow and 2 to block

opt.add_experimental_option("prefs", { \

    "profile.default_content_setting_values.media_stream_mic": 1, 

    "profile.default_content_setting_values.media_stream_camera": 1,

    "profile.default_content_setting_values.geolocation": 1, 

    "profile.default_content_setting_values.notifications": 1 

  })


driver = webdriver.Chrome(chrome_options=opt, executable_path=r'C:\Utility\BrowserDrivers\chromedriver.exe')

driver.get('https://www.google.co.in')

print("Page Title is : %s" %driver.title)

driver.quit()

answered May 11, 2018 by Samarpit
• 5,890 points
How to perform the same in Safaridriver?
Try to set up on the preference on safari, "never ask the location" only on that way the pop up on safari will never appear.

Related Questions In Selenium

0 votes
1 answer

How to handle Pop-up in Selenium WebDriver using Java

Actually, its pretty simple. Use this code ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,520 points
7,601 views
0 votes
1 answer

Getting "Disable developer" mode extensions pop up while using Selenium WebDriver

Try the following java code: System.setProperty("webdriver.chrome.driver", "D:\\chromedriver.exe"); ChromeOptions chrome ...READ MORE

answered May 21, 2018 in Selenium by Meci Matt
• 9,460 points
1,479 views
0 votes
1 answer

Handling pop up in Chrome using Selenium WebDriver

AutoIt Window Information Tool do not recognize ...READ MORE

answered Jun 11, 2018 in Selenium by Meci Matt
• 9,460 points
1,397 views
0 votes
1 answer
0 votes
2 answers

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,520 points
3,817 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31 in Selenium by Sri
• 2,970 points
4,801 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2 in Selenium by Sri
• 2,970 points
3,141 views
0 votes
1 answer

Installing Selenium Webdriver with Python package

Hey Hemant, for installing Selenium Webdriver with ...READ MORE

answered May 8, 2019 in Selenium by Anvi
• 14,110 points
3,596 views
0 votes
1 answer

Click on a button within a pop-up window with python selenium

It's not an Alert but a Modal Dialog Box. You ...READ MORE

answered Jun 20, 2018 in Selenium by Samarpit
• 5,890 points
17,447 views
0 votes
1 answer

Selenium .net Binary location failed VB.NET

ChromeOptions.BinaryLocation is for specifying the location of ...READ MORE

answered May 15, 2018 in Selenium by Samarpit
• 5,890 points
702 views