Skip to content

fix: update stale playwright.dev sidebar locator in sample tests - #14

Open
utchimakali-m wants to merge 1 commit into
LambdaTest:mainfrom
utchimakali-m:Fix_locators
Open

fix: update stale playwright.dev sidebar locator in sample tests#14
utchimakali-m wants to merge 1 commit into
LambdaTest:mainfrom
utchimakali-m:Fix_locators

Conversation

@utchimakali-m

@utchimakali-m utchimakali-m commented Aug 1, 2026

Copy link
Copy Markdown

Problem

SampleTest1 and SampleTest2 both click through the playwright.dev docs sidebar. One of the entries was renamed upstream on the docs site — "Components (experimental)" is now "Component testing" — so this line no longer matches anything and the tests fail at the test level:

page.locator("text=Components (experimental)").first().click();

Changes

  • Update the locator to text=Component testing in both sample test classes.
  • Bump the Windows pre step's npm playwright install from 1.23.0 to 1.57.0, matching pom.xml and what yaml/linux already uses.

Note on the npm bump

The samples connect to a remote browser via wss://cdp.lambdatest.com/playwright (BaseTest.createConnection), and Java Playwright ships its own driver bundle, so this npm install isn't used at runtime — the bump is purely for consistency with pom.xml. It was not exercised by the verifying run below, which still used 1.23.0. yaml/mac is also still on 1.23.0; I left it alone to keep this diff minimal, happy to align it too if you'd prefer.

Verification

HyperExecute win matrix job, yaml/win/junit_hyperexecute_matrix_sample.yaml:

✔ [1] SampleTest1  (1m0s)      ✔ [2] SampleTest2  (56s)
Test stage: 100.00% pass       Failed Tasks: 0

All 10 stages green across both matrix tasks. Not re-verified on linux/mac, though the locator change is platform-independent.

🤖 Generated with Claude Code

The playwright.dev docs sidebar renamed "Components (experimental)" to
"Component testing", so the locator in SampleTest1 and SampleTest2 no
longer matched and both matrix tasks failed at the test level.

Also bump the Windows pre step's npm playwright install from 1.23.0 to
1.57.0 to match pom.xml and yaml/linux. The tests connect to a remote
browser over cdp.lambdatest.com and Java Playwright ships its own driver
bundle, so this npm install is unused at runtime -- the bump is for
consistency only and was not exercised by the passing run.

Verified on HyperExecute win matrix job 8dad8be5: both tasks green,
test stage 100% pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NkXiQEUJmN37h5tnEX51V4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant