I'm try to run a code on my Raspberry Pi headless. In normal mode it works totally fine, but if I try to make it headless the code "ignores" it. I tried different ways of headless, with -- or without , it didn't changes anything. My current code looks so:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
import time
options = Options()
options.add_argument ("-headless")
options.add_argument ("-disable-gpu")
allesFertig = True
driver = webdriver.Chrome(options = options, executable_path ='/usr/lib/chromium-browser/chromedriver')
driver = webdriver.Chrome()
Any ideas to fix it ?
opt = Options() opt.headless = Truedriver = webdriver.Chrome()? The first one is what you have to keep only. And try using two dashes("--headless")