Skip to content

Commit

Permalink
Add the ability to start a session directly with the bidi connection
Browse files Browse the repository at this point in the history
The case for this is:

* Some clients might be uninterested in using the classic WebDriver
HTTP connection, and want to avoid depending on a HTTP client just for
session creation.

* Some implementations might ship the HTTP server as a seperate
component, but have the bidi connection built-in to the browser
itself. This will allow clients to use bidi without a seperate driver
binary (similar to devtools) without requiring the browser to ship a
full HTTP implementation just for new session.

* It is needed to "explain" the behaviour of classic WebDriver in
terms of the BiDI protocol; in particular the new session and session
status command.

Implementation-wise the model is that a remote end is allowed to start
a WebSockets server that accepts connections to the `/session`
resource. This connection can then be used for "static" commands
i.e. those which don't require a session. Currently this is just
`session.status` and `session.new`. Once `session.new` is called, the
same WS connection is reused for subsequent commands that are part of
the session.
  • Loading branch information
jgraham committed Jun 16, 2021
1 parent 599e2a9 commit f474a1d
Showing 1 changed file with 229 additions and 15 deletions.
Loading

0 comments on commit f474a1d

Please sign in to comment.