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,220 points
793 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,130 points

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,070 points
3,931 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,420 points
513 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,420 points
602 views
0 votes
1 answer
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,070 points
445 views
0 votes
1 answer
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
435 views
0 votes
1 answer

Installing Selenium Webdriver with Python package

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

answered May 8 in Selenium by Anvi
• 12,010 points
115 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,130 points
6,067 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,130 points
273 views