Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98814

Can't pass Google Chrome's alert after logging to Facebook automatically with selenium-webdriver. Language is Javascript / JS

$
0
0
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! */


Viewing all articles
Browse latest Browse all 98814

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>