Disable Chrome clipboard popups WebdriverIO Disable Chrome clipboard popups WebdriverIO selenium selenium

Disable Chrome clipboard popups WebdriverIO


A workaround might be to switch to the popup and dismiss it.

driver.switchTo().alert().dismiss();

or

driver.switchTo().activeElement().dismiss();

EDIT: I found an interesting Website. Try the code at the end of this site: http://blog.amolchavan.space/block-push-notification-on-chrome-in-selenium-webdriver/


I see many people also suggest to use profile.default_content_settings so it may be depend on chrome version. Current chrome version will work with this code as follows

chromeOptions: {    prefs: {        'profile.managed_default_content_settings.popups' : 2,        'profile.managed_default_content_settings.notifications' : 2,    }}