Commit Graph

13 Commits

Author SHA1 Message Date
Dmitry Gozman
9f842da8b3
fix: throw when element handle is detached while waiting for selector (#32961) 2024-10-04 08:23:25 -07:00
Pavel Feldman
5752a28f87
chore: make tests strict (1) (#27731) 2023-10-23 09:31:30 -07:00
Max Schmitt
f48861ddee
fix(inspector): highlight xpath/css locators without engine prefix (#27742)
Motivation: As of today when a user inspects a Locator which is a xpath,
it won't work if the user has not prefixed it with `xpath=` because we
internally compare the given with the generated locator.

Works: `locator('xpath=//div[contains(@class, "foo")]')`
Does not work: `locator('//div[contains(@class, "foo")]')`

Relates
https://github.com/microsoft/playwright/issues/27707#issue-1952360264
Fixes
https://github.com/microsoft/playwright-dotnet/issues/2718#issuecomment-1771073816

---------

Signed-off-by: Max Schmitt <max@schmitt.mx>
2023-10-23 18:23:28 +02:00
Dmitry Gozman
c1b9a56079
chore: migrate waitForSelector to not use rerunnable task (#19715) 2022-12-27 13:39:35 -08:00
Dmitry Gozman
6a65a43e9a
chore: use consistent asLocator() in all logs (#18586)
References #18524.
2022-11-04 15:19:16 -07:00
Pavel Feldman
739b64a09a
chore: render typed locators in the recorder (#18162) 2022-10-18 16:39:58 -07:00
Ross Wollman
13dedd27ca
test: out-of-viewport should be considered visible (#13134)
Closes #13131.

Per the visibility spec on https://playwright.dev/docs/next/actionability#visible:

> Element is considered visible when it has non-empty bounding box and does not have visibility:hidden computed style. Note that elements of zero size or with display:none are not considered visible.

 non-empty bounding box
 does not have visibility:hidden

Given the above conditions are satisfied, the locator is considered visible.

https://github.com/microsoft/playwright/issues/8740 proposes something like `isInViewport()` that would be better suited for checking if an element is offscreen.
2022-03-28 16:10:16 -07:00
Pavel Feldman
f3fd3ebc37
chore(frame-selector): add more tests, use frame logic in element handle (#10097) 2021-11-05 16:36:01 -07:00
Dmitry Gozman
c373986ca0
fix(evaluate): reject all context operations when frame detaches (#9987) 2021-11-03 10:44:50 -07:00
Max Schmitt
cd22072685
chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
Dmitry Gozman
837ee08a53
fix(waitForSelector): retry when context is gone during node adoption (#6851)
There is a small window after finishing the "rerunnable task" where
we adopt the node to the main world and navigation could destroy the context.
2021-06-02 20:17:24 -07:00
Dmitry Gozman
217cbe3e21
test: cleanup bad usages of pageTest (#6430) 2021-05-06 07:08:22 -07:00
Dmitry Gozman
9433cae4fe
test: move all page tests to a subdirectory (#6427) 2021-05-05 19:10:28 -07:00