Commit graph

64 commits

Author SHA1 Message Date
Max Schmitt cd22072685
chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
Yury Semikhatsky c58f34fb2e
feat(fetch): introduce global fetch request (#8927) 2021-09-14 18:31:35 -07:00
Yury Semikhatsky 5141407c6b
fix(fetch): prefix request with underscore (#8922) 2021-09-14 12:56:09 -07:00
Pavel Feldman 64f9c3ba1d
feat(api): move fetch api into the namespace (#8871) 2021-09-13 12:43:07 -07:00
Yury Semikhatsky b6180055df
feat(fetch): make fetch api public (#8853) 2021-09-10 18:36:55 -07:00
Yury Semikhatsky 5550f58284
feat(fetch): fetch with request parameter (#8793) 2021-09-08 16:31:58 -07:00
Yury Semikhatsky b11b274b0d
feat(fetch): fulfill without passing fetch response body client<->server (#8789) 2021-09-08 14:59:12 -07:00
Yury Semikhatsky b4ca77be23
feat(fetch): get body lazily (#8784) 2021-09-08 13:40:07 -07:00
Yury Semikhatsky 77b3b0965a
feat(fetch): timeout option and default timeout (#8762) 2021-09-08 10:01:40 -07:00
Pavel Feldman 54bda2c8dd
fix(size): fix some of the request.size() problems (#8645) 2021-09-02 10:39:57 -07:00
Pavel Feldman 42e44f888b
feat(rawheaders): introduce initial plumbing (#8638) 2021-09-01 18:28:20 -07:00
Pavel Feldman a205ee27cb
fix(network): extra info can arrive before will send request (#8569) 2021-08-30 20:43:40 -07:00
Pavel Feldman e47bacdecb
fix(cookies): read response headers off extra info event, if any (#8526) 2021-08-30 09:58:44 -07:00
Max Schmitt f3dde0650f
feat(network): expose bodySize, transferSize, and headerSize (#8234) 2021-08-27 22:53:57 +02:00
Ross Wollman a1313727e8
fix(har): HAR artifacts need to be marked remote (#8462)
This is a follow-up fix to microsoft/playwright#8385.

Testing options are limited right now, but this change was confirmed
with a client running on my physical machine and a LaunchServer running
in a Docker container.

Before this change, the har.spec.ts only passed when the client and
server were on the some filesystem.

microsoft/playwright#8450 will likely give us options to test this in an
automated way in the official CI suite.
2021-08-26 11:26:08 -07:00
Ross Wollman cd110e6477
feat(har): Remotely accessible HAR file (#8385)
This change ensure's the HAR file is saved at `recordHar.path` on the
client instead of the server.

NB: The goal was to make this change transparent to the user and NOT
introduce any new APIs. Namely, I want to leave the API open for
potential `context.har.start()` and `context.har.stop()`.

This does BREAK servers that expect the HAR to be at the `recordHar.path`
on the server, but I think that's OK since there haven't been reports
of missing HAR on client making me think not many users are getting
HAR with client and server on different hosts anyways.

Closes #8355
2021-08-25 13:32:56 -07:00
Yury Semikhatsky c0010d16c6
feat: introduce BrowserContext._fetch (#8349) 2021-08-24 14:29:04 -07:00
Max Schmitt 8e20f13079
feat(routes): add support for the times option (#8399) 2021-08-24 20:45:50 +02:00
Max Schmitt c4eb2d4b1e
chore: move sdkLanguage over to the protocol init call (#8329) 2021-08-20 21:32:21 +02:00
Dmitry Gozman 7818f5fa0b
test: add a tracing bot that collects a trace for most contexts (#8316) 2021-08-19 19:09:19 -07:00
Ross Wollman 101662765c
api(cdp): newCDPSession accepts frames, too (#8157)
Without this, Playwright's CDP feature leaves unreachable
targets (namely OOPIFs).

This change allows for more advanced experimentation in user-land
without relying on out-of-band CDP connections and clients.

Now you can, for example, call `DOM.getDocument` on the
page OR main frame, observe there is an iframe node with
no `contentDocument` (i.e. OOPIF), make note of the referenced
`frameId`, and then iterate of page.frames() calling `Target.getInfo`
on each to link the Playwright Frame with the CDP `frameId` and
then recurse.

Relates #8113
2021-08-16 12:49:10 -07:00
Dmitry Gozman 3bf3318350
fix(test runner): make sure options, trace and screenshot apply to all contexts (#8083)
- Uses some auto fixtures to set default options and instrumentation on BrowserType.
- Moves screenshot, trace and video to worker-scoped fixtures.
- Throws in page/context when used from beforeAll/afterAll.
- Plumbs around BrowserType to be accessible from Browser and BrowserContext.
2021-08-09 18:09:11 -07:00
Max Schmitt 767e22c6b2
fix(network): process last inserted routes first in request interception (#7585) 2021-07-13 20:22:01 +02:00
Max Schmitt 371aa3dab2
feat: add browser.newContext({ baseUrl }) (#7409) 2021-07-06 21:16:37 +02:00
Pavel Feldman f43b4efbc9
fix(trace-viewer): include waitFor* in trace viewer (#7413) 2021-06-30 17:56:48 -07:00
Pavel Feldman a8d48a1a48
chore: remove hard-coded wrapApi names (#7347) 2021-06-28 13:27:38 -07:00
Max Schmitt 064150f8dd
chore: use fs.promises API instead of promisify (#6871) 2021-06-03 18:55:33 +02:00
Vignesh Shanmugam 4b3e5e5c17
feat(network): expose network events via browser context (#6370)
- fix #6340
- Exposes all the network related events (request, response, requestfailed, requestfinished) through the browser context to allow for managing network activity even if the is any navigations through popups or to new tabs which could result in creation of multiple page objects.
2021-05-13 10:29:14 -07:00
Pavel Feldman 21cb726b7d
chore(tracing): expose tracing api (#6523) 2021-05-12 12:21:54 -07:00
Pavel Feldman be27f47309
feat(tracing): introduce context.tracing, allow exporting trace (#6313) 2021-04-24 20:39:48 -07:00
Pavel Feldman a9219aa8b6
chore: start / stop context tracing (#6309) 2021-04-23 20:39:09 -07:00
Yury Semikhatsky 561cb23e8d
fix: dispatch popup event on the client end (#6044) 2021-04-02 11:15:07 -07:00
Pavel Feldman a7630c91d5
api: remove Chromium* classes (#6040) 2021-04-01 18:47:14 -07:00
Yury Semikhatsky 67c29e8155
chore: add missing await to floating promises (#5813) 2021-03-22 09:59:39 -07:00
Pavel Feldman 5cf13612cf
chore: pretty print storage state (#5830) 2021-03-15 19:03:09 -07:00
Max Schmitt d311058245
fix(BrowserContext): race between continue and close (#5729) 2021-03-08 19:53:19 -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
Pavel Feldman ae2ffb3fb9
feat(inspector): instrument wait for event (#5457) 2021-02-13 20:31:06 -08:00
Pavel Feldman 449adfd3ae
chore(recorder): move recording output into the gui app (#5425) 2021-02-11 17:46:54 -08:00
Joel Einbinder d8f637c239
chore(typescript): enable esModuleInterop (#5409) 2021-02-11 06:36:15 -08:00
Pavel Feldman 34adc28ed3
feat(pause): make page.pause public (#5288) 2021-02-03 16:01:51 -08:00
Pavel Feldman 8a8d8ea370
fix: update terminal size dynamically (#5250) 2021-02-02 14:25:51 -08:00
Pavel Feldman 45f7d73470
chore: plumb terminal size and port language (#5149) 2021-01-25 19:01:04 -08:00
Pavel Feldman 01d6f83597
chore: introduce debug toolbar (#5145) 2021-01-25 14:49:26 -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
Yury Semikhatsky a4eb121399
fix: add parameter to close/crash/disconnected etc events (#5098) 2021-01-22 09:58:31 -08:00
Joel Einbinder decf373c81
fix(electron): return a ChromiumBrowserContext for electron (#4913) 2021-01-13 12:08:14 -08:00
Pavel Feldman 31ffeb32e3
doc: further align docs w/ playwright.dev (2) (#4871) 2021-01-04 13:50:29 -08:00