mozilla / geckodriver

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

set permissions webdriver command doesn't work #2174

Open lacell75 opened 2 months ago

lacell75 commented 2 months ago

System

This command permissions is supposed to be supported by firefox but I have an error : https://w3c.github.io/permissions/#webdriver-command-set-permission. Is it supported by geckodriver? Request failed with status 405 due to HTTP method not allowed

Testcase

Call this command like that:

0-0] 2024-04-12T09:40:49.664Z INFO webdriver: [POST] http://0.0.0.0:35735/session/1d6cc0c6-cab8-4a9b-8aec-b80336e4fb63/permissions
[0-0] 2024-04-12T09:40:49.664Z INFO webdriver: DATA { descriptor: { name: 'clipboard-read' }, state: 'granted' }

Stacktrace

0-0] 2024-04-12T10:09:45.498Z DEBUG @wdio/runner: Received browser message: {"commandName":"setPermissions","cid":"0-0","id":1,"args":[{"name":"clipboard-read"},"granted"]}
[0-0] 2024-04-12T10:09:45.498Z INFO webdriver: COMMAND setPermissions(<object>, "granted")
[0-0] 2024-04-12T10:09:45.499Z INFO webdriver: [POST] http://0.0.0.0:33519/session/546b26b5-0dc7-456d-9cc5-714c76580893/permissions
[0-0] 2024-04-12T10:09:45.499Z INFO webdriver: DATA { descriptor: { name: 'clipboard-read' }, state: 'granted' }
2024-04-12T10:09:45.640Z DEBUG @wdio/local-runner: Send command workerRequest to worker with cid "0-0"
[0-0] 2024-04-12T10:09:45.642Z INFO webdriver: RESULT null
[0-0] 2024-04-12T10:09:45.648Z DEBUG webdriver: request failed due to missing body
[0-0] 2024-04-12T10:09:45.648Z WARN webdriver: Request failed with status 405 due to HTTP method not allowed
whimboo commented 2 months ago

Please note that geckodriver doesn't have it implemented yet. The required work is tracked via https://bugzilla.mozilla.org/show_bug.cgi?id=1854996.

We potentially start the implementation for WebDriver BiDi first, and when done we will do the same for Marionette and geckodriver. The work is planned for this quarter.