serenity
serenity copied to clipboard
WebDriver: Missing endpoints
WebDriver is the API for remote-controlling a Browser process, as used by WebPlatformTests. It has a lot of different endpoints, so to make it clear which ones are missing, here's a handy list!
To add an endpoint you'll need to modify the code in two places: The WebDriver end at Userland/Services/WebDriver, and the Browser end at Userland/Services/WebContent/WebDriver*. Comment here or refer to this issue in your PR to get your endpoints checked off the list. :^)
You can find the same table in the spec at https://w3c.github.io/webdriver/#endpoints
- [x]
POST /sessionNew Session - [x]
DELETE /session/{session id}Delete Session - [x]
GET /statusStatus - [x]
GET /session/{session id}/timeoutsGet Timeouts - [x]
POST /session/{session id}/timeoutsSet Timeouts - [x]
POST /session/{session id}/urlNavigate To - [x]
GET /session/{session id}/urlGet Current URL - [x]
POST /session/{session id}/backBack - [x]
POST /session/{session id}/forwardForward - [x]
POST /session/{session id}/refreshRefresh - [x]
GET /session/{session id}/titleGet Title - [x]
GET /session/{session id}/windowGet Window Handle - [x]
DELETE /session/{session id}/windowClose Window - [x]
POST /session/{session id}/windowSwitch To Window - [x]
GET /session/{session id}/window/handlesGet Window Handles - [x]
POST /session/{session id}/window/newNew Window - [ ]
POST /session/{session id}/frameSwitch To Frame - [ ]
POST /session/{session id}/frame/parentSwitch To Parent Frame - [x]
GET /session/{session id}/window/rectGet Window Rect - [x]
POST /session/{session id}/window/rectSet Window Rect - [x]
POST /session/{session id}/window/maximizeMaximize Window - [x]
POST /session/{session id}/window/minimizeMinimize Window - [x]
POST /session/{session id}/window/fullscreenFullscreen Window - [x]
GET /session/{session id}/element/activeGet Active Element - [x]
GET /session/{session id}/element/{element id}/shadowGet Element Shadow Root - [x]
POST /session/{session id}/elementFind Element - [x]
POST /session/{session id}/elementsFind Elements - [x]
POST /session/{session id}/element/{element id}/elementFind Element From Element - [x]
POST /session/{session id}/element/{element id}/elementsFind Elements From Element - [x]
POST /session/{session id}/shadow/{shadow id}/elementFind Element From Shadow Root - [x]
POST /session/{session id}/shadow/{shadow id}/elementsFind Elements From Shadow Root - [x]
GET /session/{session id}/element/{element id}/selectedIs Element Selected - [x]
GET /session/{session id}/element/{element id}/attribute/{name}Get Element Attribute - [x]
GET /session/{session id}/element/{element id}/property/{name}Get Element Property - [x]
GET /session/{session id}/element/{element id}/css/{property name}Get Element CSS Value - [x]
GET /session/{session id}/element/{element id}/textGet Element Text - [x]
GET /session/{session id}/element/{element id}/nameGet Element Tag Name - [x]
GET /session/{session id}/element/{element id}/rectGet Element Rect - [x]
GET /session/{session id}/element/{element id}/enabledIs Element Enabled - [x]
GET /session/{session id}/element/{element id}/computedroleGet Computed Role - [x]
GET /session/{session id}/element/{element id}/computedlabelGet Computed Label - [ ]
POST /session/{session id}/element/{element id}/clickElement Click - [ ]
POST /session/{session id}/element/{element id}/clearElement Clear - [ ]
POST /session/{session id}/element/{element id}/valueElement Send Keys - [x]
GET /session/{session id}/sourceGet Page Source - [x]
POST /session/{session id}/execute/syncExecute Script - [x]
POST /session/{session id}/execute/asyncExecute Async Script - [x]
GET /session/{session id}/cookieGet All Cookies - [x]
GET /session/{session id}/cookie/{name}Get Named Cookie - [x]
POST /session/{session id}/cookieAdd Cookie - [x]
DELETE /session/{session id}/cookie/{name}Delete Cookie - [x]
DELETE /session/{session id}/cookieDelete All Cookies - [ ]
POST /session/{session id}/actionsPerform Actions - [ ]
DELETE /session/{session id}/actionsRelease Actions - [x]
POST /session/{session id}/alert/dismissDismiss Alert - [x]
POST /session/{session id}/alert/acceptAccept Alert - [x]
GET /session/{session id}/alert/textGet Alert Text - [x]
POST /session/{session id}/alert/textSend Alert Text - [x]
GET /session/{session id}/screenshotTake Screenshot - [x]
GET /session/{session id}/element/{element id}/screenshotTake Element Screenshot - [x]
POST /session/{session id}/printPrint Page
Hey! This will probably seem a really dumb off-hopic noob question jumping onto a tracking issue, so I'm sorry but I was wondering if you folks plan to support WebDriver Bi-directional that utilizes WebSocket?
I thought it was a really useful protocol, and I had a lot of success using an prototype/prehistory implementation of it (Chrome Remote Debugging Protocol / Chrome DevTools Protocol) to create a virtualized remote isolated Browser (BrowserBox).
Hey! This will probably seem a really dumb off-hopic noob question jumping onto a tracking issue, so I'm sorry but I was wondering if you folks plan to support WebDriver Bi-directional that utilizes WebSocket?
I thought it was a really useful protocol, and I had a lot of success using an prototype/prehistory implementation of it (Chrome Remote Debugging Protocol / Chrome DevTools Protocol) to create a virtualized remote isolated Browser (BrowserBox).
Hi! I don't know about anyone else but I hadn't heard of the BiDi extension before. We don't really do plans, but that does seem interesting.
The main (only?) reason we're attempting to get WebDriver working is to be able to run the WPT test suite. So that's the focus here for now. But that does look like it would be convenient for building the browser devtools on top of, so we'll see.
Hey @AtkinsSJ Cool! Yes, it is useful for DevTools. In fact, as you probably already know, the Chrome DevTools is basically a front-end web app interface with functionality to instrument the browser built entirely using these protocol commands (I think ~~ I'm no expert!). The use of the protocol without WebSocket (using HTTP requests) may introduce some weird lag for some things you want to do.
Thanks for your reply, @AtkinsSJ and cool to hear you don't do plans! Very fun! :)
Hi! Just a quick fly-by comment re: webdriver bidi and devtools. As we're implementing WebDriver BiDi in Firefox, we built a small devtools-like frontend at https://github.com/firefox-devtools/bidi-webconsole-prototype
At the moment we only added a "webconsole" and a "netmonitor" (which is really just a list of request), but you could easily do more. We don't really have debugging APIs on the roadmap for the spec yet (https://github.com/w3c/webdriver-bidi/issues/), but maybe in the future we could imagine having a cross browser devtools based on webdriver bidi.
That's awesome! That is so cool, @juliandescottes. Really happy to see some external devtools that uses the protocol! 😃