Replies: 3 comments 7 replies
|
Oh btw, since this thing has been renamed to php-webdriver instead of "Facebook", I have tried to change the example code to: But this crashes as well, I guess "-" are not allowed in "use" statements:
Please help. |
|
Hi, yes, this library works :). Please check the complete working example here: https://github.com/php-webdriver/php-webdriver/blob/main/example.php You are using class
|
|
Thank you. I need to set "--headless" and "--no-sandbox" options for Chrome to run. Otherwise it breaks with "DevToolsActivePort file doesn't exist" which is a sign saying "do not run this as root". I don't know why this happens, because executing a PHP script is surely not run by root ... how can I set these options or do you have an idea for that "DevToolsActivePort" message? |
Uh oh!
There was an error while loading. Please reload this page.
I have Selenium 4.16 installed. Runs good with simple Python script in terminal. Now I want to use it using PHP.
So I have done:
php composer.phar require php-webdriver/webdriverAnd I am trying to use a first example as shown:
This crashes on my webserver with:
PHP Fatal error: Uncaught Error: Class "DesiredCapabilities" not foundI have needed days (!) to get the freaking Selenium working, all its depencies, versions, unexpected crashes. I am so tired to go through all this again with this PHP library. Please tell me: does this work with a latest Selenium version? What is the problem?
Please advise!
All reactions