Skip to content

Conversation

@christian-bromann
Copy link
Member

@christian-bromann christian-bromann commented Nov 5, 2020

This is the light version of #1552 that keeps implementation effort for browser vendors low while enabling intermediary nodes the ability to create async sessions in a lightweight way. There are two new endpoints being added in this patch:

  1. Get Session
    Returns the capabilities of an active session. This is also very useful for endpoint nodes
    in the scenario where a clients wants to attach to an active session receive the capabilities
    it has attached to. This information is not necessarily given for client implementations.

  2. Async New Session
    Endpoint nodes run the same session creation steps as in New session but return only the
    session id. Intermediary nodes keep a list of "session creation jobs" that maps "session
    creation job ids" to session ids of active sessions.

Now the use case is a user can now always make an async session by making a request to [POST] /session/async which returns a session creation id:

{
  "sessionCreationId": "<uuid>"
}

With this id the "Get Session" endpoint can be requested, which returns with unknown session as long as the intermediary node has not yet initiated the session at the endpoint node. Once that happen a response with the following data will be returned:

{
  "sessionId": "<uuid of active session>"
  "capabilities: { ... }
}

The client can then continue making WebDriver request with the session id it received from this response.

I am happy to start working on the web platform tests once there is a general agreement on this approach.


Preview | Diff

@christian-bromann
Copy link
Member Author

any comments @shs96c @AutomatedTester ?

Added WPT tests in web-platform-tests/wpt#26490

@AutomatedTester AutomatedTester merged commit 8315393 into w3c:master Jan 27, 2021
@christian-bromann christian-bromann deleted the cb-async-session-creation-light branch January 27, 2021 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants