A progress roughly corresponds to an api call. It is used:
- to collect logs related to the call;
- to handle timeout;
- to provide "cancellation token" behavior so that cancelable process can either
early-exit with progress.throwIfCanceled() or race against it with progress.race();
- to ensure resources are disposed in the case of a failure
with progress.cleanupWhenCanceled();
- (possibly) to log api calls if needed;
- (in the future) to augment async stacks.
This patch:
- drops dependency on playwright-core in all our packages. Instead of
the dependency, packages are now built with `//packages/build_package.sh`
script.
- unifies `browsers.json` - now there's a single `//browsers.json` file
that is used to manage browser revisions.
This patch temporary switches canary publishing to `--dryn-run` from CI/CD so that we
can verify that it does sane things.
We'll unify all our package management scripts under `//packages/` in a
follow-up.
Fixes#2268
While checking for hittarget, we first bubble from a target element
up to find the first element without `pointer-events: none` style.
This bubbling does not make much sense: we risk desperately clicking
"body" element, when we were actually asked to click some deeply-nested
"span".
Additionally, in many cases the original intent is to click a button. In this
case, we should use the enclosing "button" as a hit target directly.
Fixes#2175
Main request for an OOPIF starts in the parent session, and the oopif
session is create only after the response has been received. Therefore,
we should adopt the request after oopif session is created.
When capturing a screenshot with null viewport, we determine the screenshot size
based on body.offsetHeight. This is a very large number for long pages. We should
use window.innerHeight instead.
Since we are recommending Promise.all pattern anyway, this special
logic just adds to the possibility of timeout if something goes wrong.
For example, Firefox sometimes send Page.willOpenNewWindowAsynchronously
later than the new target arrives and input action just hangs.
We throw an exception and then gracefully close the browser.
If something went wrong, we should timeout before the test times out,
kill the process and report the original exception.