I want to open mulitple local htmls within same browser window using Selenium Webdriver using Python. I have tried following in Jupyter notebook:
from seleni
To open multiple URLs / webpages in seperate TABs within a browser you can use the following solution :
Code Block :
from selenium import webdriver
first_page = "http://www.google.com"
second_page = "https://www.facebook.com/"
options = webdriver.ChromeOptions()
options.add_argument("start-maximized")
options.add_argument('disable-infobars')
driver=webdriver.Chrome(chrome_options=options, executable_path=r'C:\Utility\BrowserDrivers\chromedriver.exe')
driver.get(first_page)
driver.execute_script("window.open('" + second_page +"');")
Browser Snapshot :