Closing authentication popup selenium
<p>Is there possibility to close popup authentication window via <strong>selenium</strong></p>

<p>I wrote something like thath: </p>

<pre><code>def Alert():
    alert = driver.switch_to_alert()
    alert.dismiss()
</code></pre>

<p>I do not need to authenticate this session. Simple closure of window is enought. </p>

<p>Authentication is granted by domain user im logged into :)</p>

<p>@Edit i do not need to log in i just need to close the window</p>

<p>If you only close window from multiple try like this </p>

<pre><code># Show all windows
print(driver.window_handles)

# Switch last open window
driver.switch_to_window(driver.window_handles[len(driver.window_handles) - 1])

# Close last open window
driver.close()
</code></pre>

python selenium popup