python-selenium-async
python-selenium-async copied to clipboard
Firefox does not open in headless mode with headless option
The following code will open a Firefox window instead of executing in the background.
import asyncio
from selenium_async import use_browser, Options
async def browse():
async with use_browser(options=Options(headless=True)) as driver:
driver.get('https://google.com')
asyncio.run(browse())
In fact, headless=True is the default, but a window will open by default as well. See link for headless mode changes.