How to open headless chrome browser using selenium python
To perform headless browser testing, we have to pass an argument to ChromeOptions.
from selenium import webdriver
chrome_opts = webdriver.ChromeOptions()
chrome_opts.add_argument("--headless")
driver = webdriver.Chrome(options=chrome_opts)
driver.get("https://sdetportal.blogspot.com/")
driver.maximize_window()
print(driver.title)
driver.quit()
No comments