jest-webdriver icon indicating copy to clipboard operation
jest-webdriver copied to clipboard

Set headless option when using firefox driver

Open abustany opened this issue 6 years ago • 2 comments

Firefox supports running in headless mode as of version 56. This seems to be a desirable default compared to the current situation. MDN provides instructions here on how to enable headless mode when using Selenium: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode . Right now, jest-webdriver calls build() directly on the webdriver builder, without passing any options. We could maybe:

  1. Detect when the browser string is "firefox" and append the headless option (maybe only if we detect a recent enough version ?)
  2. Or, if this is deemed to be too intrusive, allow the user to customize the builder options (the user could then add the "headless" switch for Firefox manually)

abustany avatar Nov 01 '18 13:11 abustany

PR #3 seems to enable this, I should have checked it before filing a new issue

abustany avatar Nov 01 '18 13:11 abustany

Hi guys, is this possible to run Firefox or Chrome in headless mode?

cachaito avatar Dec 19 '18 17:12 cachaito