4
namespace Facebook\WebDriver;

use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;

require_once('vendor/autoload.php');

$host = 'http://localhost:4444/wd/hub';

$options = new ChromeOptions();

I have read this link when i creating object of class ChromeOptions getting error

PHP Fatal error: Uncaught Error: Class 'Facebook\WebDriver\ChromeOptions' not found.

Eddie
  • 26,593
  • 6
  • 36
  • 58
Parnit Das
  • 361
  • 3
  • 7
  • 20

2 Answers2

5

Add

use Facebook\WebDriver\Chrome\ChromeOptions;

to the top.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Lee Henkel
  • 111
  • 2
  • 4
2

Try this.

$options = new Chrome\ChromeOptions();
Nanhe Kumar
  • 15,498
  • 5
  • 79
  • 71