Benjamin-Loison / php-webdriver

PHP client for Selenium/WebDriver protocol. Previously facebook/php-webdriver
MIT License
0 stars 0 forks source link

`HTTP method not allowed` on `$driver->quit();` with `geckodriver` #1

Open Benjamin-Loison opened 10 months ago

Benjamin-Loison commented 10 months ago

Bug description

Does not have this issue with chromedriver.

<?php

include_once 'vendor/autoload.php';

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

$serverUrl = 'http://localhost:4444';

$desiredCapabilities = DesiredCapabilities::firefox();

$driver = RemoteWebDriver::create($serverUrl, $desiredCapabilities);

$driver->quit();

?>
PHP Fatal error:  Uncaught Facebook\WebDriver\Exception\WebDriverException: JSON decoding of remote response failed.
Error code: 4
The response: 'HTTP method not allowed'
 in /home/benjamin/vendor/php-webdriver/webdriver/lib/Remote/HttpCommandExecutor.php:260
Stack trace:
#0 /home/benjamin/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php(507): Facebook\WebDriver\Remote\HttpCommandExecutor->execute()
#1 /home/benjamin/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php(247): Facebook\WebDriver\Remote\RemoteWebDriver->execute()
#2 /home/benjamin/b.php(14): Facebook\WebDriver\Remote\RemoteWebDriver->quit()
#3 {main}
  thrown in /home/benjamin/vendor/php-webdriver/webdriver/lib/Remote/HttpCommandExecutor.php on line 260

How could the issue be reproduced

Not read.

Expected behavior

No response

Php-webdriver version

Not read.

PHP version

Not read.

How do you start the browser driver or Selenium server

Not read.

Selenium server / Selenium Docker image version

No response

Browser driver (chromedriver/geckodriver...) version

No response

Browser name and version

No response

Operating system

No response

Additional context

No response