In this tutorial, we’ll learn how to Hide selenium firefox in python.
Code:
#headless option options.headless = True
Example:
from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.firefox.options import Options options = Options() options.headless = True driver = webdriver.Firefox(executable_path='/path/to/geckodriver', options=options) driver.get(url)
Hope this helps