1573 Commits

Author SHA1 Message Date
Andrey Lushnikov
da1dafcadb
fix: start downloading firefox build for ubuntu 20.04 (#6064)
Custom firefox build for Ubuntu 20.04 fixes WebGL on headful.
2021-04-02 22:08:04 -07:00
Andrey Lushnikov
4da2d6e104
feat(firefox): roll Firefox to r1244 (#6052)
Fixes #5929
Fixes #6001
2021-04-02 15:41:54 -07:00
Yury Semikhatsky
561cb23e8d
fix: dispatch popup event on the client end (#6044) 2021-04-02 11:15:07 -07:00
Yury Semikhatsky
4f2827f302
fix(dom): click on links inside shadow dom (#5850) 2021-04-02 10:36:24 -07:00
Pavel Feldman
a7630c91d5
api: remove Chromium* classes (#6040) 2021-04-01 18:47:14 -07:00
Max Schmitt
d862deeadf
fix(deps): added missing unicode and emoji dependencies (#6039)
Fixes #6033
2021-04-01 17:54:19 -07:00
Dmitry Gozman
8f71f5971b
fix(input): do not retarget from input/textarea/select to an ancestor button (#6036)
Although such markup is not expected, it happens in the wild. Retargeting
in this case in unexpected, so we check/click/etc the control itself.
2021-04-01 12:30:05 -07:00
Yury Semikhatsky
16d98cb48a
chore(launcher): add more logging to processKill (#6025) 2021-03-31 12:17:16 -07:00
Andrey Lushnikov
f472c96129
feat: support webkit technology preview (#5885)
This patch adds support for `technology preview` webkit channel, which
we will keep close to the actual Safari Technology Preview releases.

This channel does not install by default. It is supposed to be installed
with the following CLI command:

```sh
$ npx playwright install webkit-technology-preview
```

Once the channel is installed, it can be used the following way:

```js
const browser = await playwright.webkit.launch({
  channel: 'technology-preview',
});
```

**NOTE:** if clients attempt using the channel without installing it,
it'll throw an error with a copyable instructions to install via CLI.

References #5884
2021-03-31 11:32:10 -07:00
Dmitry Gozman
9d9599c6a6
api(video): implement video.saveAs and video.delete (#6005)
These methods are safe to call while the page is still open, or when it is
already closed. Works in remotely connected browser as well.

Also makes video.path() to throw for remotely connected browser.

Under the hood migrated Download and Video to use the common Artifact object.
2021-03-31 10:38:05 -07:00
Yury Semikhatsky
9532d0bde0
feat(webkit): bump to 1457 (#6021) 2021-03-31 10:29:43 -07:00
Yury Semikhatsky
587682e024
feat(chromium): bump to r865012 (#5963)
References #5858

Co-authored-by: Andrey Lushnikov <lushnikov@chromium.org>
2021-03-31 09:51:18 -07:00
Pavel Feldman
85ab1dc7a4
feat(waitForURL): add a new waitForURL api (#6010) 2021-03-30 21:51:22 -07:00
Dmitry Gozman
98f1f715c5
chore: ensure we emit Page event before resoliving pageOrError (#6012)
Internal callers of pageOrError should be able to rely on the
Page being already reported.
2021-03-30 17:35:42 -07:00
Yury Semikhatsky
77993c3ebb
fix(installer): add libx11-xcb1 to the list of chromium deps (#6003) 2021-03-30 11:29:21 -07:00
Yury Semikhatsky
28b14fc5f7
feat(docker): use playwright install-deps for building docker image (#5995) 2021-03-29 23:48:54 -07:00
Pavel Feldman
f1c0d09765
feat(size): emulate window.screen size (#5967) 2021-03-29 14:10:58 -07:00
Yury Semikhatsky
8c6822bd32
fix(docker): update native deps and docker files for chromium (#5989) 2021-03-29 13:43:31 -07:00
Mosan
2262d8739f
Update nativeDeps.ts (#5988) 2021-03-29 12:19:34 -07:00
Yury Semikhatsky
0943af2806
fix: kill browser if process doesnt exit for 30s after close (#5968) 2021-03-27 09:59:04 -07:00
Max Schmitt
dfe07818e6
docs: fixed various typos (#5958) 2021-03-26 10:47:16 -07:00
Joel Einbinder
3ce02a95c8
fix(selectors): properly generate selectors for tricky ids (#5940) 2021-03-25 18:43:33 -07:00
Dmitry Gozman
6b3f4cd12b
chore: calculate video size in a single place (#5942) 2021-03-24 10:56:20 -07:00
Dmitry Gozman
8e97607389
fix(viedo): do not stall video in popups (#5941)
There are two problems, exposed by existing tests:

- We do not send Page.startScreeencast before Runtime.runIfWaitingForDebugger
  because we launch video recorder in between. This stalls when the page is busy
  immediately after resuming, e.g. with alert().
  Fixed by starting video recorder in advance.

- We wait for the first frame that may not come - for example, context-wide interception
  is blocking essential resource and first frame.
  Fixed by only waiting for the first frame before reporting the video, not the page.
2021-03-24 09:36:46 -07:00
Dmitry Gozman
2cf4caa4cf
chore: implement mixins in protocol.yml (#5932) 2021-03-24 06:37:10 -07:00
Pavel Feldman
543582b4ca
chore: expose channel name literals for types (#5922) 2021-03-23 13:21:03 -07:00
Andrey Lushnikov
ec6453d1b2
fix: installer compilation (#5908)
For some reason typescript can't find electron types when using
nested tsconfig - workaround the bug.

Drive-by: surface installer compilation problems.
2021-03-22 17:39:03 -07:00
Andrey Lushnikov
2064d27dc6
fix(installer): retain browsers installed via Playwrigth CLI (#5904)
Browser registry is responsible for 3 things:
1. Remove downloaded browsers if there are no packages that refer to them
2. Install default browsers needed for the current package
3. Install browsers on-demand when used through Playwright CLI

Currently, registry relies on a single "download" field in `browsers.json`
to carry both (1) and (2). However, browsers in (3) are marked as
`download: false` so that they aren't installed automatically in (2), so
auto-remove procedure in (1) removes them on subsequent installation.

One possible approach to fix this would be modifying package's `browsers.json` to
change `download: false` to `true` when browsers are installed with
Playwright CLI. This approach was explored here:
bc04a51800

We decided against this since we have a history of issues related to
package modifications after NPM installation. This breaks all
sorts of yarn/npm caching mechanisms.

Instead, this patch is a two-step refactor:
- remove the "download" field in `browsers.json`. Now, all registries
(including old ones from previously-released versions) will retain any
browsers that are mentioned in the `browsers.json`.
- add a new flag "installByDefault", that is **only used** for default
installation.

With this change, the registry tasks are done like this:
- (1) auto-removal: if browser has a back reference, it is retained,
otherwise it is removed from registry
- (2) default installation: use only `installByDefault` to carry default installations
- (3) CLI installation: simply installs browsers. Since we retain
everythings that's referenced in (1), browsers aren't removed.

Fixes #5902
2021-03-22 11:43:29 -07:00
Yury Semikhatsky
67c29e8155
chore: add missing await to floating promises (#5813) 2021-03-22 09:59:39 -07:00
Andrey Lushnikov
9a50304dc1
fix: work-around electron's broken event loop (#5867)
Since `setImmediate` doesn't create a new task in Electron,
we have to fallback to `setTimeout` instead.

See https://github.com/electron/electron/issues/28261 for details.

Fixes #5228
2021-03-18 09:29:37 -07:00
Pavel Feldman
d53cea7029
fix(pageOrError): throw in launchPersistentContext if context page has errors (#5868) 2021-03-18 08:14:57 -07:00
Andrey Lushnikov
bb21faf450
fix: disable firefox's webrender on Darwin (#5870)
References #5721
2021-03-18 00:23:23 -07:00
Pavel Feldman
2367039a2c
chore(stable): throw user-friendly message when ffmpeg is missing (#5865) 2021-03-17 19:19:44 -07:00
Pavel Feldman
84efdfcbc9
chore(autowait): auto-wait for top level navigations only (#5861) 2021-03-17 14:47:51 -07:00
Pavel Feldman
5ae731a3fb
chore(evaluate): respect signals when evaluating on handle (#5847) 2021-03-17 12:03:21 -07:00
Pavel Feldman
7011e5737a
chore(evaluate): explicitly annotate methods that wait for signals (#5859) 2021-03-17 10:47:07 -07:00
Andrey Lushnikov
ae460f01fc
devops: start downloading webkit fork on Mac 10.14 (#5837)
References #5833
2021-03-17 09:34:09 -07:00
Andrey Lushnikov
e8a33c4039
feat(firefox): roll Firefox to r1237 (#5849)
This patch rolls Firefox to r1237. Upstream firefox still struggles
with crashes with certain videos: https://bugzilla.mozilla.org/show_bug.cgi?id=1697004

This PR also workarounds this crash by disabling webrender.

References #5721
2021-03-16 23:27:39 -07:00
Pavel Feldman
bf36b487fc
fix(rimraf): allow 10 retires when removing the profile folder (#5826) 2021-03-16 19:31:35 -07:00
Yury Semikhatsky
8df4dcb0de
feat(webkit): bump to 1446 (#5844) 2021-03-16 17:23:42 -07:00
Pavel Feldman
d81ebff414
fix(inspector): do not collect action signals while on pause (#5843) 2021-03-16 12:06:12 -07:00
Pavel Feldman
5cf13612cf
chore: pretty print storage state (#5830) 2021-03-15 19:03:09 -07:00
Pavel Feldman
c2db8da4df
fix(inspector): await inspector init to avoid races (#5829) 2021-03-15 19:02:38 -07:00
E
095ad6339c
chore: update error message when using userDataDir arg (#5814) 2021-03-15 16:58:46 -07:00
Pavel Feldman
ea32ad2b09
infra(channel): add edge stable bot (#5825) 2021-03-15 16:00:52 -07:00
Pavel Feldman
95affe9387
chore: do not delete unused browsers when PLAYWRIGHT_SKIP_BROWSER_GC is specified (#5827) 2021-03-15 16:00:18 -07:00
Joel Einbinder
defd1a33be
fix(chromium): fix crash if connecting to a browser with a serviceworker (#5803) 2021-03-15 09:50:17 -07:00
Pavel Feldman
1dd6bd3316
infra(channel): wire release channel to all tests (#5820) 2021-03-15 08:07:57 -07:00
Pavel Feldman
a96d6a7dbb
feat: allow to pick stable channel (#5817) 2021-03-13 14:02:39 -08:00
Pavel Feldman
c4578f19f2
chore: organize per-browser dependencies (#5787) 2021-03-11 20:22:50 -08:00