This is my code:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import time
import sys
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
import os
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
browser = webdriver.Chrome('/Users/opulentbase/Downloads/chromedriver')
browser.get('https://www.gooogle.com/')
searchBar = browser.find_element_by_name('q')
userSearch = input("Please enter a search: ")
I tried to run this code but it keeps opening the browser instead of running headless. How do I write the code so that the program runs headless without opening a window?
Thanks in advance, i'm new to coding!