In my code the driver_name.execute("window.focus();) does not activate the window nor bring it to view. My code is using pyautogui and cannot find the visual targets, because the wrong browser window is active.