This actually worked for me in 3.x:
driver.switch_to.window(driver.window_handles[1])
window handles are appended, so this selects the second tab in the list
to continue with first tab:
driver.switch_to.window(driver.window_handles[0])
More Related Contents:
- How to load extension within chrome driver in selenium with python
- How to accept the popup presented when installing extension in Selenium?
- How to install Chrome Extension using Selenium & Python
- How to sleep Selenium WebDriver in Python for milliseconds
- selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH error with Headless Chrome
- Wait until page is loaded with Selenium WebDriver for Python
- How to use Chrome Profile in Selenium Webdriver Python 3
- Running Selenium Webdriver with a proxy in Python
- How to connect to Tor browser using Python
- How can I download a file on a click event using selenium?
- How to upload file ( picture ) with selenium, python
- InvalidArgumentException: Message: invalid argument: user data directory is already in use error using –user-data-dir to start Chrome using Selenium
- Log into gmail using Selenium in Python
- How can I parse a website using Selenium and Beautifulsoup in python? [closed]
- How to handle elements inside Shadow DOM from Selenium
- Failed to read descriptor from node connection: A device attached to the system is not functioning error using ChromeDriver Selenium on Windows OS
- Selenium Webdriver: How to Download a PDF File with Python?
- Expected browser binary location, but unable to find binary in default location, no ‘moz:firefoxOptions.binary’ capability provided using GeckoDriver
- function for switching frames in python, selenium
- Setting path to firefox binary on windows with selenium webdriver
- Selenium-Debugging: Element is not clickable at point (X,Y)
- Chromedriver, Selenium – Automate downloads
- Undetected Chromedriver not loading correctly
- Selecting a value from a drop-down option using selenium python
- How to solve ‘Getting Default Adapter failed’ error when launching Chrome and try to access a webpage using the ChromeDriver using Selenium
- selenium two xpath tests in one
- Selenium webdriver: How do I find ALL of an element’s attributes?
- Chrome browser initiated through ChromeDriver gets detected
- Can’t use chrome driver for Selenium
- Selenium / Python – Selecting via css selector