Commit graph

18 commits

Author SHA1 Message Date
Dmitry Gozman 6fe1cd9812
chore: move protocol files to src/protocol (#3571) 2020-08-21 18:46:11 -07:00
Dmitry Gozman 1e9c0eb705
chore: remove logger infrastructure from server side (#3487)
We do not implement LoggerSink on the server, so we can
use a simple debugLogger.
2020-08-17 14:12:31 -07:00
Dmitry Gozman bc23324878
chore: remove apiName plumbing and some unused methods from server side (#3481)
We append apiName where needed on the client instead.
2020-08-14 18:25:32 -07:00
Dmitry Gozman c51ea0afd1
feat(rpc): remove PageAttribution from the protocol, attribute on the client side (#2957)
This also changes timeout error format to
"page.click: Timeout 5000ms exceeded", so that all errors
can be similarly prefixed with api name.

We can now have different api names in different clients,
and our protocol is more reasonable.
2020-07-15 14:04:39 -07:00
Dmitry Gozman 2a86ead0ac
chore: replace FrameTask with internal events on Frame (#2856)
We now use a few helper.waitForEvent calls to wait for internal
events kNavigationEvent and kLifecycleEvent. With these events,
we should be able to replicate logic over rpc.
2020-07-07 15:22:05 -07:00
Pavel Feldman c220fc7f46
chore(logs): rework logs for simplicity (#2592) 2020-06-16 17:11:19 -07:00
Pavel Feldman 61b11252b4
chore(debug): various debug mode improvements (#2561) 2020-06-13 13:17:12 -07:00
Dmitry Gozman 1bf9e65ef5
fix(log): include log name in progress recording (#2550) 2020-06-12 09:48:56 -07:00
Pavel Feldman 894826dec0
chore: form the debug script for authoring hints / helpers (#2551) 2020-06-11 18:18:33 -07:00
Dmitry Gozman 4d069dda0f
feat: avoid side effects after progress aborts (#2518)
Actions like click, focus or polling now avoid doing any work
with side-effects after their progress has been aborted.
2020-06-09 18:57:11 -07:00
Dmitry Gozman 80705ff5e9
chore: simplify logging a bit (#2512)
This merges a few classes and stops inheriting from InnerLogger.
2020-06-09 16:11:17 -07:00
Dmitry Gozman bb4e959d2d
feat(debug): add note about DEBUG=pw:api to errors (#2496) 2020-06-08 11:41:09 -07:00
Dmitry Gozman 5c3a275270
feat(debug): improve api logs (#2481) 2020-06-06 20:59:06 -07:00
Dmitry Gozman 3ec79e17fc
chore: simplify timeout handling in progress (#2487) 2020-06-05 15:53:30 -07:00
Dmitry Gozman 1d37a10558
chore: migrate navigations to Progress (#2463) 2020-06-04 16:43:48 -07:00
Dmitry Gozman bf67245de6
feat(debug): stream logs from waitForSelector (#2434)
- we can now stream logs from InjectedScriptProgress to Progress;
- waitForSelector task uses it to report intermediate elements.
2020-06-01 15:48:23 -07:00
Dmitry Gozman b7df4d57a4
chore: migrate wait tasks to Progress (#2422) 2020-06-01 08:54:18 -07:00
Dmitry Gozman d980ed7e7e
chore: introduce Progress concept (#2350)
A progress roughly corresponds to an api call. It is used:

- to collect logs related to the call;
- to handle timeout;
- to provide "cancellation token" behavior so that cancelable process can either
  early-exit with progress.throwIfCanceled() or race against it with progress.race();
- to ensure resources are disposed in the case of a failure
  with progress.cleanupWhenCanceled();
- (possibly) to log api calls if needed;
- (in the future) to augment async stacks.
2020-05-29 14:39:34 -07:00