Dmitry Gozman
dec8fb7890
fix(hover): do not require the element to be enabled before hovering ( #3445 )
2020-08-14 13:18:32 -07:00
Dmitry Gozman
9132d23b2b
fix(screenshot): wait for stable position before taking element screenshot ( #3216 )
...
Same goes for scrollIntoViewIfNeeded.
2020-07-29 16:36:02 -07:00
Dmitry Gozman
6cb1e03713
feat(rpc): disallow deps into rpc client from outside ( #3199 )
...
For this, common converters are extracted from rpc serializers.
2020-07-28 15:33:38 -07:00
Dmitry Gozman
0f0e2acfaf
fix(type): unify selection behavior when typing ( #3141 )
...
Before typing/pressing, we focus the target element. WebKit
sometimes selects the value in this case. To unify the behavior
between the browsers we behave similar to human:
- when the input is already focused, we just type;
- when the input is not focused, we focus it, move caret
to the start (like if user clicked at the start to focus the input)
and then type.
Note this only affects inputs with non-empty value.
2020-07-24 09:30:31 -07:00
Dmitry Gozman
1553f19bab
chore: update error messages to match future rpc validator ( #3075 )
2020-07-21 15:25:31 -07:00
Dmitry Gozman
4c8ba3ed67
chore: remove cli ( #2976 )
...
It will be a separate package instead.
2020-07-16 13:13:26 -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
e8e45e8450
feat(dom): migrate innerText, innerHTML and getAttribute to tasks ( #2782 )
...
This ensures synchronous access to avoid element recycling.
2020-07-01 16:10:53 -07:00
Pavel Feldman
e29f7b9f58
chore(rpc): support workers, file chooser, browser server ( #2766 )
2020-06-30 10:55:11 -07:00
Pavel Feldman
4e94bdabfd
chore(rpc): serialize rpc into actual wire string ( #2740 )
2020-06-27 11:10:07 -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
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
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
Pavel Feldman
bc3050776e
chore: prepare library types for rpc ( #2706 )
2020-06-25 08:30:56 -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
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
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
Joel Einbinder
9000ccb3b2
fix(click): don't timeout when innerWidth is modified ( #2669 )
...
We were evaluating `innerWidth` in the main context, where it could be modified.
2020-06-22 14:03:31 -07:00
Dmitry Gozman
f9633ea9b7
fix(scrollIntoView): ensure similar behavior across browsers, handle errors ( #2599 )
2020-06-17 10:48:07 -07:00
Pavel Feldman
c220fc7f46
chore(logs): rework logs for simplicity ( #2592 )
2020-06-16 17:11:19 -07:00
Pavel Feldman
59d0f8728d
test(recorder): add recorder sanity tests ( #2582 )
2020-06-16 10:15:08 -07:00
Pavel Feldman
1c7a8952b9
chore(cli): add recording mode ( #2579 )
2020-06-15 15:27:03 -07:00
Dmitry Gozman
d4c466868b
chore: explicitly plumb various errors through the retries ( #2554 )
...
We are about to have more errors, so explicit plumbing helps with visibility.
2020-06-12 14:59:26 -07:00
Dmitry Gozman
c4e8720eb5
feat(debug): generate preview for ElementHandle ( #2549 )
...
This is a best-effort debugging feature - we try to generate preview asynchronously,
so it might not be available immediately.
2020-06-12 11:10:18 -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
7ddf66418a
test: add a failing test with React rerender ( #2545 )
2020-06-11 15:19:35 -07:00
Dmitry Gozman
c99f0d1f98
feat(debug): more logs while waiting for stable, enabled, etc. ( #2531 )
2020-06-10 18:45:18 -07:00
Darío Kondratiuk
e3f34f6ae2
fix(selectOption): allow passing null to unselect all ( #2405 )
2020-06-10 09:37:29 -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
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
d5c992e1db
chore: unify evaluations across browsers even more ( #2459 )
...
This moves all the logic around UtilityScript to javascript.ts.
Also uncovers a bug in WebKit where we cannot returnByValue after navigation.
2020-06-03 17:50:16 -07:00
Dmitry Gozman
8e6375f532
chore: reduce the number of evaluate methods, improve types ( #2454 )
...
Types can now handle non-trivial tuples with handles inside.
2020-06-03 13:22:05 -07:00
Dmitry Gozman
1accb5141d
chore: convert more actions to Progress ( #2444 )
2020-06-03 11:23:24 -07:00
Dmitry Gozman
f188b0a174
chore: migrate most actions to Progress ( #2439 )
2020-06-03 09:14:53 -07:00
Dmitry Gozman
a644f0a881
feat(fill): wait for the element to be enabled/writable/visible ( #2435 )
2020-06-01 18:56:49 -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
de0bbd3031
chore: remove page pause support ( #2431 )
2020-06-01 11:14:16 -07:00
Dmitry Gozman
8f350e4fe6
chore: make polling in page cancelable from node ( #2399 )
...
- unifies polling timeouts with everything else,
based on the client time instead of the server time;
- prepares polling tasks for cancellation token
behavior.
Unfortunately, RerunnableTask had to be rewritten almost
entirely.
2020-05-30 15:00:53 -07:00
Dmitry Gozman
acf059fe00
fix(click): wait for button, input and select to be enabled before clicking ( #2414 )
2020-05-30 13:29:46 -07:00
Pavel Feldman
6620008dcb
chore: follow up to address evaluation review comments ( #2380 )
2020-05-27 22:19:05 -07:00
Dmitry Gozman
e2972ad5ba
feat(click): retry when the element it outside of the viewport ( #2330 )
...
The element might get animated into the viewport.
2020-05-22 11:15:57 -07:00
Pavel Feldman
aa0d844c76
chore: introduce utility script for evaluate helpers ( #2306 )
2020-05-20 15:55:33 -07:00
Andrey Lushnikov
f24696be62
feat: add page convenience methods for textContent and getAttribute ( #2235 )
...
This patch adds:
- `page.innerText()` / `frame.innerText()`
- `page.innerHTML()` / `frame.innerHTML()`
- `page.textContent()` / `frame.textContent()`
- `page.getAttribute()` / `frame.getAttribute()`
Fixes #2143
2020-05-18 17:58:23 -07:00
Pavel Feldman
99b7aaace8
chore: refactor injected script harness ( #2259 )
2020-05-15 15:21:49 -07:00
Dmitry Gozman
a2bee2ca73
fix(launch): handle timeout and exceptions during launch ( #2185 )
2020-05-11 15:00:13 -07:00