Selenium ActionChains Send Keys not working?

Viewed 856

So this is awfully simple but I just can't get this to work. I can't use ActionChains to send keys to the browser to do something as simple as open a new tab for example.

This is the code, I'm using:

driver = webdriver.Chrome()
driver.get('https://www.google.com/')
actions = ActionChains(driver)
actions.send_keys(Keys.LEFT_CONTROL , 't')
actions.perform()

I can open the window and go to google just fine but nothing after that.

Editing to add, I've tried IE as well.

Any ideas?

0 Answers
Related