384 Commits

Author SHA1 Message Date
Dmitry Gozman d904a6129f chore: run check-deps for all packages (#21395) 2023-03-03 14:50:43 -08:00
Pavel Feldman 09f77c41dd chore: migrate to protocol's StackFrame type (#21198) 2023-02-24 18:36:15 -08:00
Pavel Feldman 8ccc02a9d3 chore: use client wall time in traces (#21163) 2023-02-23 14:37:53 -08:00
Pavel Feldman 55c95a4463 chore: do not send stacks as a part of the call metainfo (#21089) 2023-02-22 21:08:47 -08:00
Andrey Lushnikov 1db04f2839 fix: simplify protocol for toBeInViewport (#20960) 2023-02-16 11:02:19 -08: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
Dmitry Gozman d458e84f5b feat(route): match pattern on the server side (#20410)
This avoids client-side roundtrip for requests that are not handled by
any route.

Fixes #19607.
2023-01-27 10:43:19 -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 3883799d68 feat: introduce locator.viewportRatio (#19761)
References #8740
2023-01-05 10:49:32 -08:00
Pranav Jain 59118b83f9 feat(android): add support for passing CR args & proxy when launching browser (#19212)
Fixes https://github.com/microsoft/playwright/issues/19211
2022-12-12 16:15:19 +01:00
Dmitry Gozman 256e9fd443 feat(connect): allow exposing local network to the remote browser (experimental) (#19372)
`connectOptions: { _exposeNetwork: '*' | 'localhost' }`

References #19287.
2022-12-09 11:16:29 -08:00
Pavel Feldman 7aa3935dcc chore: match selected options by both value and label (#19316) 2022-12-07 09:04:32 -08:00
Andrey Lushnikov 6d82460a02 feat: implement a new image comparison function (#19166)
This patch implements a new image comparison function, codenamed
"ssim-cie94". The goal of the new comparison function is to cancel out
browser non-determenistic rendering.

To use the new comparison function:

```ts
await expect(page).toHaveScreenshot({
  comparator: 'ssim-cie94',
});
```

As of Nov 30, 2022, we identified the following sources of
non-determenistic rendering for Chromium:
- Anti-aliasing for certain shapes might be different due to the
  way skia rasterizes certain shapes.
- Color blending might be different on `x86` and `aarch64`
architectures.

The new function employs a few heuristics to fight these
differences.

Consider two non-equal image pixels `(r1, g1, b1)` and `(r2, g2, b2)`:
1. If the [CIE94] metric is less then 1.0, then we consider these pixels
   **EQUAL**. (The value `1.0` is the [just-noticeable difference] for
   [CIE94].). Otherwise, proceed to next step.
1. If all the 8 neighbors of the first pixel match its color, or
   if the 8 neighbors of the second pixel match its color, then these
   pixels are **DIFFERENT**. (In case of anti-aliasing, some of the
   direct neighbors have to be blended up or down.) Otherwise, proceed
   to next step.
1. If SSIM in some locality around the different pixels is more than
   0.99, then consider this pixels to be **EQUAL**. Otherwise, mark them
   as **DIFFERENT**. (Local SSIM for anti-aliased pixels turns out to be
   very close to 1.0).

[CIE94]: https://en.wikipedia.org/wiki/Color_difference#CIE94
[just-noticeable difference]:
https://en.wikipedia.org/wiki/Just-noticeable_difference
2022-12-02 15:22:05 -08:00
Pavel Feldman 5ac426b3d5 chore: expose utility script to inner evaluates (#19147) 2022-11-29 16:57:11 -08:00
Pavel Feldman a0ea9b5fba chore: simplify slowmo implementation (#18990) 2022-11-22 11:06:45 -08:00
Pavel Feldman 4e58b0c2ea chore: render timed out error message when expect timeouts (#18863)
Fixes https://github.com/microsoft/playwright/issues/18859
2022-11-16 17:00:42 -08:00
Pavel Feldman ca2e7ef199 chore: report paused signal to the debug controller clients (#18701) 2022-11-10 12:15:29 -08:00
Pavel Feldman c25e67a0e7 chore: conditionally dispatch network events (#18687) 2022-11-09 21:10:57 -08:00
Pavel Feldman 0355d8618f chore: use provided value for the generated test id (#18631) 2022-11-08 12:04:43 -08:00
Pavel Feldman 67c9624924 chore: send structured codegen info to the debug controller (#18491) 2022-11-01 18:02:14 -07:00
Pavel Feldman a7f5f2d7a1 chore: allow not overriding media when creating context (#18413) 2022-10-31 09:09:52 -07:00
Max Schmitt e25537f941 feat(android): add AndroidDevice.close event (#18306) 2022-10-25 18:18:14 -07:00
Pavel Feldman 37250cde17 chore: switch to the new debug controller harness (#18308) 2022-10-25 09:55:20 -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
Max Schmitt 805312b722 feat(android): add Android.{launchServer,connect} (#18263)
Fixes https://github.com/microsoft/playwright/issues/17538
2022-10-24 17:23:11 -07:00
Pavel Feldman d3948d1308 chore: enable debug controller testing (#18270) 2022-10-24 16:19:58 -07:00
Pavel Feldman 3c0832a0d9 chore: brush up the debug controller api (#18262) 2022-10-21 17:57:22 -07:00
Pavel Feldman 5b1e4e08a5 chore: detect browser reuse based on the connection headers (#18230) 2022-10-20 18:30:37 -07:00
Pavel Feldman 739b64a09a chore: render typed locators in the recorder (#18162) 2022-10-18 16:39:58 -07: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
Pavel Feldman f2685cab95 chore: use api selectors in codegen hover (#17855) 2022-10-05 17:59:34 -07:00
Pavel Feldman 06e73b414f chore: move connect utility into localUtils (#17590) 2022-09-27 13:05:06 -07:00
Pavel Feldman cb10ef3c71 chore: rename reuseController to debugController (#17520) 2022-09-21 15:35:52 -07:00
Pavel Feldman df143031e7 chore: move protocol and trace types into the top-level packages (#17486) 2022-09-20 18:41:51 -07:00