Add WebDriver HTTP API with OpenAPI spec and selector-first extensions #155
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.
Implements W3C WebDriver-compatible HTTP API with Browser4's selector-first extensions. Skeleton implementation with in-memory mock storage—real browser integration deferred to follow-up PRs.
OpenAPI Specification
openapi/openapi.yaml— OpenAPI 3.1 spec with W3C paths + selector-first endpoints/openapi.yamlendpointControllers (
pulsar-rest/.../controller/webdriver/)POST /session,GET/DELETE /session/{sessionId}POST/GET /session/{sessionId}/url,GET documentUri,baseUri/session/{sessionId}/selectors/{exists,waitFor,element,elements,click,fill,press,outerHtml,screenshot}/element,/elements,/element/{id}/click|value|attribute|text)/session/{sessionId}/execute/{sync,async}/session/{sessionId}/control/{delay,pause,stop}/session/{sessionId}/event-configs,/events,/events/subscribeDTOs & Service
WebDriverDTOs.kt— Request/response types with W3C{"value": ...}wrappingWebDriverSessionService.kt— In-memory ConcurrentHashMap storage for sessions, elements, event configsExample Usage
Tests
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.