P粉8422150062023-09-02 10:50:54
Before making modifications, put this in your script so that it displays the error:
ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);
The error may lie in this line: This method does not accept strings.
$browser = $browserFactory->createBrowser('/opt/google/chrome/chrome');
You must pass the google chrome executable to:
$browserFactory = new BrowserFactory('/opt/google/chrome/chrome');
Or leave it blank and the system will use the default location:
$browserFactory = new BrowserFactory();