Skip to content

Fix WebDriver timeout in TestQueryBuilder_MasterCheckedForMasterLabelQuery#4872

Open
DanielRyanSmith wants to merge 1 commit intomainfrom
fix-webdriver-timeout
Open

Fix WebDriver timeout in TestQueryBuilder_MasterCheckedForMasterLabelQuery#4872
DanielRyanSmith wants to merge 1 commit intomainfrom
fix-webdriver-timeout

Conversation

@DanielRyanSmith
Copy link
Copy Markdown
Contributor

Overview

This PR fixes a flaky timeout error in the TestQueryBuilder_MasterCheckedForMasterLabelQuery WebDriver test running on Firefox.

Root Cause / Motivation

The test previously used FindShadowElement, which eagerly resolved the <wpt-app> element and passed it across multiple Javascript executions via Geckodriver to find the #master-checkbox inside the nested Shadow DOM of test-runs-query-builder. In Firefox, referencing this element before the Custom Element Polyfill finished upgrading it caused Geckodriver to fail to locate the nested element, leading to the 30-second timeout.

Detailed Changelog

  • webdriver/builder_test.go: Replaced the FindShadowElement call with a direct ExecuteScriptRaw invocation that evaluates document.querySelector('wpt-app') and its corresponding Shadow DOM down to the #master-checkbox in a single Javascript execution. It returns the element array for DecodeElements, ensuring the browser always queries the live DOM state and avoids stale references.

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