Commit graph

8 commits

Author SHA1 Message Date
Timothy Flynn
3128d87766 WebDriver: Properly distinguish HTTP sessions from other sessions
The WebDriver spec now separately tracks an active HTTP session list,
which will contains all non-BiDi WebDriver sessions by default. There
may only be one active HTTP session at a time.

See: https://github.com/w3c/webdriver/commit/63a397f
2025-02-10 11:33:53 -05:00
Timothy Flynn
de34351ba8 LibWeb+WebDriver: Convert WebDriver session flags to an enumeration
Rather than a list of strings, this will be easier to deal with as a
bitwise enumeration.
2025-02-10 11:33:53 -05:00
Timothy Flynn
d95be7d88c WebDriver: Move session management to the Session class
Session management is a bit awkward right now in that the list of active
sessions is managed by Client, resulting in operations like closing a
session being split between several functions in Client and Session.

This patch moves all session management to the Session class. Closing a
session is now entirely in Session::close().

This will make managing a separate HTTP session list a bit simpler.
2025-02-10 11:33:53 -05:00
Timothy Flynn
ee649fc13b LibWeb+WebContent+WebDriver: Bring session start and close up to spec
Lots of editorial spec bugs here, but these changes largely affect how
the unhandledPromptBehavior capability is handled. We also now set an
additional capability for the default User Agent string.
2025-02-06 09:01:16 -05:00
Timothy Flynn
2583996e18 LibWeb+WebContent+WebDriver: Allow specifying multiple prompt handlers
WebDriver script authors may now provide either:
* A user prompt handler configuration to be used for all prompt types.
* A set of per-prompt-type user prompt handlers.

This also paves the way for interaction with the beforeunload prompt,
though we do not yet support that feature in LibWeb.

See: https://github.com/w3c/webdriver/commit/43903d0
2025-02-06 09:01:16 -05:00
Feng Yu
57f776fcb7 WebDriver: Actually create a UUID for session_id 2025-01-03 13:15:52 -08:00
stasoid
4a731b3858 LibCore/Process: Make all spawn overloads return ErrorOr<Process> 2024-11-19 14:40:03 -07:00
Timothy Flynn
22e0eeada2 Everywhere: Hoist the Services folder to the top-level 2024-11-10 12:50:45 +01:00
Renamed from Userland/Services/WebDriver/Session.h (Browse further)