Skip to content Skip to sidebar Skip to footer

Actionchains Perform Not Working When Driver Loses Focus

I have a code that basically triggers a browser shortcut using actionchains. I'm using Chrome driver 2.27 and running python 3.6 through Jupyter notebook(though that shouldn't matt

Solution 1:

ActionChains won't work if the browser window is minimized. As a workaround you can call driver.maximize() before you execute the Action chain to send keyboard shortcut to the window.

driver.maximize()
ActionChains(driver).key_down(Keys.CONTROL).send_keys('j').key_up(Keys.CONTROL).perform()

Post a Comment for "Actionchains Perform Not Working When Driver Loses Focus"