Issue
I am working on a project with selenium to scrape the data, but I don’t want the browser to open and pop up. I just wanted to hide the browser and also not to display it in the taskbar also…
Some also suggested to use phantomJS but I didn’t get them. What to do now …
Solution
If you’re using Chrome you can just set the headless argument like so:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
driver_exe = 'chromedriver'
options = Options()
options.add_argument("--headless")
driver = webdriver.Chrome(driver_exe, options=options)
Answered By – Meshi
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0