Commit graph

11 commits

Author SHA1 Message Date
Timothy Flynn
9879ac0893 LibWeb+WebContent+WebDriver: Port WebDriver to String 2025-02-20 19:27:51 -05:00
Timothy Flynn
bc54c0cdfb AK+Everywhere: Store JSON strings as String 2025-02-20 19:27:51 -05:00
Timothy Flynn
e591636419 AK+Everywhere: Store JSON object keys as String 2025-02-20 19:27:51 -05:00
Timothy Flynn
70eb0ba1cd AK+Everywhere: Remove the char const* JSON value constructor 2025-02-20 19:27:51 -05:00
Timothy Flynn
d873dc0744 LibWeb+WebDriver: Validate WebDriver proxy capabilities
We don't yet support a proxy configuration, but we can still validate
the capability received from the WebDriver client. We should also fail
to create a WebDriver session if a proxy configuration is present.
2025-02-10 11:33:53 -05:00
Timothy Flynn
88eda159af LibWeb: Remove "serenity:" prefix from custom WebDriver capabilities
We currently define our custom WebDriver capabilities with a dictionary
of the form:

    "serenity:ladybird": {
        "headless": true
    }

This patch flattens the configuration, such that each Ladybird option
will be its own capability. This matches how Firefox configures their
own options with geckodriver. So we now have:

    "ladybird:headless": true
2025-02-10 11:33:53 -05:00
Timothy Flynn
e0ecf3b033 LibWeb: Do not reject unknown WebDriver extension capabilities 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
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: 43903d0
2025-02-06 09:01:16 -05:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Renamed from Userland/Libraries/LibWeb/WebDriver/Capabilities.cpp (Browse further)