##################################################################################
# Steps to install chrome webdriver in windows and start multiple tabs
# from python script
# 1. Download chrome webdriver from "Google chrome" official site
# 2. copy the chrome webdriver to "C:\webdriver\chromedriver"
# 3. Add this to the windows C driver environment PATH, so that this is
# recognized as an executable.
#################################################################################
import selenium.webdriver as webdriver
websites = ["https://www.w3schools.com/php/default.asp",
"https://www.w3schools.com/python/python_classes.asp",
"https://www.w3schools.com/js/default.asp",
]
# Open the main window (1st window)
driver = webdriver.Chrome('C:\webdriver\chromedriver')
driver.get(websites[0])
# Switch to the new window
driver.execute_script("window.open('');")
driver.switch_to.window(driver.window_handles[1])
driver.get(websites[1])
# Switch to the new window
driver.execute_script("window.open('');")
driver.switch_to.window(driver.window_handles[2])
driver.get(websites[2])
# close the active tab
#driver.close()
# Steps to install chrome webdriver in windows and start multiple tabs
# from python script
# 1. Download chrome webdriver from "Google chrome" official site
# 2. copy the chrome webdriver to "C:\webdriver\chromedriver"
# 3. Add this to the windows C driver environment PATH, so that this is
# recognized as an executable.
#################################################################################
import selenium.webdriver as webdriver
websites = ["https://www.w3schools.com/php/default.asp",
"https://www.w3schools.com/python/python_classes.asp",
"https://www.w3schools.com/js/default.asp",
]
# Open the main window (1st window)
driver = webdriver.Chrome('C:\webdriver\chromedriver')
driver.get(websites[0])
# Switch to the new window
driver.execute_script("window.open('');")
driver.switch_to.window(driver.window_handles[1])
driver.get(websites[1])
# Switch to the new window
driver.execute_script("window.open('');")
driver.switch_to.window(driver.window_handles[2])
driver.get(websites[2])
# close the active tab
#driver.close()