问题
I've a test where it handles login system popup using Robot
of Java. But because of some issues, other applications or browser instance come to front and Robot could not perform actions on system popup of Windows.
Hence before interacting with system popup using Robot
, I want to bring that browser to front on machine. I tried following but it did not help -
((JavascriptExecutor)driver).executeScript("window.focus();");
Could you please suggest how I can bring it to the front?
来源:https://stackoverflow.com/questions/59478471/how-to-bring-browser-to-front-using-selenium-webdriver