test: cover time and datetime-local locator fills - #2713
Open
HaoChiBao wants to merge 1 commit into
Open
Conversation
Extend date fill coverage so browserbase#1249's remaining input types share the same value-setter assertions in integration and RPC smoke tests.
|
Contributor
There was a problem hiding this comment.
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Architecture diagram
sequenceDiagram
participant Test as SDK Integration Test
participant Page as Playwright Page
participant RPC as RPC Client(s)
participant Runtime as Browser Runtime
participant DOM as DOM Input Element
Note over Test,DOM: Locator Fill Flow for Date/Time/Datetime-local
Test->>Page: goto(data URL with input + beforeinput blocker)
Test->>Page: locator("xpath=/html/body/input")
Test->>RPC: locatorFill(pageId, selector, value)
RPC->>Runtime: activeRpcClient.send(locatorFill)
Runtime->>Runtime: Identify input type (date|time|datetime-local)
alt insertText blocked by beforeinput handler
Runtime->>DOM: Set value directly via value setter
DOM-->>Runtime: input value updated
else insertText allowed (no blocker)
Runtime->>DOM: Dispatch insertText input event
end
Runtime-->>RPC: { filled: true }
RPC-->>Test: Fill confirmed
Note over Test,DOM: Verification Flow
Test->>RPC: locatorInputValue(pageId, selector)
RPC->>Runtime: activeRpcClient.send(locatorInputValue)
Runtime->>DOM: Read current value
DOM-->>Runtime: value string
Runtime-->>RPC: date|time|datetime-local value
RPC-->>Test: Input value matches expected
Note over RPC,DOM: RPC Smoke Test Flow (protocol package)
Test->>RPC: locatorFill for #locator-date, #locator-time, #locator-datetime-local
RPC->>Runtime: Send fill commands with values
Runtime->>DOM: Set values on fixture inputs
DOM-->>Runtime: Confirm fills
Runtime-->>RPC: { filled: true }
Test->>RPC: locatorInputValue for each input
RPC->>Runtime: Read back values
Runtime-->>RPC: Return values
RPC-->>Test: Assert values persist (2026-07-21, 14:30, 2026-07-21T09:15)
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
timeanddatetime-localinputs alongside the existingdatecase (issue Fill on<input type="date">and<input type="time">confirmed not working #1249).Test plan
pnpm --filter @browserbasehq/stagehand exec vitest run packages/sdk-ts/tests/integration/locatorFill.test.tspnpm --filter @browserbasehq/stagehand-protocol exec vitest run packages/protocol/tests/browser-runtime/rpc-client-smoke.test.tsinputValue()fordate,time, anddatetime-localCloses #1249
Summary by cubic
Extends test coverage to verify Locator.fill for time and datetime-local inputs and exercises the RPC value-setter path end-to-end. Previously only date was covered; now all three are filled and persist even when beforeinput blocks insertText.
<input type="date">and<input type="time">confirmed not working #1249.Written for commit d65d5a1. Summary will update on new commits.