Send keys not to element but in general selenium Send keys not to element but in general selenium selenium selenium

Send keys not to element but in general selenium


You are using WebDriver to interact with the actual elements on the page. It will not work.

Try using the Actions

from selenium.webdriver.common.action_chains import ActionChainsfrom selenium.webdriver.common.keys import Keysactions = ActionChains(driver)actions.send_keys(Keys.LEFT_CONTROL + 't')actions.perform()

See the documentation:http://selenium-python.readthedocs.io/api.html?highlight=send_keys#module-selenium.webdriver.common.action_chains