python-selenium-async icon indicating copy to clipboard operation
python-selenium-async copied to clipboard

Firefox does not open in headless mode with headless option

Open ctrl-alt-deliberate opened this issue 1 year ago • 0 comments

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.

ctrl-alt-deliberate avatar Dec 19 '24 20:12 ctrl-alt-deliberate