Commit Graph

3826 Commits

Author SHA1 Message Date
Yury Semikhatsky
5564b203d9
docs: mark ChromiumBrowserContext as js and python specific (#5255) 2021-02-02 10:21:27 -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
e53c9c35db
browser(firefox): roll Firefox to beta @ Feb, 1 2021 (#5248) 2021-02-01 15:50:11 -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
Yury Semikhatsky
198e403c14
docs: add missing java.md (#5245) 2021-02-01 12:05:01 -08:00
Pavel Feldman
e0e38706e4 docs: fix Python snippet casing (2) 2021-02-01 11:47:03 -08:00
Pavel Feldman
174b6aa2da
docs: fix Python snippet casing (#5244) 2021-02-01 11:44:39 -08:00
Pavel Feldman
1db5ef24a8
docs: document electron api (#5229) 2021-02-01 11:43:26 -08:00
Yury Semikhatsky
e71ef7949b
docs: add java traits to some methods (#5222) (#5243) 2021-02-01 11:13:13 -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
Andrey Lushnikov
7b5363198b
devops: fix chromium build on Intel MacBook (#5242) 2021-02-01 09:30:04 -08:00
Joel Einbinder
fc405ee8b2
browser(webkit): mac drag and drop (#4994) 2021-02-01 03:30:31 -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
82bb92f103 Revert "docs: add java traits to some methods (#5222)"
Breaks playwright.dev
2021-01-30 22:15:56 -08:00
Yury Semikhatsky
9c4668685d
docs: add java traits to some methods (#5222) 2021-01-29 19:15:25 -08:00
Yury Semikhatsky
a1d875ed97
docs: make inline refs us parameter name instead of its alias (#5219) 2021-01-29 16:02:17 -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
Anže Vodovnik
dbcdf9dcd7
chore(docs): aliases for dotnet/chsarp docs. (#5162)
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2021-01-29 11:08:22 -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
Yury Semikhatsky
21041bc331
docs: support argument overrides (#5200) 2021-01-28 17:51:41 -08:00
Pavel Feldman
8581e3e950
fix(docs): a couple of broken links (#5211) 2021-01-28 15:15:29 -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
01bddcd171 devops(chromium): account for terminated / interrupted jobs 2021-01-28 13:15:23 +03:00
Andrey Lushnikov
c9fae65400 devops: fix chromium checkout 2021-01-28 12:56:45 +03:00
Andrey Lushnikov
75a0d7a76b
devops(chromium): install depot_tools if missing (#5204) 2021-01-28 01:43:54 -08:00
Andrey Lushnikov
a7eea9ffdc
browser(chromium): roll Chromium to r846621 (#5203)
This roll should test Chromium compilation for Mac x86_64 and Linux.
2021-01-28 01:19:00 -08:00
Andrey Lushnikov
51d90c593b
devops: support Chromium mac compilation (#5202) 2021-01-28 01:14:44 -08:00
Andrey Lushnikov
06f679b160
devops: mark another tracing test as fixme (#5201)
It was failing since a3af0829ff
2021-01-28 00:38:36 -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
b323018881
devops: fetch chromium checkout if it has not been before (#5169)
Checkouts should reside outside of gihtub action working directory
so will be reused between builds.
2021-01-28 00:20:19 -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
Andrey Lushnikov
2a71165ed1
chore: disable failing tracing test (#5170)
The test constantly fails.
2021-01-27 22:31:46 -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
Anže Vodovnik
f2ef7f51b8
Link patching now picks up multiple in single line (#5163) 2021-01-27 16:21:27 -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
Pavel Feldman
35baf335d8 Revert "docs: update langs fields to include java (#5161)"
iThis broke Python docs.
2021-01-27 11:31:34 -08:00
Yury Semikhatsky
d0ab0bd8f2
docs: update langs fields to include java (#5161) 2021-01-27 11:11:05 -08:00
Andrey Lushnikov
5358fed49a chore: fix typo 2021-01-27 20:56:46 +03:00
Andrey Lushnikov
a4f59dd57c
devops: upload host arch as part of test report (#5167) 2021-01-27 09:05:31 -08:00
Andrey Lushnikov
9de0a5a963
chore: add Python to docker images (#5139)
This adds +100MB to network transfer size but enables our
users to use playwright-python from-inside docker container.
2021-01-27 08:51:51 -08:00