3 formatting
source | link

The page at https://developer.mozilla.org/en-US/Firefox/Headless_modeThis page lists the --window-size=x,y which you can add with opts.add_argument("--window-size=1900,1080").

Complete example which works with latest firefox v57b8 (assumes you have geckodriver somewhere in your $PATH):

    caps = webdriver.DesiredCapabilities().FIREFOX
    opts = FirefoxOptions()
    opts.add_argument("-headless")
    opts.add_argument("--window-size=1900,1080")
    caps["marionette"] = True
    driver = webdriver.Firefox(capabilities=caps, firefox_options=opts)

The page at https://developer.mozilla.org/en-US/Firefox/Headless_mode lists the --window-size=x,y which you can add with opts.add_argument("--window-size=1900,1080").

Complete example which works with latest firefox v57b8 (assumes you have geckodriver somewhere in your $PATH):

    caps = webdriver.DesiredCapabilities().FIREFOX
    opts = FirefoxOptions()
    opts.add_argument("-headless")
    opts.add_argument("--window-size=1900,1080")
    caps["marionette"] = True
    driver = webdriver.Firefox(capabilities=caps, firefox_options=opts)

This page lists the --window-size=x,y which you can add with opts.add_argument("--window-size=1900,1080").

Complete example which works with latest firefox v57b8 (assumes you have geckodriver somewhere in your $PATH):

    caps = webdriver.DesiredCapabilities().FIREFOX
    opts = FirefoxOptions()
    opts.add_argument("-headless")
    opts.add_argument("--window-size=1900,1080")
    caps["marionette"] = True
    driver = webdriver.Firefox(capabilities=caps, firefox_options=opts)
2 added 334 characters in body
source | link

The page at https://developer.mozilla.org/en-US/Firefox/Headless_mode lists the --window-size=x,y which you can add viawith opts.add_argument("--window-size=1900,1080").

Complete example which works with latest firefox v57b8 (assumes you have geckodriver somewhere in your $PATH):

    caps = webdriver.DesiredCapabilities().FIREFOX
    opts = FirefoxOptions()
    opts.add_argument("-headless")
    opts.add_argument("--window-size=1900,1080")
    caps["marionette"] = True
    driver = webdriver.Firefox(capabilities=caps, firefox_options=opts)

The page at https://developer.mozilla.org/en-US/Firefox/Headless_mode lists the --window-size=x,y which you can add via:

opts = FirefoxOptions()
opts.add_argument("--window-size=1900,1080")

The page at https://developer.mozilla.org/en-US/Firefox/Headless_mode lists the --window-size=x,y which you can add with opts.add_argument("--window-size=1900,1080").

Complete example which works with latest firefox v57b8 (assumes you have geckodriver somewhere in your $PATH):

    caps = webdriver.DesiredCapabilities().FIREFOX
    opts = FirefoxOptions()
    opts.add_argument("-headless")
    opts.add_argument("--window-size=1900,1080")
    caps["marionette"] = True
    driver = webdriver.Firefox(capabilities=caps, firefox_options=opts)
1
source | link

The page at https://developer.mozilla.org/en-US/Firefox/Headless_mode lists the --window-size=x,y which you can add via:

opts = FirefoxOptions()
opts.add_argument("--window-size=1900,1080")