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
This is a complete hack, but it worked for me using IE, selenium remote driver in Windows 7.
driver.get("about:blank")
driver.minimize_window()
driver.maximize_window()
driver.minimize_window()
driver.maximize_window()
I send a blank page, then minimize and maximize twice. It seems to result in the newly created IE having foreground focus.