Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 975
Parnit Das Avatar asked Mar 07 '23 09:03

Parnit Das


2 Answers

Add

use Facebook\WebDriver\Chrome\ChromeOptions;

to the top.

like image 102
Lee Henkel Avatar answered Apr 28 '23 19:04

Lee Henkel


Try this.

$options = new Chrome\ChromeOptions();
like image 23
Nanhe Kumar Avatar answered Apr 28 '23 17:04

Nanhe Kumar