webdriver: Use take_screenshot() API in Take (Element) Screenshot#39587
Merged
webdriver: Use take_screenshot() API in Take (Element) Screenshot#39587
take_screenshot() API in Take (Element) Screenshot#39587Conversation
a63171f to
3e8e76c
Compare
|
🔨 Triggering try run (#18154620981) for Linux (WPT) |
WebView::take_screenshot() API in Take Screenshot
|
Test results for linux-wpt from try job (#18154620981): Flaky unexpected result (27)
Stable unexpected results that are known to be intermittent (35)
Stable unexpected results (1)
|
|
|
Member
Author
|
mrobinson
approved these changes
Oct 1, 2025
e8494e8 to
a8755f7
Compare
WebView::take_screenshot() API in Take Screenshottake_screenshot() API in Take (Element) Screenshot
yezhizhen
reviewed
Oct 1, 2025
Member
There was a problem hiding this comment.
tests/wpt/meta/webdriver/tests/classic/take_element_screenshot/scroll_into_view.py.ini
Testing: This causes a WebDriver conformance test to pass.
See #39306 (comment)
This always passes locally since a few days ago, but is always flaky in CI. And it still is.
#39587 (comment)
Co-authored-by: Martin Robinson <[email protected]> Signed-off-by: Delan Azabani <[email protected]>
a8755f7 to
cf3fe23
Compare
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 1, 2025
this patch updates the expectations for tests that use testdriver.js, which currently only work with `--product servodriver` (#34683), running the tests with #39587. expectations for all other tests, which don’t use testdriver.js, are unaffected. Testing: this patch updates test expectations, though the tests are not yet run in CI Signed-off-by: Delan Azabani <[email protected]> Co-authored-by: Martin Robinson <[email protected]>
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.
WPT tests require us to reliably take screenshots when test pages are fully loaded and testing is complete, and the WPT runner uses test-wait.js to do this in userland. when testing Servo with --product servo, we use servoshell’s --output option, which backs that up with more reliable waiting in Servo. but when testing Servo with --product servodriver, we use the WebDriver Take Screenshot action, which currently takes the screenshot immediately. we think this might be a source of regressions.
this patch makes the WebDriver actions Take Screenshot and Take Element Screenshot use the same new WebView::take_screenshot() API as servoshell’s --output option, such that those actions now wait for a variety of conditions that may affect test output. it’s not clear if this is conformant, so we may want to refine this to only wait when running tests at some point. other changes:
Testing: This should fix some flaky tests.
Fixes: #36715.
Fixes: (partially) #39180.
Fixes: (partially) #34683.