-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Use page.locator in Playwright reports #26224
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #26224 +/- ##
==========================================
- Coverage 69.19% 69.17% -0.03%
==========================================
Files 1945 1945
Lines 75938 75946 +8
Branches 8458 8458
==========================================
- Hits 52545 52533 -12
- Misses 21208 21228 +20
Partials 2185 2185
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
superset/utils/webdriver.py
Outdated
page.wait_for_selector( | ||
".slice_container", timeout=self._screenshot_locate_wait * 1000 | ||
) | ||
for slice_container_elem in page.locator(".slice_container").all(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume all of these .all() methods are safe for the loop and will just return empty if none are present
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, page.locator
returns a Locator
object, not None
or list of html elements. Calling .all()
on Locator
that points to nothing returns an empty array.
(cherry picked from commit dbed64a)
(cherry picked from commit dbed64a)
(cherry picked from commit dbed64a)
(cherry picked from commit dbed64a)
SUMMARY
Per Playwright's docs,
page.wait_for_selector
method is deprecated. This PR replaces usages of that method withpage.locator
suggested by the docs.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
PLAYWRIGHT_REPORTS_AND_THUMBNAILS
feature flagADDITIONAL INFORMATION