Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use Chrome Headless with Behat
default:
extensions:
Behat\MinkExtension:
base_url: http://localhost:8000
default_session: selenium2
selenium2:
browser: chrome
wd_host: http://127.0.0.1:4444/wd/hub
capabilities:
chrome:
switches:
- "--headless"
- "--disable-gpu"
suites:
default:
paths:
- "%paths.base%/features/"
contexts:
- Behat\MinkExtension\Context\MinkContext
- FeatureContext
@francesko

This comment has been minimized.

Copy link

francesko commented Dec 4, 2017

@jdecool I am trying to change the initial window size:

default:
  extensions:
    Behat\MinkExtension:
      files_path: %paths.base%
      base_url: 'https://sp.dev.cms'
      default_session: selenium2
      selenium2:
        browser: chrome
        wd_host: 'http://localhost:4444/wd/hub'
        capabilities:
          chrome:
            switches:
              - '--headless'
              - '--disable-gpu'
              - '--window-size=2000,1000'
    kolev\MultilingualExtension:
      default_language: de
      translations: translations.yml
  suites:
    default:
      paths:
        - '%paths.base%/features/'
      contexts:
        - FeatureContext

But it looks like --window-size switch is being ignored. Any ideas how to achieve that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment