2
A
답변
1
Allow
또는 Block
Microphone
의 알림, Camera
, GeoLocation
, 다음과 같이 Selenium
당신이 ChromeOptions
클래스를 사용할 필요가 사용 Notification
에 액세스하려면 :
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()
왜 팝업이 표시됩니까? 어떤 플랫폼을 사용하고 계십니까? 어떤 종류의 응용 프로그램입니까? 너 뭐 해봤 니? 우리가 문제에 대해 더 잘 이해할 수 있도록 좀 더 자세하게 설명해주십시오. –
[Python/Selenium에서 마이크/카메라 팝업을 어떻게 닫을 수 있습니까?] (https://stackoverflow.com/questions/47716814/how-can-i-close-the-microphone-camera-popup-in) -python-selenium/47717362 # 47717362) – DebanjanB
@BreaksSoftware 내가 작업하고있는 사이트에는 카메라와 마이크가 필요합니다. 그래서, **이 인증 팝업을 허용 **하고 싶습니다. 나는 방법을 받아들이는 경보 또는 전환 창을 통해 시도했다. 하지만 인증 브라우저 팝업입니다. 그래서, 나는 그것이 나를 도와 줄 것이라고 생각하지 않습니다. – daisy