if the browser window is in bg, then this line doesn\'t work.
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webd
Now I don't do python, but how I got around this in Groovy was the following:
browser.js."alert()"
webdriver.switchTo().alert().accept()
I called the javascript alert
function which brought the window to the foreground then I dismissed the alert with webdriver.switchTo().alert().accept()
. Hopefully there is something similar in Python.
Hope this helps!