Commit Graph

1865 Commits

Author SHA1 Message Date
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
Oleg Lebedev
a185da9d14
chore: allow skipping host requirements validation (#5806) 2021-03-11 18:46:31 -08:00
Gilberto Saraiva
7fcb89269e
fix(firefox): ensure a exception catch when async send call to a dead object; (#5805) 2021-03-11 16:04:08 -08:00
Pavel Feldman
ad69b2af83
chore: unify recorder & tracer uis (#5791) 2021-03-11 11:22:59 -08:00
Yury Semikhatsky
ddfdf8a76a
fix: install chromium along with ffmpeg (#5774) 2021-03-10 14:01:35 -08:00
Pavel Feldman
fea6669473
feat(trace): highlight action target (#5776) 2021-03-10 11:43:26 -08:00
Pavel Feldman
1d6feb2ab8
fix(inspect): highlight on explore input change (#5726) 2021-03-09 07:44:10 -08:00
Max Schmitt
d311058245
fix(BrowserContext): race between continue and close (#5729) 2021-03-08 19:53:19 -08:00
Pavel Feldman
1a94ea5f6c
chore: refactor trace viewer to reuse snapshot storage (#5756) 2021-03-08 19:49:57 -08:00
Pavel Feldman
9e20566244
fix(postData): do not require content type when retrieving post data (#5736) 2021-03-05 21:25:14 -08:00
Dmitry Gozman
b3561e6c41
feat(chromium): bump to 857950 (#5742) 2021-03-05 18:09:38 -08:00
Yury Semikhatsky
976f35aaf7
fix: update codegen to produce set* instead of with* (#5738) 2021-03-05 14:05:48 -08:00
Yury Semikhatsky
26b7db964c
feat(cli): launch-server command (#5713) 2021-03-04 10:32:06 -08:00
Pavel Feldman
2af8b8ac74
chore: inspector snapshot nits (#5676) 2021-03-03 22:25:34 -08:00
Pavel Feldman
a9238ce2e1
feat(debug): introduce npx playwright debug (#5679) 2021-03-03 22:25:14 -08:00
Pavel Feldman
d3eff50386
feat(java): implement codegen (#5692) 2021-03-03 14:32:09 -08:00
Dmitry Gozman
d87522f2e6
fix(text selector): revert quoted match to match by text nodes only (#5690) 2021-03-03 10:51:10 -08:00
Dmitry Gozman
e4d33f56f4
fix(click): do not retarget from label to control when clicking (#5683)
And in other carefully considered cases.
2021-03-02 17:29:03 -08:00
Dmitry Gozman
ff243f1af5
fix(addInitScript): make it work on new pages without navigations (#5675) 2021-03-02 16:03:48 -08:00
Yury Semikhatsky
2cdb6b49cd
fix(inspector): inlcude sdkLang in the error (#5682) 2021-03-02 12:16:04 -08:00
Yury Semikhatsky
1a0ccc1383
feat(webkit): bump to 1443 (#5665) 2021-03-02 09:15:07 -08:00
Pavel Feldman
b253ee80c0
chore(snapshot): brush up, start adding tests (#5646) 2021-03-01 12:20:04 -08:00
Pavel Feldman
aeb2b2f605
feat(inspector): wire snapshots to inspector (#5628) 2021-02-26 14:16:32 -08:00
Andrey Lushnikov
c652794b5a
chore: bump webkit version (#5637)
Aligning with the latest Safari Technology Preview.
2021-02-26 12:15:15 -08:00
Yury Semikhatsky
4b541749ac
feat(webkit): bump to 1442 (#5622) 2021-02-25 23:39:48 -08:00
Pavel Feldman
992f808210
chore(snapshot): implement in-memory snapshot (#5624) 2021-02-25 13:09:26 -08:00
Dmitry Gozman
f7e5db4d6e
chore: remove ProgressController.abort (#5620)
It is used in a few places, but we can do a Promise.race.
This change will allow us to pass existing progress to
multi-step operations.
2021-02-25 10:00:54 -08:00
Pavel Feldman
2ff6d54f26
chore: extract snapshotter from trace viewer (#5618) 2021-02-25 09:33:32 -08:00
Pavel Feldman
af89ab7a6f
chore: make trace server generic (#5616) 2021-02-25 08:25:52 -08:00
Pavel Feldman
f72b098a04
chore: encapsulate parsed snapshot id in the trace viewer (#5607) 2021-02-24 19:29:16 -08:00
Dmitry Gozman
ca8998b11e
feat(log): prepend browser pid to browser logs (#5569)
To differentiate between multiple browsers.
2021-02-24 19:21:47 -08:00
Pavel Feldman
5ae2661134
chore: simplify overrides management in trace viewer (#5606) 2021-02-24 18:38:04 -08:00
Dmitry Gozman
0102e080f6
fix(text selector): make quoted selector match by text nodes (#5603)
This change turns quoted match to be case-sensitive (as before),
but not strictly full-string for the whole element's text.

This is a fix for a case where element contains text nodes and child elements:
```html
<div>text1<span>child node</span>text2</div>
```
We now match this div by `text="text1"` and `text="text2"`.
2021-02-24 16:32:38 -08:00
Pavel Feldman
8906ba332c
chore: spell overridden (#5605) 2021-02-24 15:11:34 -08:00
Pavel Feldman
c91159f3f7
chore: make stack filtering playwright dev-friendly (#5604) 2021-02-24 14:33:08 -08:00
Pavel Feldman
6bf3fe8432
chore: make trace model a class (#5600) 2021-02-24 14:22:34 -08:00
Pavel Feldman
f71bf9a42a
chore: move trace viewer into server (#5597) 2021-02-24 13:39:51 -08:00
Pavel Feldman
5fb77935ee
chore: move logic from sw to server (#5582) 2021-02-24 11:52:59 -08:00
Max Schmitt
070cfdcdb8
fix(inspector): skip stack trace playwright/src lines only under tests (#5594) 2021-02-24 11:34:48 -08:00
Max Schmitt
fefe37e96f
fix(inspector): stacktrace with browser specific NPM package (#5589) 2021-02-24 08:08:27 -08:00
Pavel Feldman
48c237b3cf
chore: move trace to server (#5565) 2021-02-23 22:08:14 -08:00
Joel Einbinder
8ef6cb731e
feat(codegen): use the name attribute for more elements (#5376) 2021-02-23 16:24:45 -08:00
Pavel Feldman
096ddab972
fix(inspector): hide drawer when recording (#5548) 2021-02-22 15:35:38 -08:00
Dmitry Gozman
b42c3690d3
fix(codegen): replace html lib with createElement (#5531)
We are not using html that much, since most of our UI moved
to the Recorder App. Getting rid of `innerHTML` assignment
fixes the TrustedTypes issue.
2021-02-22 11:38:49 -08:00
Andrey Lushnikov
eb9c8ce20c
feat(chromium): roll Chromium to Dev @ Feb 19, 2021 (#5536) 2021-02-22 11:17:55 -08:00
Pavel Feldman
6ec77dca9d
fix(inspector): fix the wait for event error rendering (#5517) 2021-02-20 14:36:19 -08:00
Yury Semikhatsky
1e327d4cb2
fix(bindings): unflake TestBrowserContextExposeFunction.shouldWork in java (#5532) 2021-02-19 18:58:32 -08:00
Pavel Feldman
600f731a67
feat(inspector): render api names from metainfo (#5530) 2021-02-19 18:12:33 -08:00
Pavel Feldman
f154a827c5
feat(inspector): send api names along with metainfo (#5518) 2021-02-19 16:21:39 -08:00
Dmitry Gozman
46c8c29f7a
fix(logs): restore pw:browser logs after launch has finished (#5527) 2021-02-19 16:09:38 -08:00
Yury Semikhatsky
5f9acfaccb
feat(webkit): bump to 1436 (#5513) 2021-02-19 13:47:47 -08:00
Zev Isert
cbcc609fa1
fix: return non-secure cookies with HTTPS URLs (#5507)
Cookies have a "Secure" attribute which tells the browsers
that a given cookie should only be sent via HTTPS. In it's
absense "Secure" is falsy and these cookies should be sent
with both HTTP and HTTPS requests. Playwright now returns
only the "Non-Secure" cookies for HTTP URLs, and both
"Secure" and "Non-Secure" cookies for HTTPS URLs.

Fixes #5504
2021-02-19 11:50:59 -08:00
Pavel Feldman
bb2b29631a
feat(inspector): pause on page/context close (#5319) 2021-02-19 09:33:24 -08:00
Dmitry Gozman
8a9048c2b5
feat(inspector): selector input (#5502) 2021-02-19 07:25:08 -08:00
Pavel Feldman
15833ee039
feat(inspector): render params and durations in log (#5489) 2021-02-17 22:10:13 -08:00
Dmitry Gozman
da135c2abb
fix(trace viewer): follow up with recent instrumentation changes (#5488)
- List all actions we are interested in
- Fix timeline hover flicker
- Extract tabbed pane component
- Preview snapshots without clicking on the action
2021-02-17 17:51:57 -08:00
Pavel Feldman
3248c2449c
feat(inspector): collapse completed items (#5484) 2021-02-17 17:28:02 -08:00
Dmitry Gozman
dc51536bca
feat(waitForResponse): print regex pattern when waiting for request/response (#5485) 2021-02-17 15:11:23 -08:00
Pavel Feldman
b2227c1bcf
feat(inspector): allow selecting file (#5483) 2021-02-17 14:05:41 -08:00
Naresh
cc749fe679
fix(android): added recent apps button (#5331) 2021-02-16 19:37:46 -08:00
Pavel Feldman
30e68f6d1f
chore: simplify code generation (#5466) 2021-02-16 18:13:26 -08:00
Andrey Lushnikov
b6bd7c0d6a
feat(chromium): roll Chromium to r851527 (#5434)
Fixes #5197
2021-02-16 14:21:47 -08:00
Andrey Lushnikov
f2b25fe6bd
fix: do not rely on $PATH when resolving executables (#5475)
Since CRON jobs reset $PATH to a very basic one, we should
use only direct paths to system executables.

Fixes #5469
2021-02-16 10:23:38 -08:00
Andrey Lushnikov
6b40d75d03
fix: allow setting input files for detached <input> elements (#5467)
Fixes #5403
2021-02-16 10:22:46 -08:00
Pavel Feldman
0c7da44465
test(inspector): add some tests (#5461) 2021-02-15 08:32:13 -08:00
Dmitry Gozman
1f3449c7da
fix(download): do not stall BrowserContext.close waiting for downloads (#5424)
We might not ever get the "download finished" event when closing the context:
- in Chromium, for any ongoing download;
- in all browsers, for failed downloads.

This should not prevent closing the context. Instead of waiting for the
download and then deleting it, we force delete it immediately and reject
any promises waiting for the download completion.
2021-02-14 16:46:26 -08:00
Pavel Feldman
8b9a2afd3d
feat(inspector): render errors (#5459) 2021-02-13 22:13:51 -08:00
Pavel Feldman
ae2ffb3fb9
feat(inspector): instrument wait for event (#5457) 2021-02-13 20:31:06 -08:00
Pavel Feldman
ecd15e6175
fix(inspector): restore point highlight (#5455) 2021-02-12 22:06:45 -08:00
Pavel Feldman
0782b25272
test: fix recorder downloads test (#5454) 2021-02-12 20:26:22 -08:00
Pavel Feldman
3c877374c7
feat: add replay log (#5452) 2021-02-12 18:53:46 -08:00
Dmitry Gozman
ac1599cc2c
fix(registry): handle relative registry path (#5406)
We get relative registry path when PLAYWRIGHT_BROWSERS_PATH or HOME is relative.
In this case, it would be good to resolve to the same absolute path
during installation and execution, and we can usually do that using INIT_CWD.
2021-02-12 11:12:06 -08:00
Pavel Feldman
aef052aecc
chore: pause on input in pwdebug mode (#5427) 2021-02-12 10:11:30 -08:00
Dmitry Gozman
3e7b8e3d74
test: add basic end-to-end driver test (#5426)
- Introduce internal "out of process" start()/stop() mode.
- This mode is used both in regular tests and installation tests.
- Emulate basic driver installation, browser download and running.
2021-02-12 09:05:32 -08:00
Pavel Feldman
449adfd3ae
chore(recorder): move recording output into the gui app (#5425) 2021-02-11 17:46:54 -08:00
Dmitry Gozman
99f8e1cf63
docs: document Android and friends (#5415)
These are experimental, currently available through `_android`.
2021-02-11 10:31:57 -08:00
Andrey Lushnikov
6113d4d50d
feat(chromium): roll Chromium to r846621 (#5413) 2021-02-11 07:43:43 -08:00
Joel Einbinder
d8f637c239
chore(typescript): enable esModuleInterop (#5409) 2021-02-11 06:36:15 -08:00
Pavel Feldman
6576bd8b31
chore: move before/after action instrumentation into dispatcher (#5416) 2021-02-10 21:55:46 -08:00
Pavel Feldman
6e6e36b565
chore: move progress log into the metadata (#5411) 2021-02-10 21:50:29 -08:00
Pavel Feldman
a164f2a810
chore: make instrumentation multiplexing proxy-based (#5410) 2021-02-10 21:44:22 -08:00
Pavel Feldman
a06cf70d28
chore: pass parsed stack in metainfo (#5407) 2021-02-10 18:52:28 -08:00
Joel Einbinder
dca70abbd3
feat(chromium): connect to a browser over cdp (#5207) 2021-02-10 14:00:02 -08:00
Yury Semikhatsky
a8ebe4d888
fix(screencast): support viewport with odd dimensions (#5399) 2021-02-10 13:37:27 -08:00
Dmitry Gozman
b4b14eab69
chore: refactor actionability checks (#5368) 2021-02-10 12:36:26 -08:00
Dmitry Gozman
38209c675c
fix(selector generator): correct nth-match, remove label treatment, performance (#5388)
- Remove label retargeting, as it does not play nicely with recorder.
- nth-match() is now correctly chained.
- Performance improvements around parent selectors and regex text matches.
2021-02-10 12:31:50 -08:00
Dmitry Gozman
78ab2955f3
fix(isVisible): do not wait for the selector to be resolved (#5393) 2021-02-10 07:12:43 -08:00
Dmitry Gozman
6a98241ac5
feat(selectors): speed up text selector (#5387)
- Do not check children when parent does not contain the text we look for.
- Minor caching improvements in evaluator.

This gives up to 5X performance boost on text-heavy pages.
2021-02-09 21:31:46 -08:00
Pavel Feldman
2e01fbdbec
chore: introduce instrumentation api (#5385) 2021-02-09 14:44:48 -08:00
Pavel Feldman
0652f3251f
chore: introduce sdk object base class (#5370) 2021-02-09 09:00:00 -08:00
Dmitry Gozman
0871a9cfd9
feat(codegen): improve selector generation (#5364)
- Snap to buttons, inputs, selects, etc.
- Try `<label>` selector in addition to the element.
- Use parent selectors when needed.
- Remove xpath fallback as it should be covered with css.
2021-02-08 21:53:17 -08:00
Dmitry Gozman
002d8ef5a7
chore: remove Progress.aborted (#5363)
Most places use Progress.cleanupWhenAborted instead.
2021-02-08 17:33:01 -08:00
Pavel Feldman
d49a1d8174
chore: kill electron process on ctrl+c (#5366) 2021-02-08 16:04:15 -08:00
Andrey Lushnikov
d499cf08d1
refactor: remove browserPaths in favor of Registry class (#5318)
This patch introduces a new Registry class that incapsulates
all logic regarding browsers and their paths.

Fixes #5278
2021-02-08 16:02:49 -08:00
Pavel Feldman
6680713e84
chore: don't reuse recorder app profile (#5365) 2021-02-08 16:02:23 -08:00
Dmitry Gozman
6d56a110ca
feat(proxy): throw when socks proxy is used with auth (#5358) 2021-02-08 12:07:45 -08:00
Yury Semikhatsky
bb0af314ba
fix(video): set default size to fit into 800x800 (#5333) 2021-02-08 10:59:48 -08:00
Max Schmitt
da4304a05c
chore: run recorder app in no sandbox (#5345) 2021-02-08 07:38:24 -08:00
Dmitry Gozman
983e04374a
chore: fix build/packaging for recorder and traceviewer (#5338) 2021-02-05 16:19:09 -08:00
Pavel Feldman
c0610ccef4
feat(recorder): remove recorder overlay toolbar (#5334) 2021-02-05 14:24:27 -08:00
Dmitry Gozman
9c0609b0ec
fix(trace viewer): do not render invisble tabs (#5322) 2021-02-05 12:56:45 -08:00
Dmitry Gozman
de30ee0aa8
fix(oopifs): account for various races between processes (#5320)
Consider the following situation (one among many possible).
- FrameA has an oopif child FrameB;
- FrameA navigates to same-process origin (e.g. about:blank);
- at the same time, FrameC is attached to the FrameB in the
  FrameB's process.

In this case, we get `frameNavigated` event for FrameA, immediately
followed by `frameAttached` event for FrameC. Since we detach all
FrameA's child frames on navigation, including the oopif FrameB,
there is no parent frame for FrameC to attach to.

In general, multiple processes coming from oopif may send their
events in wildly different order, and their view about the frame
tree may not always correspond to the "up to date" frame tree as
seen from the main frame's process. We try to keep our frame tree
aligned with what main process thinks, and ignore events that
reference frames absent in this tree.

Drive-by: handle filechooser exceptions because of async processing.
2021-02-05 11:30:44 -08:00
Dmitry Gozman
0cbb2c14e6
feat(text selector): match text in child nodes (#5293)
This changes `text=` and `:text()` selectors to match the element when:
- it's combined text content matches the text;
- combined text content of any immediate child does not match the text.

This allows the following markup to match "Some bold and italics text":
`<div>Some <b>bold</b> and <i>italics</i> text</div>`.

For the reference, "combined text content" is almost equal to `element.textContent`,
but with some changes like using value of `<input type=button>` or ignoring `<head>`.

This also includes some caching optimizations, meaningful in complex matches
that involve multiple calls to the text engine.

Performance changes (measured on large page with ~25000 elements):
- `:has-text()` - 14% faster.
- `text=` - 50% faster.
- `:text()` - 0-35% slower.
- `:text-matches()` - 28% slower.
2021-02-04 17:44:55 -08:00
Pavel Feldman
c1b08f1a8c
feat(recorder): allow dragging toolbar (#5316) 2021-02-04 14:41:53 -08:00
Yury Semikhatsky
997bd0827c
feat(webkit): bump to 1432 (#5300) 2021-02-04 08:53:00 -08:00
Pavel Feldman
c2b8718bae
fix(waitForFunction): process isFunction auto-detection (#5312) 2021-02-04 08:45:59 -08:00
Pavel Feldman
17986773f8
feat: remove chaining from trace viewer preview (#5265) 2021-02-04 06:24:53 -08:00
Pavel Feldman
dd9b51d68b
chore: friendlier install failure message (#5281) 2021-02-04 06:23:47 -08:00
Yury Semikhatsky
6ae2e576d8
fix: properly detect function literals (#5296) 2021-02-03 16:56:36 -08:00
Pavel Feldman
34adc28ed3
feat(pause): make page.pause public (#5288) 2021-02-03 16:01:51 -08:00
Dmitry Gozman
d8e0834562
fix(server): use setMaxListeners(0) on all internal event emitters (#5283) 2021-02-03 13:53:09 -08:00
Pavel Feldman
3d253c4e5c
feat: auto-detect expression/function in js server (#5284) 2021-02-03 13:49:25 -08:00
Dmitry Gozman
fa1cf4108b
fix(codegen): do not show recorder controls in iframes (#5282) 2021-02-03 13:42:29 -08:00
Dmitry Gozman
53ed35ef96
feat(dialogs): auto-dismiss dialogs when there are no listeners (#5269)
This makes dialogs disappear and prevents stalling.

Pros:
- No need to worry about dialogs for most users.
- Those that wait for a specific dialog still get to control it.

Cons:
- Those who use Playwright to show interactive browser will have
  to add an empty 'dialog' handler to prevent auto-dismiss.
  We do this in cli.
2021-02-03 10:34:45 -08:00
Andrey Lushnikov
cb1b64289c
devops: downloading ffmpeg during install step (#5249)
This patch starts downloading FFMPEG like we download our browsers
instead of bundling it in the NPM package.

With this patch, NPM size is reduced from 8.8MB to 1.7MB.

Consequences:
- `npx playwright` is drastically faster now
- playwright driver for language bindings is way smaller
- projects that bundle Playwright can pass Apple Notorization

Fixes #5193
2021-02-03 09:19:11 -08:00
Dmitry Gozman
4cad34509f
fix(oopifs): do not emulate focus in oopifs (#5270)
- We don't need this, since it should propagate from the main frame.
- Forcing focus in oopif immediately focuses it and blurs currently
  focused frame. This leads to undesired side effects, e.g. selects
  being closed.
2021-02-03 08:47:52 -08:00
Dmitry Gozman
1a464c732c
feat(video): switch vp8 in ffmpeg to realtime (#5260)
This switches vp8 to "realtime" mode that works fast, adapting to
the speed of incoming frames, and produces the best quality in can
given realtime constraints.

In practice, this gives 2x larger video files but no noticible quality
difference. It also eliminates huge delays for encoding the video.

Drive-by: document our ffmpeg option choices and add some links
to documentation for future use.
2021-02-02 17:14:39 -08:00
Pavel Feldman
8a8d8ea370
fix: update terminal size dynamically (#5250) 2021-02-02 14:25:51 -08:00
Dmitry Gozman
6c12f58058
feat(selectors): always make xpath relative (#5252)
This makes `/foo` and `//foo` match starting with the scope,
not the document, by turning them into `./foo` and `.//foo`.
2021-02-02 13:27:16 -08:00
Dmitry Gozman
9e09bd369d
fix(oopifs): ignore target closure when broadcasting across oopifs (#5246) 2021-02-02 10:21:42 -08:00
Dominik Deren
8c65871b25
fix(trace viewer): Bringing back the ability to display images in Network Tab in Trace Viewer. (#5232)
This fix restores the ability to display images in the Network Tab inside Trace Viewer. Previously data returned from the server was coming back as base64 encoded string, but now it is returned as a Buffer object. This required convertion to either base64 encoded string or utf8 encoded string on the frontend.

Co-authored-by: Dominik Deren <dominik.deren@live.com>
2021-02-01 22:56:53 -08:00
Andrey Lushnikov
276bbca3d1
fix: retry browser launch if it failed due to glibc error (#5247)
Fixes #5214
2021-02-01 15:23:57 -08:00
Pavel Feldman
1db5ef24a8
docs: document electron api (#5229) 2021-02-01 11:43:26 -08:00
Andrey Lushnikov
08e2b5b825
fix(installer): retry installer when hitting ETIMEDOUT as well (#5239)
Fixes #5233
2021-02-01 09:30:22 -08:00
Dmitry Gozman
a9de3d8fd2
feat(snapshots): switch MutationObserver to only observer attributes (#5220)
Everything but attributes in the light dom is manually compared during
DOM traversal, for example child nodes or scroll offset.

This way we get a bullet-proof solution that works with input values,
scroll offsets, shadow dom and anything else web comes up with.

We also restore scroll only on the document scrolling element, for
performance reasons. We should figure out the story around scrolling.

Changes stationary snapshots from ~0.5ms to ~2.5ms due to DOM traversal.
2021-01-31 19:20:20 -08:00
Pavel Feldman
bf8c30a88b
feat(ui): extract recorder sidebar into a window (#5223) 2021-01-31 16:37:13 -08:00
Pavel Feldman
975519150e
chore: centralize playwright creation, bind context listeners to instance (#5217) 2021-01-29 16:00:56 -08:00
Dmitry Gozman
7fe7d0ef32
feat(snapshots): make cssom overrides efficient (#5218)
- Intercept CSSOM modifications and recalculate overridden css text.
- When css text does not change, use "backwards reference" similar
  to node references.
- Set 'Cache-Control: no-cache' for resources that could be overridden.
2021-01-29 15:24:38 -08:00
Dmitry Gozman
69ca30834e
feat(snapshots): incremental snapshots (#5213)
- Switch from html to json ml format.
- Allow node reuse between snapshots with `[nSnapshotsBefore, nodeWithIndexM]`.
- Service worker now lazily serializes snapshot chunks into a single html.

This decreases total snapshot size on random scripts ~10x.
This also decreases snapshot collecting time on mostly static pages to ~0.3ms.

Unfortunate downside for now is that we have to intercept
`Element.prototype.attachShadow` to invalidate nodes. This
also temporary breaks scroll restoration. Needs more research.
2021-01-29 06:57:57 -08:00
Dmitry Gozman
5e934d0fbd
chore(trace viewer): split SnapshotServer (#5210)
- Move service worker under /snapshot/ instead of /.
- Fix stylesheet base uri bug, where we inherited the wrong base url.
- Introduce TraceServer and routes there, split the actual routes
  between snapshot, ui and action previews.
2021-01-28 15:09:20 -08:00
Pavel Feldman
79e00e4911
feat(ui): more recorder uis (#5208) 2021-01-28 14:25:10 -08:00
Dominik Deren
f8fbfe28fa
feat(trace viewer): Adds _debugName BrowserContextOption to let users define a name for their contexts (#5205)
This change is adding a new property on the BrowserContextOptions class called `_debugName`. This property allows defining a user-friendly name for the browser context, and currently it is being used in one place, the Trace Viewer. When user provides the new value in the following way:

```typescript
const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch();
  const context = await browser.newContext({ _traceDir: __dirname, _debugName: 'My custom testcase name' });
  await context.close();
  await browser.close();
})();
```

The `_debugName` will be saved in the `*.trace` file for this browser context, on the `context-created` event, under the key `debugName`.

Later, when such a trace is displayed using Trace Viewer, the `debugName` will be displayed in the dropdown in the top right part of the app instead of the actual trace filename.

Fixes #5157.
2021-01-28 10:50:57 -08:00
Pavel Feldman
8d8fa4c322
chore: move trace viewer to the src/web (#5199) 2021-01-28 09:33:20 -08:00
Andrey Lushnikov
fe1302b47d
feat(installer): retry download if connection is interrupted (#5126)
Fixes #5110
2021-01-28 00:37:42 -08:00
Andrey Lushnikov
d1a2c87e88
chore: remove backward compatibility code from installer (#5168)
Installer has a code to download browsers from the old version of
playwright. This, however, is never needed, since installer only
installs browsers from its own version.
2021-01-27 22:32:25 -08:00
Dmitry Gozman
ce43e730f4
feat(traceviewer): use http server instead of interception (#5195)
This introduces an http server that serves our frontend and our snapshots. There is more work to untangle the big server into a few modules.

This change allows us:
- Maybe eventually serve the trace viewer as a web page.
- Rely on browser caches for fast snapshot rendering. This PR also adds "snapshot on hover" feature, subject to change.
2021-01-27 19:42:51 -08:00
Dmitry Gozman
e915e51ea9
chore: fix bad merge in codeGenerator.ts (#5196) 2021-01-27 17:45:27 -08:00
Dmitry Gozman
2793d14409
fix(codegen): do not forget to reset currentAction in didPerformAction (#5194) 2021-01-27 17:05:56 -08:00
Pavel Feldman
e50f11c5b1
feat(ui): more recorder uis (#5187) 2021-01-27 17:02:09 -08:00
Dmitry Gozman
321a873d8a
fix(codegen): add timeout to our actions, catch errors (#5188) 2021-01-27 15:57:28 -08:00
Pavel Feldman
ff6b2b1dd4
chore: make emulate media params be options (#5172) 2021-01-27 14:19:37 -08:00
Dmitry Gozman
527286683f
feat(codegen): prefer frame name over url when unique (#5175) 2021-01-27 13:19:36 -08:00
Dmitry Gozman
0108d2d41f
feat(snapshots): various improvements (#5152)
- Adopt "declarative shadow dom" format for shadow dom snapshots.
- Restore scroll positions.
- Render snapshot at arbitrary timestamp.
2021-01-26 15:09:17 -08:00
Dominik Deren
a3af0829ff
feat(trace viewer): Extending existing NetworkTab view (#5009)
feat(trace viewer): Extending existing NetworkTab view

Currently the network tab contains a limited amount of information on the resources that were loaded in the browser. This change proposes extending the details displayed for each resource, to include:

- HTTP method,
- Full url,
- Easily visible response content type,
- Request headers,
- Request & response bodies.

Such level of information could help quickly understand what happened in the application, when it was communicating with backend services. This can help debug tests quicker to figure out why they are failing.

This implementation still needs some clean up & tests improvement, but I wanted to propose such changes and gather your feedback before going too far.
2021-01-26 11:06:05 -08:00
Yury Semikhatsky
f3cc4dfe6d
feat(webkit): bump to 1428 (#5140) 2021-01-26 09:42:06 -08:00
Pavel Feldman
45f7d73470
chore: plumb terminal size and port language (#5149) 2021-01-25 19:01:04 -08:00
Dmitry Gozman
5033261d27
feat(trace): streaming snapshots (#5133)
- Instead of capturing snapshots on demand, we now stream them
  from each frame every 100ms.
- Certain actions can also force snapshots at particular moment using
  "checkpoints".
- Trace viewer is able to show the page snapshot at a particular
  timestamp, or using a "checkpoint" snapshot.
- Small optimization to not process stylesheets if CSSOM was not used.
  There still is a lot of room for improvement.
2021-01-25 18:44:46 -08:00
Pavel Feldman
87a3ccc49e
fix: do not return cookies with empty values (#5147) 2021-01-25 16:37:33 -08:00
Pavel Feldman
2e290be40b
chore: remove source maps in pwdebug mode (#5148) 2021-01-25 16:36:57 -08:00
Pavel Feldman
fdde9493ea
fix: don't parse potentially invalid urls in event handlers (#5090) 2021-01-25 14:49:51 -08:00
Pavel Feldman
01d6f83597
chore: introduce debug toolbar (#5145) 2021-01-25 14:49:26 -08:00
Dmitry Gozman
894abbfe28
feat(selectors): has-text pseudo-class (#5120)
This pseudo-class matches approximately when
`element.textContent.includes(textToSearchFor)`.
2021-01-25 14:19:07 -08:00
Dmitry Gozman
d78d337e29
feat(fill): make fill work when targeting elements inside the label (#5143) 2021-01-25 13:40:19 -08:00
Dmitry Gozman
beed9a79a3
feat(chromium): bump to 845618 (#5138) 2021-01-25 07:45:21 -08:00
Pavel Feldman
464fdc1800
chore: make recorder a supplement (#5131) 2021-01-24 19:21:19 -08:00
Pavel Feldman
be9bef513e
chore: move recorder to server side (#5128) 2021-01-24 08:44:11 -08:00
Joel Einbinder
3e4e511d84
feat(pause): page._pause to wait for user to click resume (#5050) 2021-01-22 18:47:02 -08:00
Andrey Lushnikov
74816e4000
fix(installer): release lock if things go south (#5125)
References #5110
2021-01-23 04:27:33 +03:00
Dmitry Gozman
3e1c72ac5f
fix(reload): do not throw when reload is racing with navigation (#5113)
When `page.reload()` is racing against the renderer-initiated
navigation, we might end up with `waitForNavigation()` being rejected
before the reload implementation is able to catch it.

To avoid that, carefully use Promise.all and await `waitForNavigation`
from the get go.

Same happens to `page.goForward()` and `page.goBack()`.
2021-01-22 15:58:53 -08:00
Yury Semikhatsky
a4eb121399
fix: add parameter to close/crash/disconnected etc events (#5098) 2021-01-22 09:58:31 -08:00
Dmitry Gozman
a9b75365eb
feat(logs): add wrapApiCall for logging to many api methods (#5093)
Some methods (quite a few!) were missing the wrapper that produces the log.
2021-01-22 06:49:59 -08:00
Pavel Feldman
13cc0c51e2
chore: throttle thumbnail workers, remove video processing (#5097) 2021-01-21 19:00:32 -08:00
Dmitry Gozman
7a4b94e66c
feat(selectors): nth-match selector (#5081)
Introduces :nth-match(ul > li, 3) css extension, with one-based index.
2021-01-21 16:39:49 -08:00
Pavel Feldman
c757ba72a9
chore: add storybook dep (#5082) 2021-01-21 08:29:01 -08:00
Pavel Feldman
4b5c876bbf
chore: allow opening empty trace viewer (#5080) 2021-01-20 19:16:23 -08:00
Dmitry Gozman
16249ccbda
feat(trace): account for more action types in timeline (#5077) 2021-01-20 16:19:01 -08:00
Dmitry Gozman
263f164238
feat(trace viewer): improve source tab (#5038)
- Show stack trace and allow to select one.
- Fix an issue when the page is closed before action end and we lack an id.
- Fix timeline time labels.
2021-01-19 14:45:26 -08:00
Yury Semikhatsky
d00c5cfd64
feat(webkit): bump to 1423 (#5057) 2021-01-19 14:02:41 -08:00
Yury Semikhatsky
615954b285
fix(dom): make selectOption wait for options (#5036) 2021-01-19 11:27:05 -08:00
Dmitry Gozman
0586c2554f feat(text selector): normalize whitespace for quoted match (#5049)
This changes quoted text selector like `text="Foo Bar"` to perform
normalized whitespace match.

Most of the time users want to match some string visible on the page,
and that always means normalized whitespace.

We keep the case sensitivity and full-string vs substring difference
between quoted and unquoted matches.
2021-01-19 09:30:34 -08:00
Dmitry Gozman
0a7b917ee3
feat(chromium): bump to 844399 (#5044) 2021-01-17 17:28:06 -08:00
Dmitry Gozman
17e953c2d8
chore: make generate_types not depend on the source (#5040)
The only dependency is a list of devices that we
can turn into a js file.
2021-01-17 12:09:20 -08:00
Dmitry Gozman
afaec552dd
feat(trace): show dialogs, navigations and misc events (#5025) 2021-01-15 18:30:55 -08:00
Dmitry Gozman
b45905ae3f
feat(trace viewer): small improvements (#5007)
- Show logs.
- Show errors.
- Highlight actions.
2021-01-14 20:16:02 -08:00
Andrey Lushnikov
61b0dbb3ef
devops: start downloading firefox arm builds on Apple Silicon. (#5019) 2021-01-15 01:55:17 +03:00
Andrey Lushnikov
ff20b9d107
devops: support frequent minor releases of MacOS BigSur. (#5016)
Pre-BigSur, MacOS updates were labeled as "minor" releases, so we had
to bake separate builds for different 10.X releases.

In BigSur era, it doesn't seem to be the case, so for now we can re-use
our BigSur builds across all BigSur versions (11.0, 11.1 and 11.2).

If we ever need to have a custom build for some bigsur minor version,
e.g. `11.6`, we'll have a new browser platform along with generic
`mac11` platform.

Fixes #4775.
2021-01-14 22:45:09 +03:00
Dmitry Gozman
0a999bf0a6
fix(driver): remove path trickery from install command (#5008) 2021-01-13 19:21:30 -08:00
Dmitry Gozman
e3ebba5573
chore: cleanup code that is not used by cli anymore (#5005) 2021-01-13 17:02:53 -08:00
Dmitry Gozman
5c3f483659
fix(cli): do not extend injected script on same-document navigations (#5002)
Otherwise, the injected script has to be ready for reentrancy.
2021-01-13 14:25:42 -08:00
Pavel Feldman
9a9ac60d21
fix: fix the cli tests, generate snake python (#5003) 2021-01-13 12:52:03 -08:00
Joel Einbinder
decf373c81
fix(electron): return a ChromiumBrowserContext for electron (#4913) 2021-01-13 12:08:14 -08:00
Yury Semikhatsky
29c34325c9
fix(cookies): make filtering by url work with subdomains (#4989) 2021-01-12 15:56:29 -08:00
Dmitry Gozman
d62b661cfa
docs: rename proximity selectors to position selectors (#4975) 2021-01-11 18:25:41 -08:00
Pavel Feldman
cb6e4a6657
chore: update snippets in python docs (#4976) 2021-01-11 17:04:24 -08:00
Dmitry Gozman
725191967b
fix(connect): provide an error message when ws endpoint is incorrect (#4978) 2021-01-11 15:53:45 -08:00
Yury Semikhatsky
728846b377
fix(launcher): add vcruntime140_1.dll to the list of known deps (#4973) 2021-01-11 15:01:29 -08:00
Dominik Deren
bf64fedd88
fix(trace viewer): updating default traceStorageDir value (#4962)
fix(trace viewer): updating default traceStorageDir value

When `npx playwright show-trace <tracePath>` command is executed, without providing the `resources` optional parameter, the function expected the `traceStorageDir` default value to be the same directory as in which the tracePath resides. This change updates it to the `dirname(tracePath)/trace-resources` if it exists. Such a directory hirerachy is the default that is created when running the tracer in Playwright.
2021-01-11 13:36:35 -08:00
Dominik Deren
e990a805a8
fix: restore network request title in trace viewer. (#4957) 2021-01-09 13:03:58 -08:00
Dmitry Gozman
5a2cfdbd47
api: add isChecked method (#4953)
This adds `{Page,Frame}.isChecked(selector)` and `ElementHandle.isChecked()` methods.

Useful to do assertions in tests:
```js
await page.click('text="Add TODO"');
expect(await page.isChecked('.item-done')).toBe(false);
```
2021-01-08 17:36:17 -08:00
Pavel Feldman
b7e0b1b393
docs: annotate evaluate(pageFunction) js-specific (#4954) 2021-01-08 16:17:54 -08:00
Joel Einbinder
31d980fc92
chore(webpack): minify injected sources (#4946) 2021-01-08 16:15:05 -08:00
Dmitry Gozman
135e0344fc
feat(cli): small improvements (#4952)
- Allow specifying which browsers to install. This comes handy in playwright-cli.
- Print "npx playwright" as a tool name in help messages, instead of "cli".
2021-01-08 15:42:08 -08:00
Dmitry Gozman
f0a8729137
chore: remove unused selector engines (#4950)
css and id are superseeded by the new css engine.
2021-01-08 14:51:43 -08:00
Dmitry Gozman
3f904056ee
api: add isVisible, isHidden, isEnabled, isDisabled and isEditable (#4915)
These methods are useful for verification in tests, e.g.
```js
expect(await page.isEnabled(':text("Remove All")')).toBe(false);
await page.click(':text("Add Item")');
expect(await page.isVisible('.item:text("new item")')).toBe(true);
expect(await page.isEnabled(':text("Remove All")')).toBe(true);
```
2021-01-08 12:27:54 -08:00
Dmitry Gozman
d08cbc33a7
docs: brush up selector docs (#4939)
docs: brush up selector docs

- Remove duplication
- Move extensions block to ChromiumBrowser
- Remove accidental ":xpath" extension from css selectors
- Document :has and :is extensions
2021-01-08 10:59:24 -08:00
Dmitry Gozman
2e05feac25
feat(cli): bring in trace viewer (#4920) 2021-01-07 16:15:34 -08:00
Dmitry Gozman
eb9ea20511
feat(selectors): proximity selectors (#4923) 2021-01-07 14:12:59 -08:00
Yury Semikhatsky
0a2fe62cb7
fix(extensions): do not enable screencast for background pages (#4919) 2021-01-06 15:08:28 -08:00
Dmitry Gozman
f672033e11
chore: bundle small build of highlight.js (#4907)
This follows the "build from source" configuration (https://highlightjs.org/usage/#source)
and reduces the footprint from 2mb to 100kb.
2021-01-06 09:31:42 -08:00
Dmitry Gozman
d47fb6a780
feat(cli): build driver and upload to cdn (#4841) 2021-01-05 14:04:47 -08:00
Dmitry Gozman
5215add60d
chore: remove selectorsV2Enabled switch (#4880)
Selectors V2 seem to stick.
2021-01-04 15:32:31 -08:00
Dmitry Gozman
c4df522555
fix(handles): always create proper handle type (#4879) 2021-01-04 13:54:55 -08:00
Pavel Feldman
31ffeb32e3
doc: further align docs w/ playwright.dev (2) (#4871) 2021-01-04 13:50:29 -08:00
Joel Einbinder
6697dadca2
chore(eslint): add rule no-unused-expressions (#4848) 2020-12-29 09:59:35 -08:00
Tom Jenkinson
d08f8487c4
chore: remove useless statement that was a typo (#4846) 2020-12-29 08:58:09 -08:00
Dmitry Gozman
068d8612a7
feat(cli): make run-driver work (#4836) 2020-12-28 15:44:24 -08:00
Dmitry Gozman
293a7bdd4c
feat(cli): bring in codegen and tests (#4815) 2020-12-28 14:50:12 -08:00
Dmitry Gozman
905f28c339
feat(types): simplify android and electron types (#4829)
These now follow the scheme for regular types.
2020-12-26 20:25:18 -08:00
Dmitry Gozman
34c1b338be
feat(types): make our client classes implement public types (#4817)
This patch:
- introduces non-exported but used in api/impl struct types (e.g. Point);
- makes all client classes implement respective public api interface.

Pros:
- Typescript is now responsible for type checking.
  We can remove our doclint checker (not removed yet).
- Electron and Android types can be defined in the same way
  (this is not implemented yet).
- We can move most of the type structs like Point to the public api
  and make some of them available.

Cons:
- Any cons?
2020-12-26 17:05:57 -08:00
Pavel Feldman
2cb5770183
docs: move playwright module into api-body.md (#4827) 2020-12-26 15:33:29 -08:00
Dmitry Gozman
225e65e076
feat(cli): share console api between cli and debug mode (#4807) 2020-12-23 14:15:16 -08:00
Dmitry Gozman
f709e2300c
feat(cli): bring selector generator into playwright (#4795)
Also remove unused `SelectorEngine.create` function and add tests.
2020-12-23 12:44:47 -08:00
Yury Semikhatsky
8d4c46ac19
fix: throw if quality=0 is passed for png screenshot (#4812) 2020-12-23 09:53:14 -08:00
Dmitry Gozman
d40afa2fbf
feat(cli): first few cli commands (#4773)
This sets up cli capabilities and brings in a few commands from playwright-cli.
2020-12-22 14:54:13 -08:00
Dmitry Gozman
cc32217e84
chore: fix check-deps (#4801) 2020-12-22 11:01:25 -08:00
Joel Einbinder
ff2a1f1bd0
fix(webkit): properly detect arm64 on apple silicon (#4783) 2020-12-21 16:37:55 -08:00
Yury Semikhatsky
779c5fff16
chore(installer): remove stale backlinks silently (#4786) 2020-12-21 12:31:19 -08:00
Yury Semikhatsky
7bbda4370d
chore: improve error reporting when browse download fails (#4787) 2020-12-21 12:31:01 -08:00
Yury Semikhatsky
94ee48f8ce
fix: allow proxy credentials with empty password (#4779) 2020-12-21 11:47:13 -08:00
Pavel Feldman
774eb53980
fix(adb): force page scale factor update on connection (#4755) 2020-12-17 18:28:49 -08:00
Yury Semikhatsky
3219057ab0
fix(webkit): support utf-8 characters in postData, bump to 1407 (#4744) 2020-12-17 18:09:06 -08:00
Dmitry Gozman
5a1c9f1fe1
fix(selector): bring back v1 query logic (#4754)
It turned out that v1 query logic is not shimmable by v2 logic.
This change brings back v1 query logic for `>>` combinator.
2020-12-17 17:01:46 -08:00
Dmitry Gozman
9a0023cc03
fix(selectors): text engine after capture matches scope (#4749) 2020-12-17 06:19:43 -08:00
Dmitry Gozman
35533b15c1
fix(scroll): scroll from under the sticky header (#4641)
When element with position:sticky covers some part of
the scroll container, we could fail to scroll from under it
to perform an action. To fight this, we can try different
scroll alignments and scroll to the top/bottom/center
in the attempt to scroll away from sticky header/footer/sidebar.
2020-12-16 15:29:42 -08:00
Dmitry Gozman
7385b31f13
fix(driver): stop sending protocol messages after disconnect (#4688)
When the client only closes the input pipe, we are still
sending protocol messages over the output pipe. This could
probably lead to some errors, e.g. write buffer being full.
2020-12-16 14:21:59 -08:00
Max Schmitt
2c409b040e
fix(android): leaking adb socket connections (#4730) 2020-12-15 20:15:25 -08:00
Pavel Feldman
97be66b15c
fix(adb): enable newPage in mobile browser (#4728) 2020-12-15 15:14:16 -08:00
Max Schmitt
69476a86a7
chore: add support for macOS Big Sur 11.1 (#4724)
11.1 is an official update for macOS Big Sur. We should maybe add a custom macOS version parser which falls back if minor version changes so we don't have to maintain all the versions manually.

Fixes #4722
2020-12-15 10:49:02 -08:00
Pavel Feldman
e02c54485c
chore(adb): make driver smaller (#4713) 2020-12-14 18:39:14 -08:00
Andrey Lushnikov
b09e0d01bd
fix(launchdoctor): make launch doctor to warn on Win7 (#4718)
Windows 7 was end-of-lifed on January 14, 2020. We don't support this
system, but we'd like to have a best-effort to work there.

It does look like Chromium is missing some libraries on Win 7, however
it still manages to work there. To support this usecase, this patch
starts printing console warning about missing libraries on Win 7 only
instead of refusing to launch.

Fixes #3496
2020-12-14 16:40:51 -08:00
Dmitry Gozman
355a58e616
feat(storage): accept path in save/load storage apis (#4714)
Also make Firefox accept `expires: -1` cookies.
2020-12-14 16:03:52 -08:00
Yury Semikhatsky
0b8f34e726
docs: rename aggregate parameter objects to params (#4715) 2020-12-14 15:27:02 -08:00
Dmitry Gozman
ab63063c03
fix(tracing): store relative video path in the trace (#4710) 2020-12-14 13:31:55 -08:00
Pavel Feldman
4799e8f20b
feat(adb): add screenshot (#4701) 2020-12-13 23:20:13 -08:00
Pavel Feldman
1596b53da2
test(adb): fix browser tests (#4700) 2020-12-13 22:33:00 -08:00
Pavel Feldman
f89dcc7ba7
feat(adb): implement push (#4697) 2020-12-13 22:00:37 -08:00
Pavel Feldman
844b2c8f93
chore(adb): lint the driver (#4696) 2020-12-13 09:35:28 -08:00
Pavel Feldman
ad5309ca6b
feat(adb): make shell return binary (#4695) 2020-12-13 08:33:35 -08:00
Pavel Feldman
7c89ec051a
feat(adb): expose a11y tree (#4694) 2020-12-13 08:14:32 -08:00
Max Schmitt
1b7fb7d56a
feat(android): expose installAPK(path) and ADB socket (#4689) 2020-12-12 09:36:38 -08:00
Pavel Feldman
6cc695d92a
test(adb): fix the adb tests (#4691) 2020-12-12 01:18:32 -08:00
Pavel Feldman
aa1b546bd0
chore(android): respect timeout, add build script (#4690) 2020-12-11 23:35:25 -08:00
Pavel Feldman
f20518f252
fix(har): do not complain about a lot of listeners (#4675) 2020-12-11 23:15:36 -08:00
Andrey Lushnikov
765b07781c
feat: start downloading arm64 Chromium builds (#4681) 2020-12-10 21:09:03 -08:00
Pavel Feldman
616df7d2f4
fix(adb): minor fixes (#4678) 2020-12-10 16:37:18 -08:00
Dmitry Gozman
495085cbb2
fix(chromium): make interception work with dedicated workers (#4658) 2020-12-10 15:04:57 -08:00
Dmitry Gozman
b9c959768c
feat(selectors): optimize old->new conversion for css (#4672) 2020-12-10 15:03:02 -08:00
Dmitry Gozman
12dc04a304
feat(selectors): optimize old->new selectors conversion for text (#4671) 2020-12-10 13:53:19 -08:00
Dmitry Gozman
c8e9b0542b
feat(selectors): disable proximity selectors (#4659)
These are not ready for prime time yet.
2020-12-10 10:04:10 -08:00
Pavel Feldman
8fc49c98fa
feat(adb): support webviews (#4657) 2020-12-09 17:15:24 -08:00
Dmitry Gozman
b67e022111
feat(selectors): update new text selector (#4654)
We now default to `text` that does substring case-insensitive match
with normalized whitespace. `text-is` matches the whole string.
`matches-text` is renamed to `text-matches`.
2020-12-09 16:05:51 -08:00
Pavel Feldman
aacd8e633c
chore: expose adb devices and actions (#4647) 2020-12-09 15:06:57 -08:00
Dmitry Gozman
ab44d682ca
feat(selectors): remove index for now, add documentation (#4640) 2020-12-09 13:08:37 -08:00
Andrey Lushnikov
1d90d7a925
feat: fix browser installation on mac 11.0-arm64 (#4652) 2020-12-09 09:54:37 -08:00
Andrey Lushnikov
bc0af57ad3
feat: support download of native WebKit build for Apple M1 (#4648) 2020-12-09 09:04:32 -08:00
Dmitry Gozman
1060fce005
feat(selectors): explicit list of custom functions (#4629)
When parsing CSS, we assume everything is a valid CSS function,
unless it is in the list of custom functions. This way we'll parse
future CSS functions automatically.
2020-12-08 09:38:43 -08:00
Dmitry Gozman
be16ce4bd2
feat(errors): append recent browser logs when browser disconnects (#4625) 2020-12-08 09:35:28 -08:00
Joel Einbinder
ea833daa89
chore: fix internal binding (#4598) 2020-12-08 08:38:29 -08:00
Dmitry Gozman
1e754a4d80
feat(selectors): proximity selectors (#4614)
This includes 'left-of', 'right-of', 'above', 'below', 'near' and 'within'.
2020-12-07 16:07:47 -08:00
Dmitry Gozman
c36f5fa33a
feat(chromium): roll to 833159 (#4626) 2020-12-07 15:55:22 -08:00
Dmitry Gozman
18b565a969
feat(selectors): correctly work in large DOM (#4628)
This adds a test, fixes a bunch of call stack issues and
improves performance in some places.
2020-12-07 15:51:44 -08:00
Dmitry Gozman
1e0ab79f9a
feat(selectors): add visible and index engines (#4595) 2020-12-06 15:03:36 -08:00
Dmitry Gozman
8218a71a9b
feat(selectors): add more tests for css selectors (#4596) 2020-12-04 16:12:59 -08:00
Dmitry Gozman
49a3f943b6
feat(selectors): switch to the new engine (#4589)
We leave old implementation under the boolean flag,
just in case we need a quick revert.
2020-12-04 06:51:18 -08:00
Pavel Feldman
2452d07ff7
docs: generate method signatures in docs (#4590) 2020-12-03 22:28:11 -08:00
Dmitry Gozman
016925cd16
feat(selectors): implement builtin selectors in new evaluator (#4579) 2020-12-03 14:10:40 -08:00
Dmitry Gozman
3121de403b
test: remove tests for SelectorEngine.create (#4580)
We are not going to keep this functionality on arbitrary engines.
2020-12-03 14:10:26 -08:00
Pavel Feldman
7e30669eb0
fix(binding): catch binding resolution against the closed page (#4583) 2020-12-03 10:51:59 -08:00
Dmitry Gozman
3d6194e8a1
feat(selectors): introduce css evaluator (#4573)
Not used for production yet.
2020-12-02 14:46:19 -08:00
Dmitry Gozman
52ae218bfc
fix(fill): allow filling more input types (#4563)
This includes invalid types that are no recognized by the browser.
2020-12-02 14:43:41 -08:00
Joel Einbinder
3624e3e315
chore: add internal method for utility context bindings (#4566)
* internal binding extracted from dnd patch

* refactor it into the page

* dgozman comments 1
2020-12-02 13:43:16 -08:00
Dmitry Gozman
a45532fd82
feat(selectors): update css parser (#4565)
This change requires string arguments to be quoted,
for example `:text("foo")` works but `:text(foo)` does not.
2020-12-02 08:16:02 -08:00
Dmitry Gozman
e98aceb981
feat(selectors): introduce css parser (#4522)
It is not used for anything just yet.
2020-11-30 16:31:40 -08:00
Dmitry Gozman
84dc441a9e
feat(trace): record traces when PW_TRACE_DIR is set (#4545)
PW_TRACE_DIR points to a directory that Playwright can
put trace files and resources into.
This does not enable video recording, although it might
in the future.
2020-11-30 15:25:07 -08:00
Dmitry Gozman
884edbb3ee
fix(channels): only send protocol methods to connection (#4493)
When using 'domain' module, it calls various EventEmitter methods
like 'listenerCount' that we do not expect. To avoid this problem
in the future, we validate the method name before sending it over
the protocol connection.
2020-11-26 07:33:09 -08:00
Andrey Lushnikov
f916c98081
chore: update WebKit version to 14.1 (#4515)
Safari Technology Preview now reports WebKit 14.1
2020-11-23 16:21:42 -08:00
Dmitry Gozman
e9060dd68a
fix(launchServer): wait for the server to start before taking its address (#4513)
This is easily triggered by launching from a cluster's worker.
2020-11-23 15:23:31 -08:00
Pavel Feldman
e72d9a4185
chore: add websocket connection mode (#4510) 2020-11-20 15:19:39 -08:00
Pavel Feldman
a0587949a5
feat(chromium): roll to r828656 (#4503) 2020-11-20 08:10:27 -08:00
Dmitry Gozman
aea106b28e
chore: simplify server screencast code (#4501)
Currently, we always throw from FrameSession._stopScreencast
when not running with video, and immediately catch it in
CRPage.didClose (thanks to debugger to point that).

Overall, we have code prepared for start/stop API, which
we never did, so it makes sense to simplify code a bit,
and throw if something goes wrong.
2020-11-19 19:26:53 -08:00
Dmitry Gozman
5e6eed0d87
fix(frames): do not start network idle timer after detach (#4502)
This fixes a common flaky error on the bots:
```
Error: Cannot find object to emit "loadstate": Frame@f5b80c8c318c5471a1e6af552866e981
```
2020-11-19 19:20:53 -08:00
Dmitry Gozman
09f9a35198
fix(protocol): rename websocket error event to socketerror (#4495)
This is to avoid special handling of error events in node.
2020-11-19 12:09:42 -08:00
Yury Semikhatsky
a877c24f05
fix(route): throw on attempt to fulfill with redirect in WebKit (#4449) 2020-11-17 16:56:04 -08:00
Dmitry Gozman
38fadcaded
fix(chromium): use frameDetached reason (#4468)
This fixes the local -> remote frame swap when
Page.frameDetached arrives before Target.attachedToTarget.

Instead of error-prone logic we do currently, new CDP exposes
frame detach reason that we can use.
2020-11-17 10:24:13 -08:00
Dmitry Gozman
b9ac9df837
fix: prevent memory leak when collecting logs from injected script poll (#4448) 2020-11-16 14:11:55 -08:00
Joel Einbinder
31bebc7ea0
fix(close): allow errors when closing all pages of a context (#4324) 2020-11-16 10:26:34 -08:00
Yury Semikhatsky
dfe3552b59
feat(route): support URL overrides in continue (#4438) 2020-11-16 09:59:00 -08:00
Joel Einbinder
dd3d49339d
fix(lock): nicer lockfile error (#4396) 2020-11-16 06:35:30 -08:00
Yury Semikhatsky
732e83f48d
feat(webkit): bump to 1385 (#4430) 2020-11-13 16:29:20 -08:00
Pavel Feldman
9404d2abb6
fix(debug): do not generate source urls for anonymous scripts (#3691) 2020-11-13 14:47:55 -08:00
Pavel Feldman
d20e56e197
feat(state): allow getting / setting context state (#4412) 2020-11-13 14:24:53 -08:00
Pavel Feldman
a35d207091
test: fix resource timing for bigsur test (#4419) 2020-11-13 14:10:32 -08:00
Dmitry Gozman
e69315f711
fix(websocket): remove "skip frames" logic (#4435)
This optimization turned out to be racy, so better remove it for now.
2020-11-13 14:03:21 -08:00
Pavel Feldman
b0d174fd9a
revert: lifecycle refactoring, it breaks setContent (#4420) 2020-11-12 16:13:55 -08:00
Pavel Feldman
5d47214e2c
chore: register frameless listeners separately (#4407) 2020-11-12 13:44:38 -08:00
Pavel Feldman
bd7507e133
chore: unify new page handling across vendors (#4411) 2020-11-12 12:41:23 -08:00
Yury Semikhatsky
eee82a7fca
fix(oopif): store child frame id between frameDetached and attachedToTarget (#4410) 2020-11-12 09:51:17 -08:00
Yury Semikhatsky
5702eca1f2
fix(selectors): make selectOptions work for labels (#4402) 2020-11-11 15:33:23 -08:00
Dmitry Gozman
138680f93c
fix(launchServer): stream protocol logs into options.logger (#4403)
fix(launchServer): stream protocol logs into options.logger

This has regressed in v1.4.
2020-11-11 15:12:10 -08:00
Pavel Feldman
2158d6d073
feat(scopes): make page a scope (#4385) 2020-11-10 14:47:26 -08:00
Andrey Lushnikov
775be21db6
fix(launchdoctor): fix launch doctor (#4387)
New webkit build, generated by 19f21b1bde, changed webkit build
layout: now there are subfolders that contain libraries and executables, and some of the dependencies are no longer bundled.

This patch:
- teaches launch doctor new directories structure: subfolders are now inspected for missing dependencies, and they are also used in the `LD_LIBRARY_PATH`.
- adds `libevent` and `libicudata` libs to the mapping for ubuntu 18.04
2020-11-09 16:47:15 -08:00
Pavel Feldman
28f6547d67
chore: add adb-based connectivity (#4375) 2020-11-06 16:31:11 -08:00
Dmitry Gozman
3db8b23b25
fix(chromium): lifecycle events race (#4369) 2020-11-06 13:37:15 -08:00
Dmitry Gozman
c83ac444b4
api(websocket): do not send websocket frames without a listener (#4361)
Once user adds 'websocket' listener, we start sending the frames
for all websockets on the page.
2020-11-06 12:30:16 -08:00
Dmitry Gozman
5faf6f9e69
feat(firefox): switch to use pipe instead of websocket (#3279) 2020-11-05 14:15:25 -08:00
Dmitry Gozman
c384313058
feat(fill): allow filling based on the label selector (#4342)
This enables filling the input based on the connected label:

```html
<label for=target>Name</label><input id=target>
```

```js
await page.fill('text=Name', 'Alice');
```
2020-11-05 05:22:49 -08:00
Dmitry Gozman
e942138913
fix: do not report errored pages after context closure (#4346)
Consider the following sequence:
- page opens a popup;
- popup target is attached, we start initializing it;
- user calls browser.close();
- browser is closed, and popup initialization fails;
- we report "errored page" on the already closed context;
- RPC client cannot make sense of this:
  "Cannot find parent object BrowserContext@guid to create Frame@guid"

This issue was revealed during Firefox pipe migration.
2020-11-04 16:23:38 -08:00
Andrey Lushnikov
65009dc867
feat(chromium): roll Chromium to r823944 (#4341)
Fixes #4021
2020-11-04 11:20:02 -08:00
Dmitry Gozman
d57b43963c
fix(har): support har in persistent context (#4322) 2020-11-03 11:30:59 -08:00
Dmitry Gozman
924cc9894a
feat(text selector): normalize spaces in lax mode (#4312) 2020-11-03 04:37:06 -08:00
Dmitry Gozman
1c39689dd6
api(videos): introduce a single recordVideo option bag (#4309)
api(videos): introduce a single recordVideo option bag

Currently contains `dir` and `size`, previously known as
`videosPath` and `videoSize`.
2020-11-02 19:42:05 -08:00
Dmitry Gozman
f80f81545e
feat(chromium): bump to 823078 (#4308) 2020-11-02 14:34:08 -08:00
Pavel Feldman
ac8ab1e1b5
feat(websocket): add WebSocket.waitForEvent and isClosed (#4301) 2020-11-02 14:09:58 -08:00
Dmitry Gozman
c446bf629d
chore: cleanup some har code (#4306)
Drive-by: do not create <root>/file.png in the tests.
2020-11-02 13:38:55 -08:00
Pavel Feldman
d117d0bb93
feat(scopes): make page a scope (#4300) 2020-11-02 13:06:54 -08:00
Dmitry Gozman
9c80cbdf9e
fix(docs): small docs changes for new apis (#4305) 2020-11-02 12:48:05 -08:00
Andrey Lushnikov
7fbbd1822e
feat(firefox): support WebSockets on Firefox (#4289) 2020-10-30 10:34:24 -07:00
Pavel Feldman
914f6372ec
feat(proxy): enable per-context http proxy (#4280) 2020-10-29 16:12:30 -07:00
Pavel Feldman
f384a864a8
test(har): uncomment some raw header tests (#4273) 2020-10-28 15:58:45 -07:00
Pavel Feldman
7bedbb2d78
feat(browser): roll WebKit to r1370 (#4257) 2020-10-28 13:46:05 -07:00
Pavel Feldman
ece84eccd7
fix(protocol): annotate file buffer as binary (#4272) 2020-10-28 10:55:20 -07:00
Pavel Feldman
0b8c33ee75
fix(ECONRESET): fix it once and for all (#4258) 2020-10-27 11:09:41 -07:00
Pavel Feldman
1ef090c3ac
fix(screenshot): prioritize passed type over the extension mime (#4251) 2020-10-27 00:02:35 -07:00
Pavel Feldman
be8428475d
feat(websocket): implement Web Sockets for Chromium & WebKit (#4234) 2020-10-26 22:20:43 -07:00
Pavel Feldman
7fc4b797eb
feat(har): allow saving har for context (#4214) 2020-10-26 14:32:07 -07:00
Pavel Feldman
f5fbea94bb
feat(debug): allow using timeout for rafs for throttling debugging 2020-10-23 16:06:51 -07:00
Pavel Feldman
0337928aa3
fix(env): respect =true/false as env values for boolean flags (#4228) 2020-10-23 12:44:12 -07:00
Maja Wichrowska
ea910a4ce2
fix: update getFromEnv logic to validate that value is undefined (instead of falsey) before redefining it (#4226)
Additionally, cast the `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD` check to a number to allow for values of 0 or 1
2020-10-23 11:52:25 -07:00
Pavel Feldman
c97af3ee91
fix(listeners): avoid "too many listeners" problem safely (#4223) 2020-10-23 10:38:26 -07:00
Pavel Feldman
c4fbc6436a
Revert "fix(listeners): avoid "too many listeners" problem (#3931)" (#4222)
This holds on to process / handlers forever.
2020-10-23 10:04:55 -07:00
Pavel Feldman
72320275ab
fix(headers): report raw request headers on Chromium (#4207) 2020-10-22 08:49:16 -07:00
Pavel Feldman
8a42cdad30
feat(timing): introduce resource timing (#4204) 2020-10-21 23:25:57 -07:00
Pavel Feldman
5d997ed28b
fix(video): make video path available in persistent profiles (#4182) 2020-10-19 14:35:18 -07:00
Joel Einbinder
92dda698f8
feat: tap (#4097) 2020-10-19 10:07:33 -07:00
Max Schmitt
ebf207b7a1
chore: add support for macOS Big Sur (11.0) (#4149)
macOS 11.0 Big Sur was released as a preview on GitHub Actions: https://github.com/actions/virtual-environments/issues/1781#event-3879790130

Closes #2789
Relates #2793
2020-10-19 10:02:35 -07:00
Joel Einbinder
86ef956b4b
feat(webkit): bump to 1357 (#4154) 2020-10-19 03:03:50 -07:00
Tom Jenkinson
7103887bb5
add type for selector engine (#4174) 2020-10-18 23:00:28 -07:00
Pavel Feldman
bbdba42d30
chore(screencast): respect i/o backpressure when writing into ffmpeg (#4164) 2020-10-16 10:04:14 -07:00
Pavel Feldman
e9f5477d52
fix(screencast): await for the first video frame on Chromium (#4145) 2020-10-14 15:09:36 -07:00
Pavel Feldman
46a49d0809
fix(screencast): bump chromium video quality (#4146) 2020-10-14 15:02:32 -07:00
Yury Semikhatsky
bb981fc0cc
fix(screencast): correctly process videos with 1 frame (#4144) 2020-10-14 14:10:35 -07:00
Andrey Lushnikov
c7b23599bc
feat(firefox): roll to r1190 (#4133) 2020-10-14 09:35:56 -07:00
Pavel Feldman
5a7685665a
api(video): restore the missing video path accessor (#4132) 2020-10-13 22:15:51 -07:00
Pavel Feldman
3f68713f1e
chore: locate binaries in case of cli deployment (#4107) 2020-10-09 15:56:03 -07:00
Joel Einbinder
9801be6401
feat(chromium): roll to 815036 (#4099) 2020-10-09 11:45:45 -07:00
Andrey Lushnikov
80773fa96b
fix: disable chromium sandbox by default (#4090)
Certain environments, e.g. Azure Pipelines, override default user
inside container with a custom one, whereas fail to pass proper
seccomp profile for the docker image.

As a result, chromium sandboxing fails.

To ease life of devops deploying tests in various CI's, this patch
disables Chromium sandbox by default.

References #4084
2020-10-09 11:28:22 -07:00
Pavel Feldman
ad58e49201
Revert "feat(firefox): migrate to the pipe channel (#4068)" (#4073)
Mac sporadically hangs on browser close.
2020-10-06 21:16:50 -07:00
Pavel Feldman
ce7aa7a608
feat(firefox): migrate to the pipe channel (#4068) 2020-10-06 14:40:09 -07:00
Thomas Chaplin
2df6425254
chore(typo): resolve typo in src/progress.ts (#4041) 2020-10-05 15:21:35 -07:00
Dmitry Gozman
d31cbc21e5
fix(video): wait for videos when closing persistent context (#4040)
To achieve this, we close all the pages one by one, then wait
for the videos to finish processing, and then close the browser.
2020-10-04 18:18:05 -07:00
Dmitry Gozman
e214f795e0
feat(video): support videos in remote browser (#4042) 2020-10-02 17:27:56 -07:00
Dmitry Gozman
5e42029fce
api: allow exposeBinding to pass handles (#4030)
This adds an option `{ handle: true }` to pass a single handle instead of arbitrary json values.
2020-10-01 22:47:31 -07:00
Dmitry Gozman
4a77363af7
api: update videos api, hide tracing (#4015) 2020-10-01 11:06:19 -07:00
Dmitry Gozman
f885d07cb9
fix(close): fix a race during context.close and page.close (#4018)
There is a race between "close" event coming from the server and
"close" command issued from the client.

This is similar to calling close after disconnect, so added tests.
2020-09-30 21:17:30 -07:00
Pavel Feldman
20b83ee0b4
fix(electron): do not use --require to throttle startup (#4006) 2020-09-29 18:01:14 -07:00
Pavel Feldman
6dccd2735a
fix(wire): fix the wire mode (#4008) 2020-09-29 18:00:56 -07:00
Pavel Feldman
7ccdc5176d
chore: include api.json into the Playwright package (#4003) 2020-09-29 13:48:24 -07:00
Pavel Feldman
de1e63dff1
test: roll test runner 0.9.16 (#3998) 2020-09-29 11:51:00 -07:00
Dmitry Gozman
b3497b333e
fix(actions): wait for some time before retrying the action (#4001)
This saves some CPU cycles while waiting for the page to
change the state, e.g. for animations to complete.

Note that retrying logic is only applicable in rare
circumstances like unexpected scroll in the middle of an
action, or some overlay blocking the click. Usually,
action times out in this cases while retrying.
2020-09-29 10:28:19 -07:00