Utilizing Selenium for writing tests with JavaScript, our goal is to have the browser disable notifications or close certain panes while running tests. Refer to this image
This issue has been causing unwanted errors in our testing process.
Despite trying various methods outlined in the Selenium documentation to handle alerts and popups, none have proven effective in this particular case.
var chromeCapabilities = webdriver.Capabilities.chrome();
var chromeOptions = {
'args': ['--disable-notifications']
};
chromeCapabilities.set('chromeOptions', chromeOptions);
exports.chromeOptions = chromeOptions;
Even attempting to configure the driver with these capabilities to disable notifications has yielded no success. After exhausting my options, I am seeking assistance here.
I would greatly appreciate a solution to this dilemma. Thank you in advance.