Add Get Session and Async New Session #1561
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.
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/asyncwhich returns a session creation id:{ "sessionCreationId": "<uuid>" }With this id the "Get Session" endpoint can be requested, which returns with
unknown sessionas 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