SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.25k stars 8.14k forks source link

[🐛 Bug]: Getting 'WebDriverError: HTTP method not allowed' error message while using actions class methods in Firefox browser #11494

Closed d-sprasad closed 1 year ago

d-sprasad commented 1 year ago

What happened?

Getting 'WebDriverError: HTTP method not allowed' error message while using actions class methods in Firefox browser, below are the details:-

Browser: Firefox 102 Driver version: geckodriver-v0.31.0 WebDriver version: 3.6.0

In Webdriver version 3.6.0, in http.js (node/selenium-webdriver/lib/http.js), end points are not updated as per w3 standards, it is causing issue while running actions class methods in firefox, Please update endpoints in 3.6.0 version as updated in selenium latest version.

https://github.com/SeleniumHQ/selenium/blob/trunk/javascript/node/selenium-webdriver/lib/http.js

How can we reproduce the issue?

1. npm i selenium-webdriver@3.6.0
2. Write a test with actions class methods
   Example: await driver.actions().sendKeys(Key.TAB).perform()
3. Download gecko driver version v0.31.0
4. Run test in firefox bowser

Relevant log output

WebDriverError: HTTP method not allowed
at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:536:11)
at /node_modules/selenium-webdriver/lib/http.js:441:30

Operating System

macOS

Selenium version

3.6.0

What are the browser(s) and version(s) where you see this issue?

Firefox 102.2.0

What are the browser driver(s) and version(s) where you see this issue?

geckodriver-v0.31.0

Are you using Selenium Grid?

No response

github-actions[bot] commented 1 year ago

@d-sprasad, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

pujagani commented 1 year ago

WebDriver version 3.6.0 is very old. We are currently on the 4.7 series and planning the 4.8 release soon. The complete transition from JSONWire to W3C happened in Selenium 4. We do not do a patch release for older versions. Kindly upgrade to the latest Selenium version.