const {Builder, By, Key} = require('selenium-webdriver');
const {Options} = require('selenium-webdriver/chrome');
const options = new Options().setAlertBehavior('dismiss');
let driver = new Builder().forBrowser('chrome').setChromeOptions(options).build();
driver.get('https://www.facebook.com/');
(async function demo() {
(await driver).findElement(By.css('#email')).sendKeys('***');
(await driver).findElement(By.css('#pass')).sendKeys('***', Key.RETURN);
})();
/* Still, the alert pops up.
Question is how do I change Chrome's Options() so that the "www.facebook.com wants to show you notifications" alert won't show up anymore / could be
automatically accepted / blocked?
Thank you! */