After lots and lots of searching, there’s a simple answer:
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.firefox.options import Options
options = Options()
options.set_preference("browser.fullscreen.autohide", True)
driver = webdriver.Firefox(options=options)
driver.get("https://google.com")
driver.fullscreen_window()
This will set the browser.fullscreen.autohide
config key in about:config
in Firefox to True.
When you call the method fullscreen_window
from the WebDriver, it will hide the pesky elements at the top of the window.
I will thank myself for this post one day.