Skip to content

Instantly share code, notes, and snippets.

@mattallan
Last active October 20, 2022 05:18
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mattallan/ed82af12d2252cdfa5d26322d12e7d62 to your computer and use it in GitHub Desktop.
Save mattallan/ed82af12d2252cdfa5d26322d12e7d62 to your computer and use it in GitHub Desktop.
Set chrome to be headless in PHP with facebook/php-webdriver
<?php
// inside `webdriver->create()`
$options = new \Facebook\WebDriver\Chrome\ChromeOptions();
$options->addArguments( [ 'headless' ] );
$capabilities->setCapability( \Facebook\WebDriver\Chrome\ChromeOptions::CAPABILITY, $options );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment