mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
WebDriver: Include (empty) capabilities object in /session POST response
Still not spec compliant, but at least we now return both assumed values of the JSON object ("sessionId", "capabilities").
This commit is contained in:
parent
dd4e5d5028
commit
f3d66b1108
1 changed files with 6 additions and 4 deletions
|
@ -338,6 +338,7 @@ ErrorOr<JsonValue, HttpError> Client::handle_new_session(Vector<StringView> cons
|
|||
// return error with error code session not created.
|
||||
|
||||
// FIXME: 4. Let capabilities be the result of trying to process capabilities with parameters as an argument.
|
||||
auto capabilities = JsonObject {};
|
||||
|
||||
// FIXME: 5. If capabilities’s is null, return error with error code session not created.
|
||||
|
||||
|
@ -362,11 +363,12 @@ ErrorOr<JsonValue, HttpError> Client::handle_new_session(Vector<StringView> cons
|
|||
|
||||
// 11. Let body be a JSON Object initialized with:
|
||||
JsonObject body;
|
||||
// "sessionId"
|
||||
// session id
|
||||
// "sessionId"
|
||||
// session id
|
||||
body.set("sessionId", String::number(session_id));
|
||||
// FIXME: "capabilities"
|
||||
// capabilities
|
||||
// "capabilities"
|
||||
// capabilities
|
||||
body.set("capabilities", move(capabilities));
|
||||
|
||||
// FIXME: 12. Initialize the following from capabilities:
|
||||
// NOTE: See spec for steps
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue