Commit Graph

2276 Commits

Author SHA1 Message Date
Yury Semikhatsky c6df8fd507
browser(webkit): abort interception if loader reached termial state (#2776) 2020-06-30 16:47:10 -07:00
Andrey Lushnikov 55a07dbf4d
fix: follow-up with offline comments on implementation of deprecation (#2770)
This moves all extra deprecation messages from vendor implementations
into a single vendor-neutral land.
2020-06-30 11:02:12 -07:00
Pavel Feldman e29f7b9f58
chore(rpc): support workers, file chooser, browser server (#2766) 2020-06-30 10:55:11 -07:00
Pavel Feldman 5bb018e0e5
chore(rpc): attribute calles to page, ignore USES_HOOKS (#2764) 2020-06-29 18:58:09 -07:00
Pavel Feldman 3a7d629c61
chore(rpc): pass more network tests (#2762) 2020-06-29 16:37:38 -07:00
Andrey Lushnikov 0963c1979e
chore: deprecate method `context.setHTTPCredentials()` (#2763)
This will start emitting deprecation warning once
`context.setHTTPCredentials` is called.
2020-06-29 16:37:01 -07:00
Dmitry Gozman 38236b4f29
fix(close): ensure close() can be called twice (#2744)
... without any exceptions.
2020-06-29 16:26:32 -07:00
Dmitry Gozman 1fa9d30992
fix(evaluate): awaitPromise when Promise is overwritten (#2759)
Firefox and WebKit require native promises to provide awaitPromise
functionality. When the Promise is overwritten, all evaluations
in the main world produce wrong Promise, so we wrap with async
function to get a native promise instead.
2020-06-29 16:25:52 -07:00
Arjun Attam e154e0837b
docs(ci): fix gitlab setup 2020-06-29 16:04:58 -07:00
Arjun Attam c8076121e2
docs: add new doc for multi-page scenarios (#2737)
* docs: multi-page scenarios

* docs: multi-page scenarios

* docs: multi-page scenarios
2020-06-29 15:46:33 -07:00
Arjun Attam 69127ad8d3
docs(docker): update to use official image (#2760) 2020-06-29 15:23:01 -07:00
Arjun Attam 28a9f55a49
chore(devops): use official docker image on circleci (#2756) 2020-06-29 11:22:41 -07:00
Dmitry Gozman 18f9b4a219
test: add failing test for navigation corner cases (#2746) 2020-06-29 10:39:03 -07:00
Pavel Feldman e920fde9f7
chore(rpc): bootstrap demo for rpc (#2741) 2020-06-27 11:32:27 -07:00
Pavel Feldman 4e94bdabfd
chore(rpc): serialize rpc into actual wire string (#2740) 2020-06-27 11:10:07 -07:00
Pavel Feldman 3e33523ee3
chore(rpc): clear the browsercontext test spec (#2739) 2020-06-26 22:38:21 -07:00
Pavel Feldman db12ddebb3
chore(rpc): clear the page test spec (#2736) 2020-06-26 21:22:03 -07:00
Arjun Attam aad6301aca
docs(ci): update intro, caching section, add gitlab (#2735) 2020-06-26 17:49:18 -07:00
Arjun Attam 0cb5e95bdf
docs(frames): improve snippet to get frame (#2734) 2020-06-26 17:49:03 -07:00
Pavel Feldman 6393407a6a
chore(rpc): support downloads, dialogs, persistent context (#2733) 2020-06-26 17:24:21 -07:00
Dmitry Gozman b54303a386
fix(textContent): make page.textContent(selector) atomic (#2717)
We now query selector and take textContent synchronously. This
avoids any issues with async processing: node being recycled,
detached, etc.

More methods will follow with the same atomic pattern.

Drive-by: fixed selector engine names being sometimes case-sensitive
and sometimes not.
2020-06-26 16:32:42 -07:00
Dmitry Gozman 43f70ab978
test: add more failing tests with react recycle (#2731) 2020-06-26 16:31:51 -07:00
Pavel Feldman 02f7501725
chore(rpc): strongly-type the initializer, remove __init__ phase (#2729) 2020-06-26 12:28:27 -07:00
Pavel Feldman 18d6140d3e
chore(rpc): support routes and bindings (#2725) 2020-06-26 11:51:47 -07:00
Dmitry Gozman 064a0a1154
fix(webkit): do not swallow errors when returning by value (#2723)
We currently return undefined whenever we had an error trying
return the evaluation result by error. The most common error
is "execution context destroyed".

This produces very unexpected undefined from methods that do not
ever expect undefined. Instead, we should throw because we were
not able to return the result.
2020-06-26 09:50:57 -07:00
Pavel Feldman 71618a9e2b
chore(rpc): implement input, a11y, console (#2722) 2020-06-25 18:01:18 -07:00
Dmitry Gozman ab6a6c9b82
chore: run most actions through page._runAbortableTask (#2721)
This introduces a single place for future snapshots.
2020-06-25 16:57:21 -07:00
Pavel Feldman bab6833232
chore: introduce the experimental rpc implementation (#2720) 2020-06-25 16:05:36 -07:00
Dmitry Gozman 5d5cf26a0e
fix(logs): streaming logs from InjectedScriptPoll without exception (#2712)
We used to get undefined messages, because we were mistakenly
fulfilling the logs multiple times.
2020-06-25 13:13:10 -07:00
Dmitry Gozman 807dc1f324
fix(crash): improve documentation for crash, reject waitForEvent (#2694) 2020-06-25 09:53:56 -07:00
Pavel Feldman bc3050776e
chore: prepare library types for rpc (#2706) 2020-06-25 08:30:56 -07:00
Andrey Lushnikov 1865c5685a
testrunner: support globalSetup and globalTeardown hooks. (#2686) 2020-06-24 22:08:46 -07:00
Dmitry Gozman f111974ad6
chore: prepare parsed selectors to more tasks (#2696)
We currently have dispatchEventTask and waitForSelectorTask.
However, most selector-based operations make sense as tasks, to ensure
atomic execution, e.g. textContent(selector) or focus(selector).
This will fight hydration, elements recycling and other async issues.

In preparation, decouple tasks from selectors parsing so that
we can have common infrastructure for tasks.
2020-06-24 17:03:28 -07:00
Dmitry Gozman 39ce35e154
fix(errors): strict error handling around element operations (#2567)
- Gave all possible dom errors distinct names, and throw them on the node side.
- Separated errors into FatalDOMError and RetargetableDOMError.
  Fatal errors are unrecoverable. Retargetable errors
  could be resolved by requerying the selector.
- This exposed a number of unhandled 'notconnected' cases.
- Added helper functions to handle errors and ensure TypeScript catches
  unhandled ones.
2020-06-24 15:12:17 -07:00
Andrey Lushnikov 8fbd647099
fix(playwright-core): bring back index.js in playwright-core (#2691)
References #2540
2020-06-24 13:54:19 -07:00
Dmitry Gozman 355305d31d
feat(screenshot): accept timeout, migrate to Progress, wait for visible (#2679)
Element screenshot now waits for the element to become visible and
throws on detach.

Both screenshot methods accept a timeout and capture logs using Progress.
Also, carefully handling exceptions and restoring the viewport.
2020-06-24 10:16:54 -07:00
Yury Semikhatsky 924a884102
docs: linux core dump instructions (#2690) 2020-06-24 10:04:11 -07:00
Arjun Attam 4af8c6831e
docs: improve snippets for console logs (#2684) 2020-06-23 19:34:18 -07:00
Andrey Lushnikov 07dbd0baae
testrunner: teach runHook to accept hook arguments (#2682) 2020-06-23 18:17:14 -07:00
Yury Semikhatsky 22b4a6bd27
devops: enable coredumps for headful tests (#2678) 2020-06-23 17:18:29 -07:00
Andrey Lushnikov c61e2d6cc9
testrunner: drop nested test environments (#2681) 2020-06-23 16:45:00 -07:00
Pavel Feldman fca514d74e
chore: move non-trivial types out of types.ts (#2680) 2020-06-23 14:51:06 -07:00
Dmitry Gozman d0a6e1a64e
fix(dom): make selectText and scrollIntoViewIfNeeded wait for visible (#2628)
All other methods wait for the element to be visible, so we should make
them behave similarly.
2020-06-23 13:02:31 -07:00
Ivan Krutov a8eaee3173
docs: add Moon to showcase.md (#2677) 2020-06-23 10:54:37 -07:00
Dmitry Gozman 5a525db02b
feat(firefox): bump firefox to 1116 (#2668) 2020-06-22 21:18:18 -07:00
Arjun Attam 6cec2dfb7c
docs: add assertions doc (#2585)
* docs: add assertions doc

* docs: assertions and verification split
2020-06-22 16:53:56 -07:00
Dmitry Gozman 687067831a
browser(firefox): do not fail when decoding large responses (#2671) 2020-06-22 16:01:16 -07:00
Dmitry Gozman 3d49af2537
browser(firefox): fix redirect interception (#2672)
We sometimes receive shouldIntercept for redirects,
and should not issue sendOnRequest for the second time.
2020-06-22 15:57:05 -07:00
Andrey Lushnikov bb34418095
devops: do cache busting for APT (#2656)
To avoid caching old package lists, every `apt-get install`
should be prefixed with `apt-get update`.

More info on the matter:
- https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get
- https://github.com/moby/moby/issues/3313
2020-06-22 15:54:19 -07:00
Yury Semikhatsky 40b1a14626
browser(webkit): support screencast scale on Mac (#2655) 2020-06-22 14:40:46 -07:00