Commit Graph

716 Commits

Author SHA1 Message Date
Dmitry Gozman
f2ad5bbfbb
fix(isVisible): return false during navigation (#22943)
Instead of throwing "Execution context was destroyed" error.

Drive-by: improve internal error messages for `ScopedRace` errors.

Fixes #22925.
2023-05-10 16:56:59 -07:00
Dmitry Gozman
80f46892cd
fix(getByLabel): ignore empty aria-label (#22935)
Accessible name computation ignores empty aria-label, and so should
getByLabel.

Fixes #22915.
2023-05-10 10:38:46 -07:00
Alexander Sorokin
cbf4f39957
fix: React selectors should work after unmount (#22750)
Fixes #22729
2023-05-10 06:18:01 -07:00
Pavel Feldman
2ead6e530f
docs: remove the networkidle mentions (#22906)
Fixes https://github.com/microsoft/playwright/issues/22897
2023-05-09 09:34:57 -07:00
Pavel Feldman
5fb426e7db
fix(webkit): do not update console counter on unhandled rejections (#22890)
Fixes https://github.com/microsoft/playwright/issues/22886
2023-05-08 18:50:40 -07:00
Dmitry Gozman
160888df99
feat(locators): reland locator.and(locator) (#22850)
Removed in #22223.
Fixes #22585.
2023-05-05 11:14:01 -07:00
Dmitry Gozman
42328478ea
feat: make console/dialog events based on subscription (#22835)
This way we do not send events from the server unless the client is
interested.

Fixes #22621.
2023-05-05 11:12:33 -07:00
Andrey Lushnikov
99d4887053
feat(firefox): roll to r1403 (#22540)
Fixes https://github.com/microsoft/playwright/issues/22082
Fixes https://github.com/microsoft/playwright/issues/20993
2023-04-21 21:45:41 -07:00
Max Schmitt
f6aa9f49ce
chore: make evaluate work with busted Array.prototype.map/push (#22528)
Fixes https://github.com/microsoft/playwright/issues/22460

Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2023-04-21 19:52:13 +02:00
☃ Elliot Shepherd
106fa45f50
feat(route): accept timeout to fetch (#22475)
Fixes: #22474
2023-04-20 08:41:33 -07:00
Pavel Feldman
d45efe881f
chore: don't leak from waitFor (#22465)
Fixes https://github.com/microsoft/playwright/issues/22458
2023-04-18 11:11:46 -07:00
Andrey Lushnikov
b7d06d4d24
test: worker network attribution is still not fixed in Firefox 113 (#22390)
We'll need to wait until it is fixed upstream.

References https://github.com/microsoft/playwright/issues/21760
2023-04-13 13:36:17 -07:00
Playwright Service
a5749c033d
feat(firefox): roll to r1396 (#22327)
Fixes https://github.com/microsoft/playwright/issues/21995
2023-04-11 08:49:44 -07:00
Andrey Lushnikov
8b8385b6cb
test: remove faulty test (#22321)
Turns out we cannot guarantee order of events in Firefox: it might
close the page before we get a response from renderer.

Thus removing a faulty test.

References https://github.com/microsoft/playwright/issues/20093
2023-04-10 20:12:39 -07:00
Yury Semikhatsky
8d2502ee62
test: make page-leaks tests pass in electron (#22277)
They've been failing
https://devops.playwright.dev/flakiness.html#filter_spec=page%2Fpage-leaks.spec.ts&test_parameter_filters=%5B%5D&timestamp=1680901928195
2023-04-07 17:20:49 -07:00
Dmitry Gozman
08cef43e82
feat(locator): remove locator.and and locator.not (#22223)
Not shipping for now, after API review.
2023-04-05 16:28:13 -07:00
Dmitry Gozman
35afb056ea
feat(locator): filter({ hasNotText }) (#22222)
The opposite of `filter({ hasText })`.
2023-04-05 14:13:28 -07:00
Andrey Lushnikov
29643a7bff
test: add regression tests for clicking (#22221)
https://github.com/microsoft/playwright/issues/21995
2023-04-05 13:20:39 -07:00
Dmitry Gozman
bc1de5f28d
feat(locator): filter({ hasNot }) (#22219)
This is the opposite of `filter({ has })`.
2023-04-05 12:45:46 -07:00
Playwright Service
8dd431745d
feat(firefox): roll to r1394 (#22199)
Fixes https://github.com/microsoft/playwright/issues/21621

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2023-04-05 11:39:23 -07:00
Dmitry Gozman
8bc7ed0469
test: remove element being dragged before drop (#22177)
This scenario hangs in Firefox, waiting for response to `mouseup` event.

References #21621.
2023-04-03 18:42:29 -07:00
Dmitry Gozman
ab85b23e67
fix(expect): report expect "Timed out" when it actually does (#22174)
Previously, it would say "Timed out" when page was closed at test
timeout, or not say "Timed out" when at least one element matched.

Fixes #21664.
2023-04-03 15:06:13 -07:00
Dmitry Gozman
26c00a97a5
fix(expect): do not produce logs twice (#22171) 2023-04-03 15:05:40 -07:00
Pavel Feldman
3b9e62432d
chore: do not leak on clicks (#22129)
Fixes #22115
2023-03-31 18:18:45 -07:00
Pavel Feldman
0d9ec60dc7
chore: implement jsHandle._objectCount in chromium (#22127) 2023-03-31 15:52:01 -07:00
MarcNum
fbdafc5fe3
feat: Adding trace option 'on-all-retries' (#21985)
Fixes: #21860
2023-03-31 13:04:24 -07:00
Max Schmitt
47c669caf2
test: fix service tests (#22111)
<img width="805" alt="image"
src="https://user-images.githubusercontent.com/17984549/229117984-1c70541b-7941-40e2-950d-a699e0fc4cc4.png">
2023-03-31 10:58:08 -07:00
Dmitry Gozman
a95ced0fef
fix(waitFor): when frameLocator does not match, resolve hidden/detached states (#22119)
Fixes #21879.
2023-03-31 10:54:07 -07:00
Dmitry Gozman
539d9873c2
feat: rename Locator.filter(locator) to Locator.and (#22101) 2023-03-30 14:41:30 -07:00
Dmitry Gozman
e6148bb725
feat: Locator.not(locator) (#22066) 2023-03-30 08:52:30 -07:00
Pavel Feldman
968abd27d5
chore: do not use attributes for trace target annotation (#22075)
Fixes: https://github.com/microsoft/playwright/issues/22004
2023-03-29 23:17:17 -07:00
Dmitry Gozman
548e4a0c0f
fix(role): account for unslotted elements being hidden for aria (#22070)
When element is not assigned to any slot in the shadow root, it is not
rendered and is considered hidden for ARIA in all browsers.

In Chromium/Firefox we use `Element.checkVisibility` that already
handles this, but in WebKit we have to check it manually.

Fixes #21487.
2023-03-29 17:08:05 -07:00
Dmitry Gozman
6929214dbf
feat(expect): expect(locator).toBeAttached() (#22067)
Fixes #13467.
2023-03-29 11:09:17 -07:00
Andrey Lushnikov
0b170ddc12
test: enable some of the previously disabled tests (#22047)
Fixes https://github.com/microsoft/playwright/issues/21549
2023-03-29 10:52:55 -07:00
Playwright Service
d8f5a3f2ce
feat(firefox-beta): roll to r1394 (#22052)
References https://github.com/microsoft/playwright/issues/21760

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2023-03-29 10:47:31 -07:00
Dmitry Gozman
525097d465
feat: Locator.filter(locator) (#21975)
Produces a locator that matches both locators.
Implemented through `internal:and` selector.

Fixes #19551.
2023-03-27 14:29:30 -07:00
Dmitry Gozman
d10fac4f6a
feat: Locator.or(locator) (#21884) 2023-03-22 15:28:59 -07:00
Yury Semikhatsky
e7d670e27b
test: waitFor(hidden) should succeed when frame is not in dom (#21880)
Failing test for https://github.com/microsoft/playwright/issues/21879
2023-03-22 08:56:50 -07:00
Dmitry Gozman
8accabdb59
test: gardening (#21814)
Notable changes:
- `page-event-crash` is not a page test, moving out of page/.
- One of the expect tests is directly covered by another, merging them.
2023-03-20 12:52:52 -07:00
Yury Semikhatsky
98befd8a16
test: run crash tests in separate worker (#21759)
Running crash tests in its own worker should ensure that the browser
logs from different tests are not interleaved:

<img width="1088" alt="image"
src="https://user-images.githubusercontent.com/9798949/225965857-9152a88e-a775-4935-955a-dd7e6b88409a.png">
2023-03-17 10:36:01 -07:00
Andrey Lushnikov
f192a74c5d
test: reenable screenshot test on firefox (#21738)
Fixes #20522
2023-03-17 01:37:39 -07:00
Pavel Feldman
c45d8749b0
chore: split trace events into phases (#21696) 2023-03-15 22:33:40 -07:00
Yury Semikhatsky
716d451be5
test: use toHaveURL in the new test (#21667) 2023-03-14 09:23:00 -07:00
Yury Semikhatsky
c691d1f436
test: skip "should respect the drop effect" in headed (#21648)
https://github.com/microsoft/playwright/issues/21646
2023-03-13 19:04:09 -07:00
Yury Semikhatsky
6b3e7faad5
test: url bar navigation vs js redirect (#21640)
The tests document current behavior when url bar navigation competes
with a js redirect.

Fixes #20749
2023-03-13 17:53:39 -07:00
Playwright Service
4e807f9824
feat(firefox): roll to r1390 (#21591) 2023-03-13 16:43:49 -07:00
Andrey Lushnikov
8abe9fcf22
tree gardening: disable & assign failing tests (#21575)
References https://github.com/microsoft/playwright/issues/21574
References https://github.com/microsoft/playwright/issues/21549
2023-03-10 12:04:25 -08:00
Andrey Lushnikov
870edd1aae
feat(firefox): roll Firefox to 1387 (#21542)
Fixes #21109
Fixes #21430
2023-03-10 09:25:54 -08:00
Andrey Lushnikov
7a1c5b2aa3
test: make the tree green (#21551)
References https://github.com/microsoft/playwright/issues/20522
References https://github.com/microsoft/playwright/issues/20993
References https://github.com/microsoft/playwright/issues/21435
References https://github.com/microsoft/playwright/issues/21512
References https://github.com/microsoft/playwright/issues/21549
References https://github.com/microsoft/playwright/issues/21550
2023-03-09 16:56:29 -08:00
Max Schmitt
77c9641215
test: make Android bots green (#21450) 2023-03-07 17:53:39 +01:00
Max Schmitt
41dc45d471
test: add test for page.goto with hash at the end (#21437)
https://github.com/microsoft/playwright/issues/21430
2023-03-07 17:53:30 +01:00
Dmitry Gozman
0c5d46bb94
feat: allow chaining locators with Locator.locator(anotherLocator) (#21391) 2023-03-03 14:50:53 -08:00
Andrey Lushnikov
bfc895787f
fix(firefox): fix reload with hash URLs (#21322)
Fixes #21145
2023-03-01 18:56:30 -08:00
Andrey Lushnikov
4d3b056f27
test: add more tests for reload (#21296)
Make sure `page.reload()` doesn't reload a related popup and
only reloads target page.
2023-03-01 10:52:55 -08:00
Andrey Lushnikov
b607c92651
test: add a regression test for reload bug in firefox (#21282)
References https://github.com/microsoft/playwright/issues/20791
2023-02-28 16:05:12 -08:00
Dmitry Gozman
27027658dc
chore: fix all Proxy() to account for symbol properties (#21272)
Fixes #20940.
2023-02-28 12:45:14 -08:00
Andrey Lushnikov
dd9a8da901
test: fix retargeting test on firefox (#21157)
The test was regressed in
https://github.com/microsoft/playwright/pull/21124

Fixes #21141
2023-02-23 07:35:58 -08:00
Max Schmitt
8b8444dacc
test: page.reload() on a page with a hash (#21152)
https://github.com/microsoft/playwright/issues/21145
2023-02-23 13:22:22 +01:00
Andrey Lushnikov
434fa470e3
test: fix page.goto test on Firefox (#21132)
Turns out Firefox can yield either of the two errors, depending
on the stage of the pending navigation.
2023-02-22 19:18:49 -08:00
Yury Semikhatsky
f61d02e46f
test: update selection expectations after roll (#21124)
https://github.com/microsoft/playwright/issues/20820
2023-02-22 17:24:04 -08:00
Andrey Lushnikov
3ff3567c89
test: update context menu tests (#21126)
It turns out these new contextmenu-based tests do not work on
Chromium-based browsers on Windows.

We consider context menu support a best-effort, so we skip them
for now.
2023-02-22 17:22:56 -08:00
Yury Semikhatsky
2bb6bc7ad0
test: mark new test as failing in ff (#21122)
The test is failing for overridden Date in Firefox.

#21109
2023-02-22 16:36:39 -08:00
Yury Semikhatsky
d6dae8ea1f
fix: eval serialization w/ overridden URL/RegExp/Date (#21112)
Fixes #21109
2023-02-22 15:45:42 -08:00
Pavel Feldman
3f8f2a0fdd
chore: do not use library stack capturer in test runner (#21075) 2023-02-21 19:24:17 -08:00
Andrey Lushnikov
07bb483156
test: add tests for input with open context menu (#21081)
These might be failing on certain platforms and browsers.

References #20823
2023-02-21 15:57:29 -08:00
Pavel Feldman
06fc72b6ed
revert(#12706): also fix related bugs it introduced (#21070) 2023-02-21 14:15:11 -08:00
Andrey Lushnikov
72942e81d5
chore: fixes to toBeInViewport (#20870) 2023-02-13 15:21:40 -08:00
Dmitry Gozman
6b69d23f44
fix(actions): ignore indeterminate for isChecked api (#20834)
Fixes #20190.
2023-02-10 18:56:45 -08:00
Dmitry Gozman
789b1c75e6
fix(expect): report received when timedOut during oneShot (#20806) 2023-02-10 14:59:21 -08:00
Pavel Feldman
6920a82f50
test: add fixme's (#20826)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-02-10 19:54:00 +01:00
Andrey Lushnikov
68e170ef89
feat: implement expect(locator).toBeInViewport() (#20668)
The method accepts a `ratio` option to assert the ratio
of the element in viewport. `ratio` defaults to `Number.MIN_VALUE`.

NOTE: this reverts commit d950f5b6ee and
adds `ratio` option support + does the rename.

Fixes #8740
2023-02-10 04:33:22 -08:00
Pavel Feldman
0678b6575f
chore(watch): allow toggling browser (#20738) 2023-02-08 08:36:02 -08:00
Dmitry Gozman
edfff8cd8c
test: run more tests in 'service' mode (#20734) 2023-02-07 18:25:33 -08:00
Dmitry Gozman
2d3e4027e7
fix(chromium): do not pre-populate non-preflight OPTIONS requests (#20684)
Fixes #20469.
2023-02-07 15:10:44 -08:00
Dmitry Gozman
fbccc8ef64
fix(role): closed <details> are considered hidden (#20726)
Fixes #20610.
2023-02-07 15:10:18 -08:00
Andrey Lushnikov
852b4bee0c
test: add a test for a button that closes popup (#20672)
References #20093

Signed-off-by: Andrey Lushnikov <aslushnikov@gmail.com>
2023-02-06 14:25:21 -08:00
Andrey Lushnikov
b736b0cc2d
test: add test with wheel events and opened popup (#20620)
This should be merged once Firefox Stable 1376 is rolled in.

References #19685
2023-02-06 14:23:14 -08:00
Andrey Lushnikov
1120b82ba2
feat(firefox): roll Firefox & Firefox Beta (#20670)
Fixes #19685 
Fixes #20093
2023-02-06 14:08:32 -08:00
Yury Semikhatsky
9303dd552d
test: enable span scroll in webkit (#20681)
Fixes #20165
2023-02-06 12:29:58 -08:00
Yury Semikhatsky
492e9f6d7c
test: scroll into view span element (#20628)
https://github.com/microsoft/playwright/issues/20165
2023-02-04 10:32:53 -08:00
Andrey Lushnikov
9c6a1a6ff0
fix: make sure screenshots work when main page context is tampered (#20615)
This patch has 2 fixes:
- screenshot code was accidentally using main page context to fetch
  page layout metrics instead of a utility context
- Avoid usage of `self.eval` inside utility context since it escapes
Firefox sandbox. This turns out to be an upstream bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1814898

Fixes #20434
2023-02-03 10:01:23 -08:00
Yury Semikhatsky
cf76d47e22
test: update 'should handle custom dataTransfer' expectation (#20595)
Headless linux was fixed by recent webkit roll, but it turns out the
test has been failing on webkit windows too.

#18013
2023-02-02 10:26:47 -08:00
Playwright Service
f56d29709e
feat(firefox-beta): roll to r1377 (#20516)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2023-02-02 07:14:18 -08:00
Yury Semikhatsky
8f229fac9e
test: custom dataTransfer type (#20571)
#18013
2023-02-01 17:18:58 -08:00
Dmitry Gozman
6ad4687f4d
feat(route): add maxRedirects option to Route.fetch (#20567)
References #20501.
2023-02-01 14:43:21 -08:00
Dmitry Gozman
c27ad35299
fix(locators): properly escape slash inside attributes (#20510)
Fixes #20471.
2023-01-30 13:27:41 -08:00
Yury Semikhatsky
cffe7b65e3
fix: do not hang on submitting target=_blank form (#20458)
Fixes #18392
2023-01-30 11:13:56 -08:00
Yury Semikhatsky
03b15f6550
test: submit form with target=_blank (#20462)
#18392
2023-01-30 08:37:05 -08:00
chimurai
f72d400952
chore: fix typos (#20473) 2023-01-30 09:53:28 +01:00
Dmitry Gozman
821949d580
test: update stale test expectations (#20423) 2023-01-27 21:52:34 -08:00
Yury Semikhatsky
bb01d99458
test: enable "intercept css variable with url" (#20455)
Fixes #19158
2023-01-27 11:09:40 -08:00
Dmitry Gozman
ead4989947
fix(api): Response.finished() throws when target closes (#20453) 2023-01-27 10:42:43 -08:00
Andrey Lushnikov
2af31edadd
feat: roll Firefox and Firefox-Beta to latest builds (#20449)
These builds initiate browser-side navigation for `page.goto` command.

Drive-by: add a minimal file URL test.
2023-01-27 09:31:45 -08:00
Andrey Lushnikov
9ca9b08d90
fix: better formatting for sparse arrays (#20379)
Right now arrays preview yields all array elements. In case
of a sparse array with a single element on index 10000000,
this results in a large string that OOM Node.js.

This patch changes pretty-printing. For example:

```ts
// Given this array
const a = [];
a[10] = 1;
// Before this patch, pretty printing will yield:
"[,,,,,,,,1]"
// With this patch, pretty printing yields:
"[empty x 9, 1]"
```

The new array pretty-printing is equal to what Chrome DevTools
do to render sparse arrays.

Fixes #20347
2023-01-27 05:07:55 -08:00
Yury Semikhatsky
0a9cf85653
test: intercept request from css variable (#20422)
#19158
2023-01-26 14:20:24 -08:00
Yury Semikhatsky
e8a1c91c52
test: enable test on webkit (#20404)
The fix is included into the recent webkit roll.

Fixes #20079
2023-01-26 10:13:21 -08:00
Playwright Service
d7366cfc7c
feat(chromium-tip-of-tree): roll to r1080 (#20323)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-01-25 10:23:12 +01:00
Playwright Service
00edf587d5
feat(webkit): roll to r1773 (#20342)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2023-01-25 10:03:50 +01:00
Yury Semikhatsky
7fcec1a06b
test: file input triggers input event only once (#20306)
#20079
2023-01-23 17:56:02 -08:00
Dmitry Gozman
d950f5b6ee
chore: remove toIntersectViewport for the next release (#20232)
Mostly reverts #19901.
2023-01-19 15:04:09 -08:00