Commit Graph

745 Commits

Author SHA1 Message Date
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
Andrey Lushnikov
1b8b20dc25
chore: drop locator.viewportRatio() method (#20131)
As per API review discussion, we'd like to refrain from
exposing this method.
2023-01-19 08:46:45 -08:00
Andrey Lushnikov
780e64f2c6
test: fix toIntersectViewport test on WebKit @ Ubuntu 22.04 (#20132)
For some reason scrolling inline element into view doesn't
always work.
2023-01-16 00:11:33 -08:00
Pavel Feldman
d1c161ce99
chore: merge the util exports (#20110) 2023-01-13 13:50:38 -08:00
Dmitry Gozman
bd4efa9dc1
test: update tests for waituntil:commit (#20042)
Instead of never finishing the response which works differently across
browsers, stall the required script.
This makes "DOMContentLoaded" to never fire and properly tests the
"commit" signal.
2023-01-11 10:16:51 -08:00
Andrey Lushnikov
2a49c5e498
feat(expect): introduce expect(locator).toIntersectViewport() (#19901)
This is a new web-first assertion that should be used like this:

```ts
test('should work', async ({ page }) => {
  const locator = page.locator('body');
  // New web-first assertion.
  await expect(locator).toIntersectViewport();
  // The same functionality.
  await expect.poll(() => locator.viewportRatio()).toBeGreaterThan(0);
});
```

Fixes #8740
2023-01-06 16:56:24 -08:00
Andrey Lushnikov
1385007185
test: fix locator.viewportRatio() tests (#19931)
Drive-by: make sure `locator.viewportRatio()` returns `0`
for non-existing element.
2023-01-06 16:55:38 -08:00
Max Schmitt
4359111289
test: unskip wk test (#19903) 2023-01-05 22:51:08 +01:00
Andrey Lushnikov
3883799d68
feat: introduce locator.viewportRatio (#19761)
References #8740
2023-01-05 10:49:32 -08:00
Playwright Service
abe901d598
feat(chromium-tip-of-tree): roll to r1074 (#19853)
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-01-05 19:04:20 +01:00
Andrey Lushnikov
caec93ef42
test: enable ssim-cie94 image comparison algorithm for our tests (#19313) 2022-12-29 23:48:28 -08:00
Dmitry Gozman
c1b9a56079
chore: migrate waitForSelector to not use rerunnable task (#19715) 2022-12-27 13:39:35 -08:00
Dmitry Gozman
24f2ccb4ca
feat(getByLabel): support aria-label (#19726)
References #19284.
2022-12-27 12:43:55 -08:00
Dmitry Gozman
0087bfac23
fix(role): update allowsNameFromContent to closer align with blink/gecko (#19692) 2022-12-27 09:06:46 -08:00
Pavel Feldman
7f5cd0aa8b
test(events): ensure events are dispatched in individual tasks (#19687)
Test for https://github.com/microsoft/playwright/issues/19685
2022-12-27 08:59:03 -08:00
Dmitry Gozman
cce29215f9
chore: make input actions not use rerunnable task (#19638) 2022-12-24 10:40:36 -08:00
Dmitry Gozman
eaae8ebbf3
chore: throw InvalidSelectorError from selector parser, add some tests (#19636) 2022-12-21 14:27:35 -08:00
Pavel Feldman
3afd83c8cc
chore: withdraw locator.enumerate (#19484) 2022-12-15 10:13:56 -08:00
Playwright Service
091234e57f
feat(firefox-beta): roll to r1372 (#19466)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-12-15 09:00:50 -08:00
Pavel Feldman
17a0074459
feat(api): introduce Locator.all, enumerate (#19461) 2022-12-14 16:42:50 -08:00
Dmitry Gozman
a27f1f744f
feat(getByLabel): support aria-labelledby (#19456)
Testing library also treats them equally.

Fixes #19284.
2022-12-14 13:51:05 -08:00
Max Schmitt
d418539309 test: make webview2 green 2022-12-14 09:47:42 +01:00
Pavel Feldman
d1559a0fcc
chore: route.fetch(postData) (#19436) 2022-12-13 14:01:39 -08:00
Pavel Feldman
6cadc56ea3
feat(api): allow getByTestId(regex) (#19419) 2022-12-13 08:43:13 -08:00
Max Schmitt
7b4ae20305
test: make webview2 green (#19429) 2022-12-13 08:39:16 -08:00
Pavel Feldman
7aa3935dcc
chore: match selected options by both value and label (#19316) 2022-12-07 09:04:32 -08:00
Fernando Garcia Llorente
cd4ccdfa29
feat: allow options in automatic screenshots (#19143)
Closes #9983 

Allowing Automatic Screenshots in `PlaywrightTestConfig` to have
`fullPage` & `omitBackground` as optional parameters.
2022-12-07 08:45:33 -08:00
Dmitry Gozman
4784dae10f
fix(role): accessibleName computation should walk the flat dom tree (#19301)
- When visiting `<slot>` element, descend into assigned nodes.
- When node has `assignedSlot`, skip it during regular traversal.

Fixes #18989.
2022-12-06 09:31:26 -08:00
Dmitry Gozman
81c8620bfe
chore: upgrade internal types to support TypeScript 4.9.3 (#19280)
Fixes https://github.com/microsoft/TypeScript/issues/51619

Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-12-05 17:22:25 -08:00
Max Schmitt
3565d97a36
feat(recorder): make it work with [contenteditable] (#19066)
https://github.com/microsoft/playwright/issues/19029
2022-12-01 12:41:03 -08:00
Playwright Service
dbe4362b9c
feat(firefox): roll to r1366 (#19185)
Fixes https://github.com/microsoft/playwright/issues/18307.

Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-11-30 19:13:11 -08:00
Pavel Feldman
f0e8d8f074
feat(api): introduce route.fetch and route.fulfill(json) (#19184) 2022-11-30 17:26:19 -08:00
Pavel Feldman
5ac426b3d5
chore: expose utility script to inner evaluates (#19147) 2022-11-29 16:57:11 -08:00
Zihua Li
0c6a0f40c6
feat(keyboard): support simple cut-pasting using meta+x/v (#18756) 2022-11-29 12:58:14 -08:00
Dmitry Gozman
4f72a895e9
fix(inspector): render expect.not correctly (#19125)
Also fixes the same in expect logs.

References #19083.
2022-11-28 20:50:16 -08:00
Max Schmitt
dd18792087
test: navigator.webdriver is set to true (#19065)
https://github.com/microsoft/playwright/issues/18307
2022-11-28 20:03:49 -08:00
Dmitry Gozman
8ad3bc7ff3
fix(role selector): expanded=false does not match elements without aria-expanded (#18929)
Fixes #18920.
2022-11-21 14:13:51 -08:00
Dmitry Gozman
941090f0c4
fix(click): account for transformed iframes (#18926)
- Properly convert coordinates for iframes with non-zero borders.
- IFrames that have `transform` anywhere in the ancestors skip
`hitPoint`-based check because we cannot reliably translate the viewport
point into frame document's coordinates.

Fixes #18245.
2022-11-18 16:51:39 -08:00
Diego Pino
b6ececf6e5
test: check channel is not null (#18908) 2022-11-18 06:12:55 -10:00
Dmitry Gozman
1ec0bb277d
feat(expect): ensure at least one expectation check, no matter the timeout (#18895)
References #18859.
2022-11-17 19:43:10 -08:00
Pavel Feldman
b1acc0d0ea
chore: render user-friendly intermediate match values (#18867) 2022-11-16 18:05:36 -08:00
Pavel Feldman
705df52500
test: skip a couple of a11y tests on Edge temporarily (#18824) 2022-11-15 10:02:06 -10:00
Dmitry Gozman
f5b4e499fb
fix(locators): frameLocator().nth serialized correctly (#18819)
Fixes #18798.
2022-11-15 10:50:46 -08:00
Max Schmitt
4b352acdce
test: fix webview2 & msedge tests (#18823) 2022-11-15 08:44:26 -10:00
Dmitry Gozman
a7b2b04588
fix(getByRole): name and exact (#18719)
Following the `getByText()` and other methods:

- By default, matching is substring and case-insensitive. Before, it was
only case-insensitive, but not substring.
- With new option `exact: true`, matching is full string and
case-sensitive.
- Matching always normalizes whitespace.
- Codegen generates `exact: false` by default.
- `internal:role` treats `[name="foo"i]` as non-exact match.

Various fixes:
- Updated `getByRole` docs to match the reality.
- Locator generator edge cases.
2022-11-11 15:58:36 -08:00
Dmitry Gozman
7c80b77c57
feat(clear): remove clear() methods from all classes except Locator (#18703)
The preferred way is to use the locator, so we should not encourage the
use of `ElementHandle` or `Page` in the new APIs.
2022-11-10 12:29:14 -08:00
Dmitry Gozman
cafa558845
fix(codegen): update priorites in selector generator (#18688)
- prefer `role=checkbox` over `input[type=checkbox]`
- prefer `#id` over `input[type=checkbox]` and `role=checkbox`
- prefer `text=foo` over `internal:has-text=foo`
- ignore `none` and `presentation` roles
- remove non-strict support
2022-11-09 17:22:13 -08:00
Dmitry Gozman
28d3f48a65
test: gardening (#18623)
- Separate worker for some Android tests.
- Use png comparator for some screenshots tests instead of buffer
equality.
- Skip drag&drop tests on Android.
- Various timeout fixes.
2022-11-07 15:35:21 -08:00
Dmitry Gozman
6a65a43e9a
chore: use consistent asLocator() in all logs (#18586)
References #18524.
2022-11-04 15:19:16 -07:00
Dmitry Gozman
3a24e88e61
test: enable "should not crash when force-clicking hidden input" on chromium (#18576)
Fixed by the latest roll.
2022-11-04 10:39:51 -07:00
Dmitry Gozman
227f47effb
feat(firefox): roll to 1364 and 1367, rebase page-drag.spec (#18559) 2022-11-04 08:53:50 -07:00
Playwright Service
2d07c10888
feat(webkit): roll to r1735 (#18419) 2022-10-31 12:54:12 -07:00
Pavel Feldman
a7f5f2d7a1
chore: allow not overriding media when creating context (#18413) 2022-10-31 09:09:52 -07:00
Dmitry Gozman
e37757b44b
test: unflake some wheel tests (#18412) 2022-10-28 13:35:09 -07:00
Dmitry Gozman
90cf2b87b4
test: clicking hidden input should not crash/timeout (#18410)
References #18183.
2022-10-28 11:13:24 -07:00
Dmitry Gozman
0653692a5b
fix(selectors): :scope combined with other css should work (#18324)
Previously, we considered root when selector has `:scope` modifier, but
did not actually match it with other css specifiers, like in
`:scope.selected`.

Fixes #17824.
2022-10-25 14:31:39 -07:00
Max Schmitt
721ae2b3ed
fix: make reoccurring networkidle work (#18323)
Fixes https://github.com/microsoft/playwright/issues/18283

Signed-off-by: Max Schmitt <max@schmitt.mx>
2022-10-25 13:35:18 -07:00
Jean-François Greffier
0fe1998c72
feat(api): add clear() (#18296)
Add `clear()` method as a convenience shortcut for `fill('')`.
Implemented for AndroidDevice, ElementHandle, Frame, Locator and Page.

Fixes https://github.com/microsoft/playwright/issues/14041
2022-10-25 12:56:11 -07:00
Dmitry Gozman
3cd64e1449
fix(check): support all ARIA roles that could be aria-checked (#18304)
Fixes #18193.
2022-10-25 06:11:11 -07:00
Dmitry Gozman
329b3eadb4
feat: locator.blur() (#18303)
Note this is only available on Locator. Fixes #10724.
2022-10-25 06:10:40 -07:00
Dmitry Gozman
9a684d39ab
feat(firefox): prepare to fission roll (#18302)
- Handle `Runtime.executionContextsCleared` event.
- Skip one auto-waiting test, because navigations now happen
asynchronously.
2022-10-24 16:03:56 -07:00
Pavel Feldman
3f850d27e9
fix(highlight): fix the testing harness to be real (#18294) 2022-10-24 15:01:48 -07:00
Dmitry Gozman
48c44f2c78
fix(selectors): hasText and getByText exact match should consider full text (#18260)
Fixes #18259.
2022-10-21 16:29:45 -07:00
Pavel Feldman
739b64a09a
chore: render typed locators in the recorder (#18162) 2022-10-18 16:39:58 -07:00
Pavel Feldman
304a4ee8ec
chore: migrate to the internal:text selector (#18135) 2022-10-18 13:09:54 -07:00
Max Schmitt
70258d9c49
test: add 'getByTestId with custom testId should work' (#17966) 2022-10-10 22:17:38 +03:00
Yury Semikhatsky
639b28db3b
fix: noWaitAfter option for hover (#17856)
Fixes https://github.com/microsoft/playwright/issues/17833
2022-10-07 12:43:48 -07:00
Dmitry Gozman
b64457d8ce
fix(locators): make regex escape work when multiple spaces are present (#17893) 2022-10-06 16:23:40 -07:00
Pavel Feldman
8b018f6b41
chore: make role name case-insensitive (#17888) 2022-10-06 14:35:10 -07:00
Dmitry Gozman
a23ee6f14d
test: fix "getByText should work" with tracing enabled, docker smoke tests (#17864) 2022-10-05 21:31:25 -07:00
Pavel Feldman
f2685cab95
chore: use api selectors in codegen hover (#17855) 2022-10-05 17:59:34 -07:00
Dmitry Gozman
2bcd9ce9ae
chore: internal selectors (#17827)
- Rename internal selectors `has`, `control` and `attr` to
`internal:has`, `internal:control` and `internal:attr`.
- Fix `getByLabel()` to respect strictness, by introducing
`internal:label` selector.
- Move tests essential for ports to `selectors-by.spec`.
2022-10-05 08:45:10 -07:00