0

can you help with a php-webdriver / chromedriver issue

i'm just trying to run a test on a whm server to get a webpage

butit 500 errors with: PHP Fatal error: Uncaught Exception: '' is not a file. in /home/vendor/facebook/webdriver/lib/Remote/Service/DriverService.php:133

what am i doing wrong here?

// Set the path to the ChromeDriver executable

require_once('vendor/autoload.php');

use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Chrome\ChromeOptions;
use Facebook\WebDriver\Chrome\ChromeDriver;

// Set the path to the Chromedriver executable
$chromedriverPath = '/usr/local/bin/chromedriver';


// Set the Chrome options
$chromeOptions = new ChromeOptions();
//$chromeOptions->addArguments(['--headless']); // Optional: Run Chrome in headless mode


// Set the desired capabilities
$capabilities = DesiredCapabilities::chrome();
//$capabilities->setCapability(ChromeOptions::CAPABILITY, $chromeOptions);

// Start the ChromeDriver
$driver = ChromeDriver::start($capabilities);

// Example: Open a website
$driver->get('https://www.test.co.uk');


// Close the driver when you're done
$driver->quit();

?>

it 500 errors with: [26-May-2023 19:46:48 UTC] PHP Fatal error: Uncaught Exception: '' is not a file. in /home/vendor/facebook/webdriver/lib/Remote/Service/DriverService.php:133

wyman101
  • 1
  • 1

0 Answers0