Commit graph

500 commits

Author SHA1 Message Date
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
Pavel Feldman 3248c2449c
feat(inspector): collapse completed items (#5484) 2021-02-17 17:28:02 -08:00
Pavel Feldman b2227c1bcf
feat(inspector): allow selecting file (#5483) 2021-02-17 14:05:41 -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 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
Pavel Feldman 449adfd3ae
chore(recorder): move recording output into the gui app (#5425) 2021-02-11 17:46:54 -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 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
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