how to close chrome browser popup dialog using selenium webdriver and python
<p>I have a python code that uses selenium webdriver (along with chromedriver), to log into facebook and take a screenshot of the page.<br>
the script itself works as expected, however, after logging in, chrome browser shows a dialog regarding facebook notifications (<a href="http://screencast.com/t/dUtCXk41gvu" rel="nofollow">Chrome Popup</a>)</p>

<p>The dialog seems to be generated by the browser, not the page itself.<br>
i'm unable to identify and capture the element or use "switch to alert" method.  </p>

<p>How can i interact with this dialog (either Allow, Dismiss or close it)?  </p>

<p>Thanks!</p>

<p>You can try with launching the chrome browser with disabled pop-ups (browser pop-ups). The following code snippet is in Java. It will be somewhat similar in python i believe.</p>

<pre><code>ChromeOptions options = new ChromeOptions();
options.addArguments("--disable-popup-blocking");
options.addArguments("test-type");
ChromeDriver driver = new ChromeDriver(options);
</code></pre>

python google-chrome selenium-webdriver selenium-chromedriver