This below piece of code has been tried and its not working.
Launch Browser ${SiteURL} ${Browser}
Enter Username ${User}
Enter Password ${Pwd}
Login
${options}= Evaluate sys.modules[‘selenium.webdriver.chrome.options’].Options() sys
Call Method ${options} add_argument --disable-notifications
Call Method ${options} add_argument --disable-infobars
Call Method ${options} add_argument start-maximized
Call Method ${options} add_argument --disable-extensions
${driver}= Create Webdriver Chrome options=${options}
Try to change the first line to:
${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
You can disable them using DesiredCapabilities
. In this geolocation case, you should use disable-geolocation
option.
I have the same problem, I am not able to allow the notifications. This part: Call Method ${options} add_argument --disable-notifications only kind of hide the notification window but doesn’t take the allow action.
Could anyone else help more with this topic?
I hope this is not too late. To fix this problem just add this line to your chrome options:
Call Method ${options} add_argument --use-fake-ui-for-media-stream
This will fix your issue
Hello,
Did you ever find a solution for this?
I’m also experiencing this same problem and none of the above helped to resolve, the darn pop up for allow notifications comes up. Now in talks with our IT engineers on trying to turn that off on my system for any browsers since I’m doing the test automation.
Hi,
you can do the following:
${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys
${prefs}= Create Dictionary profile.default_content_setting_values.notifications=2
Call Method ${options} add_experimental_option prefs ${prefs}
Open Browser ${URL} ${BROWSER} options=${options}
With profile.default_content_setting_values.notifications=2 you disable all notifications, with 1 you can enable them.
Disregard Jeronimo! It worked I got it thank you so much for this I was blocked on setting up automated testing for about 2 weeks due to it.