mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.14k stars 1.52k forks source link

Getting 'WebDriverError: HTTP method not allowed' error message while using actions class methods #2074

Closed d-sprasad closed 1 year ago

d-sprasad commented 1 year ago

System

Testcase

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

Node version: v16.13.1 WebDriverJs version: 3.6.0

Sample code:

await driver.actions().sendKeys(Key.ENTER).perform()

Observed, in http.js file in Selenium 3.6.0 still using older endpoints like [cmd.Name.SEND_KEYS_TO_ACTIVE_ELEMENT, post('/session/:sessionId/keys')] [cmd.Name.MOVE_TO, post('/session/:sessionId/moveto')]

Please add support for above end points so older selenium tests will also work with latest gecko driver

Stacktrace

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

whimboo commented 1 year ago

Those end-points are not WebDriver spec compatible, and I wonder why Selenium 3.6.0 were still using these. Nevertheless this is an old Selenium release and you may want to upgrade to a 4.x release.