Last active
October 20, 2022 05:18
-
-
Save mattallan/ed82af12d2252cdfa5d26322d12e7d62 to your computer and use it in GitHub Desktop.
Set chrome to be headless in PHP with facebook/php-webdriver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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