Issue
How can Selenium Chrome WebDriver notifications be handled in Python?
Have tried to dismiss/accept alert
and active element
but seems notifications have to be treated other way. Also, all the Google search results are driving me to Java solution which I do not really need. I'm a newbie in Python.
Thanks in advance.
Solution
You can disable the browser notifications, using chrome options.
chrome_options = webdriver.ChromeOptions()
prefs = {"profile.default_content_setting_values.notifications" : 2}
chrome_options.add_experimental_option("prefs",prefs)
driver = webdriver.Chrome(chrome_options=chrome_options)
Answered By - pythonjar
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.