mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:47:44 +00:00
WebDriver: Implement POST /session/{session id}/timeouts
endpoint
This commit is contained in:
parent
5c32eacac9
commit
0064d2e8c8
6 changed files with 85 additions and 0 deletions
|
@ -83,6 +83,19 @@ JsonObject Session::get_timeouts()
|
|||
return timeouts;
|
||||
}
|
||||
|
||||
// 9.2 Set Timeouts, https://w3c.github.io/webdriver/#dfn-set-timeouts
|
||||
ErrorOr<JsonValue, HttpError> Session::set_timeouts(JsonValue const& payload)
|
||||
{
|
||||
// 1. Let timeouts be the result of trying to JSON deserialize as a timeouts configuration the request’s parameters.
|
||||
auto timeouts = TRY(json_deserialize_as_a_timeouts_configuration(payload));
|
||||
|
||||
// 2. Make the session timeouts the new timeouts.
|
||||
m_timeouts_configuration = move(timeouts);
|
||||
|
||||
// 3. Return success with data null.
|
||||
return JsonValue {};
|
||||
}
|
||||
|
||||
// 10.1 Navigate To, https://w3c.github.io/webdriver/#dfn-navigate-to
|
||||
ErrorOr<JsonValue, HttpError> Session::navigate_to(JsonValue const& payload)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue