Commit Graph

704 Commits

Author SHA1 Message Date
Pavel Feldman
744eb6823f
chore: fix s2 mode (#24525) 2023-07-31 11:24:04 -07:00
Dmitry Gozman
c33a32dc9e
test: unflake two tests (#24416) 2023-07-26 06:50:38 -07:00
Pavel Feldman
b39fd7283f
chore: skip tests that fail in cross-machine service mode (#24412) 2023-07-25 16:47:04 -07:00
Pavel Feldman
33d62d9a97
chore: do not use relative xpath when querying from document (#24405)
Fixes https://github.com/microsoft/playwright/issues/24399
2023-07-25 12:55:35 -07:00
Andrey Lushnikov
fee08a6d3b
fix: properly handle character sets in globs (#24371)
https://github.com/microsoft/playwright/issues/24316
2023-07-24 09:49:05 -07:00
Dmitry Gozman
97d55e275d
fix(locator): locator(locator) method uses internal:chain instead of >> (#24235)
Usually, we can just chain two locators with `>>` to implement
`Locator.locator(locator)`. However, this does not play nicely with more
advanced inner locators like `or` and `and`:

```ts
const child = page.locator('input').or(page.locator('button'));
page.locator('parent').locator(child);
```

One would expect the above to locate "input or button" inside a
"parent". However, currently it locates "input inside a parent" or
"button", because it's translated to `parent >> input >>
internal:or="button"`.

To fix this, we have to wrap inner locator into `internal:chain` and
query it separately from the parent.

Fixes #23724.
2023-07-14 12:21:45 -07:00
Pavel Feldman
5d799606c3
chore: resolve top-level vs dependency after cli filtering (#24216) 2023-07-13 17:54:08 -07:00
Andrey Lushnikov
615f5afb2b
feat(firefox): roll Firefox to 1420 (#24205)
Fixes https://github.com/microsoft/playwright/issues/22753
2023-07-13 03:54:47 -07:00
Pavel Feldman
067faa50d7
chore: migrate Promise.race to scopes to prevent leaks (#24160) 2023-07-11 10:38:08 -07:00
Pavel Feldman
67ad2c2bf4
feat(ui): render all console / network messages in trace (#24115) 2023-07-10 12:56:56 -07:00
Andrey Lushnikov
11dce8d127
feat(firefox): roll Firefox to 1417 (#24069)
Fixes https://github.com/microsoft/playwright/issues/23280
2023-07-06 12:18:02 -07:00
Andrey Lushnikov
ea3a29eacd
feat(firefox): roll Firefox to 1415 (#24046)
Fixes https://github.com/microsoft/playwright/issues/23618
2023-07-05 11:58:38 -07:00
Dmitry Gozman
92c738b14a
test: unflake some tests (#23984) 2023-06-30 13:08:18 -07:00
Dmitry Gozman
1d0b48f18b
fix(route): handle escapes in the glob pattern (#23932)
Fixes #23303.
2023-06-28 16:33:04 -07:00
Dmitry Gozman
b0b429fed0
feat: support bigint in evaluates (#23930)
Fixes #22719.
2023-06-28 08:55:45 -07:00
Ben Hofferber
752176fd23
feat(goto): better navigation error message (#23609)
While this log message is only a sanity check, it is still beneficial to
have a message that can better inform what is happening when this
occurs.
2023-06-21 11:10:35 -07:00
Max Schmitt
5927b5e92b
test: unflake 'should return url with basic auth info' test (#23798)
On android there is no localhost. We should never use just localhost.
2023-06-20 11:06:30 +02:00
Dmitry Gozman
fe5c9dad4d
fix(locators): allow identical frameLocators inside and/or/has (#23740)
So, the following will work:

```
page.frameLocator('iframe').locator('span').or(page.frameLoactor('iframe').locator('div'))
```

The following will not work, because frame locators are not exactly the
same:

```
page.frameLocator('#iframe1').locator('span').or(page.frameLoactor('#iframe2').locator('div'))
```

Also improve the error message to be more readable and include the
locator.

Fixes #23697.
2023-06-19 15:22:26 -07:00
Andrey Lushnikov
e171194c86
feat(firefox): roll Firefox to 1414 (#23768)
- roll Firefox stable to 1414
- roll Firefox beta to 1414

Fixes #23138
2023-06-17 12:10:20 -07:00
Dmitry Gozman
09b1e3ffa9
fix(chromium): response.body() for worker requests should work (#23764)
Previously, worker requests used page's session to call
`Network.getResponseBody`.

Fixes #23750.
2023-06-16 20:44:32 -07:00
Max Schmitt
421872f130
test: rewrite 'should fulfill json' test (#23735) 2023-06-15 18:46:19 +02:00
Dmitry Gozman
c80a23842b
fix(css): relative-to-scope selectors work (#23665)
Chained selectors where the second part starts with a scope did not work
before:

```ts
page.locator('div').locator(':scope + span')
page.locator('div >> +span')
```
2023-06-13 10:27:25 -07:00
Dmitry Gozman
dd417d83d9
fix(locators): escape >> inside a regular expression (#23631)
To avoid selector being parsed as a chain.

Fixes #23540.
2023-06-12 10:34:37 -07:00
Dmitry Gozman
5cfd6d9fe9
fix(cr network): emit sw-handled requests when routing is enabled (#23589)
Previously, such requests were skipped because they never receive
`Fetch.requestPaused` as there was no real network.

Also cleanup some redundant tests and move them from chromium-only file.

Fixes #23424.
2023-06-08 10:33:28 -07:00
Max Schmitt
3c2a8fa306
chore: enable no-floating-promises ESLint rule for tests (#23376)
https://github.com/microsoft/playwright/issues/23339
2023-06-02 21:59:12 +02:00
Dmitry Gozman
1d5add6d99
test: fix should not fulfill with redirect status (#23459) 2023-06-01 23:11:03 -07:00
Dmitry Gozman
6bb5c0a549
fix: make evaluate not wait for scheduled navigations (#23402)
Fixes #23141.
2023-05-31 14:08:44 -07:00
Dmitry Gozman
2505d48b32
test: skip and unflake tests (#23399)
- `should respect tracesDir and name` does not work with service mode;
- `isVisible during navigation should not throw` had a short timeout.
2023-05-31 10:52:29 -07:00
João Neves
7e6e5f0706
feat: Support React forwards refs and memo (#23262)
This PR fixes the react selector behavior to support components that are
wrapped by the memo or forwardRef React builtin functions.

Previously these components couldn't be selected. This PR fixes that
behavior, enabling selecting those components.

Current behavior:
```
const Foo = memo(() => <div id="foo_component" />);
Foo.displayName = "Foo";
...
playwright.$("_react=Foo") -> undefined
```

Fixed behavior:
```
const Foo = memo(() => <div id="foo_component" />);
Foo.displayName = "Foo";
...
playwright.$("_react=Foo") -> <div id ="foo_component" />
```
2023-05-30 17:14:47 -07:00
Max Schmitt
2710fd8d6f
fix: should be able to upload multiple large files (#23360)
Fixes https://github.com/microsoft/playwright/issues/23258
2023-05-30 18:41:09 +02:00
Dmitry Gozman
00b34dddb2
chore: move TestServer under test/ (#23287) 2023-05-25 15:11:16 -07:00
Yury Semikhatsky
e0600f4799
test: enable passing request type test (#23273)
Fixes #22812
2023-05-25 09:43:41 -07:00
Jasiel Guillén
700062c836
feat(screenshot): Add customizable color option for masked elements (#23185)
I added a new option to the screenshot method to customize the color of
the box when we want to mask some elements for the screenshot.

The default color is pink `#FF00FF`, but with this new option you can
specify the color you like the most, like a nice green `#00FF00`:

```js
await page.screenshot({
  mask: [page.locator('div').nth(5)],
  maskColor: "#00FF00",
})
```


![ss](https://github.com/microsoft/playwright/assets/23271049/05f754de-0ba6-47a3-ae3e-769720d3da3b)

---------

Signed-off-by: Jasiel Guillén <darkensses@gmail.com>
2023-05-22 18:44:44 -07:00
Yury Semikhatsky
33f3a6002d
test: xhr request type for main resource url (#23174) 2023-05-19 17:59:17 -07:00
Dmitry Gozman
be7984bdc9
fix(unroute): do not compare regexp instances (#23101)
References #23092.
2023-05-17 16:27:32 -07:00
Playwright Service
aa6eb41466
feat(webkit): roll to r1848 (#23032)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-05-16 12:13:58 +02:00
Max Schmitt
17ab777db5
chore: set min viewport for WK on Win to 250x240 (#22969)
Follow-up for https://github.com/microsoft/playwright/pull/22956.
2023-05-14 16:59:15 +02:00
Playwright Service
ba0c4951c3
feat(firefox-beta): roll to r1408 (#22978)
Fixes https://github.com/microsoft/playwright/issues/21760

---------

Signed-off-by: Andrey Lushnikov <aslushnikov@gmail.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2023-05-12 09:27:08 -07:00
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