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
Yury Semikhatsky
989709b102
chore: delete unused screencast hacks ( #3964 )
2020-09-24 12:16:24 -07:00
Thomas Chaplin
76d08cefc2
chore(types): add return type to advancePosition ( #3961 )
2020-09-24 11:30:18 -07:00
Yury Semikhatsky
1d21c1e4bd
feat(webkit): bump to 1347 ( #3955 )
2020-09-22 16:38:05 -07:00
Dmitry Gozman
18809b3902
fix(listeners): avoid "too many listeners" problem ( #3931 )
...
We currently spawn a process per page when recording
video in Chromium. This triggers "too many listeners" on the
process object once you have enough pages open.
2020-09-22 13:45:57 -07:00
Pavel Feldman
0e76316f82
fix(close): fix the browser.close race ( #3956 )
2020-09-22 12:50:39 -07:00
Andrey Lushnikov
7925a51149
feat: support concurrent installation of browsers ( #3929 )
...
A few details on locking registry to prohibit concurrent access:
- locking is done by creating a `__dirlock` directory in the top-level
of our registry.
- since `__dirlock` directory does not match any of browser
directories, old versions of the installer will ignore it
- in case of concurrent access, installation will wait for a lock to be
released for 10 minutes, periodically trying to grab the lock. If it
fails to do so in 10 minutes, the installation will fail.
Fixes #3912
2020-09-21 16:09:11 -07:00
Pavel Feldman
f1016c1fc1
fix(executablePath): throw unexpected platform error upon call ( #3943 )
2020-09-21 15:51:27 -07:00
Pavel Feldman
cd0a123e78
feat(chromium): roll to v808777 ( #3942 )
2020-09-21 15:51:14 -07:00
Joel Einbinder
75edc61531
feat(emulation): emulate a mouse pointer in headless chrome ( #3922 )
2020-09-21 08:20:05 -07:00
Dmitry Gozman
df777344a3
api(video): simplify video api ( #3924 )
...
- This leaves just `recordVideos` and `videoSize` options on the context.
- Videos are saved to `artifactsPath`. We also save their ids to trace.
- `context.close()` waits for the processed videos.
2020-09-18 17:36:43 -07:00
Dmitry Gozman
0ade6af689
api(trace): introduce artifacts options ( #3914 )
...
api(trace): introduce artifacts options
This introduces launch({ artifactsPath }) and newContext({ relativeArtifactsPath, recordTrace }) options.
- artifactsPath option controls the directory where all artifacts go. If not passed, artifacts are not collected.
- relativeArtifactsPath can be used to put context-specific artifacts into a subfolder. If not passed, shared artifactsPath is used.
- recordTrace controls trace recording.
We also expose trace types under playwright/types/trace.d.ts.
In the follow up:
- videos will be put into artifactsPath;
- downloads will be put into artifactsPath, or keep using existing downloadsPath when artifactsPath is not specified.
2020-09-18 11:54:00 -07:00
Dmitry Gozman
01a4060665
chore: move action instrumentation per-context ( #3908 )
...
This allows tracing to expose plugin-like api.
This also remove Progress -> ActionMetadata dependency, leaving
Progress a low-level utility.
2020-09-17 09:32:54 -07:00
Dmitry Gozman
dc06f0a75c
chore: introduce evaluateInUtility private api ( #3907 )
...
This is an experimental client-side api. We'll experiment with it in plugins like tracing.
2020-09-16 16:07:49 -07:00
Dmitry Gozman
36f2420b0f
chore(trace): remove dependency on handle._previewPromise ( #3906 )
...
We now mark the target with '__playwright_target__' attribute and
let the trace viewer do whatever it wants.
2020-09-16 15:26:59 -07:00
Yury Semikhatsky
5507553173
fix(screencast): repeat previous frame instead of current ( #3890 )
2020-09-15 15:21:50 -07:00
Dmitry Gozman
592bae1cea
feat(trace): record goto, setContent, goBack, goForward and reload ( #3883 )
2020-09-15 09:46:36 -07:00
Max Schmitt
8bc09af458
fix(firefox): imply default ports for proxy ( #3850 )
2020-09-14 21:22:07 -07:00
Andrey Lushnikov
430f2bedaa
devops: stop relying on ubuntu stock ffmpeg ( #3882 )
...
This patch bakes ffmpeg-linux r1001 into our NPM package.
This increases NPM package size from 4.2MB to 6.7MB.
Fixes #3845
2020-09-14 19:22:00 -07:00
Yury Semikhatsky
459d857bc3
feat(screencast): add saveAs and createReadableStream ( #3879 )
2020-09-14 18:40:55 -07:00
Dmitry Gozman
2f0d2029ca
chore: refactor goBack/goForward/reload ( #3859 )
...
These methods are the only users of waitForNavigation and
waitForLoadState on the server side. This refactor lifts the
Progress wrapper to the top-most goBack/goForward/reload call
and leaves waitForNavigation/waitForLoadState as internal helpers.
This way we get a single Progress for the actual api call.
2020-09-14 16:43:17 -07:00
Dmitry Gozman
0a243c6792
fix(waitTask): remove rerunnable tasks from the context data upon success/failure ( #3875 )
2020-09-14 14:55:37 -07:00
Dmitry Gozman
7ab0c10d7b
fix(launchServer): do not throw when 'port' option is present ( #3877 )
...
We now use 'launch' under the hood, which erroneously throws
when 'port' is present.
Instead, moved validation to the client side where it belongs,
added tests for validation errors.
2020-09-14 14:43:39 -07:00
Dmitry Gozman
01198f8eef
fix($$): use utility context when possible ( #3870 )
...
This avoids the typical issue of overridden bulitins,
trading it for performance of one by one node adoptions.
2020-09-14 10:38:14 -07:00
Yury Semikhatsky
e5c6b19c00
fix(launcher): check for ffmpeg only when starting screencast ( #3874 )
2020-09-14 10:26:44 -07:00
Pavel Feldman
c20cbae529
chore: remove trace viewer ( #3869 )
2020-09-14 07:56:04 -07:00
Max Schmitt
beceeaf6a1
feat(browserContext): add BrowserContext.browser() ( #3849 )
2020-09-14 07:50:47 -07:00
Dmitry Gozman
5314512cbc
chore: inline page._runAbortableTask ( #3861 )
...
It does not do anything nowadays.
2020-09-11 23:33:38 -07:00
Yury Semikhatsky
40323aa94d
fix(screencast): use viewport as default size ( #3844 )
2020-09-11 15:14:31 -07:00
Dmitry Gozman
c4adeb66ce
fix(snapshot): do not let a single frame fail the whole snapshot ( #3857 )
...
Sometimes, we are unable to take a frame snapshot. The most common
example would be "frame is stuck during the navigation in Chromium",
where we cannot evaluate until the frame is done navigating.
In this case, use all other frames and just stub the failing ones
with "Snapshot is not available". Chances are, noone will even see
this frame because it's an invisible tracking iframe.
2020-09-11 15:13:37 -07:00
Max Schmitt
c175dad290
chore: fix compatibility to the domain module ( #3851 )
2020-09-11 14:40:49 -07:00
Dmitry Gozman
263aa06fa4
feat(trace): trace more actions ( #3853 )
2020-09-11 13:28:24 -07:00
Dmitry Gozman
16be357489
feat(trace): trace page open/close events ( #3852 )
2020-09-11 11:34:53 -07:00
Dmitry Gozman
38ed8de23d
feat(tracing): trace actions ( #3825 )
...
- Fill and click actions pass metadata to Progress.
- Progress reports success/failure through instrumentation.
- Tracer consumes ActionResult and ActionMetadata and records them.
Currently, only click and fill actions pass metadata to
contain the size of the change. Everything else should follow.
2020-09-10 21:42:09 -07:00
Dmitry Gozman
9e41518c92
feat(rpc): allow sending metadata with rpc calls ( #3836 )
...
Currently, metadata does only contain the stack trace,
and we send it from the JS client.
2020-09-10 19:25:44 -07:00