Dmitry Gozman
807dc1f324
fix(crash): improve documentation for crash, reject waitForEvent ( #2694 )
2020-06-25 09:53: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
Darío Kondratiuk
e3f34f6ae2
fix(selectOption): allow passing null to unselect all ( #2405 )
2020-06-10 09:37:29 -07:00
Dmitry Gozman
1d37a10558
chore: migrate navigations to Progress ( #2463 )
2020-06-04 16:43:48 -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
4413138cc6
fix(fill): allow to clear number input ( #2376 )
2020-05-27 20:01:08 -07:00
Dmitry Gozman
11d53ad529
test: disable flaky CSP test on Firefox ( #2374 )
2020-05-27 19:59:49 -07:00
Dmitry Gozman
2f993018ea
test: disable flaky test on win firefox ( #2332 )
2020-05-21 15:06:19 -07:00
Dmitry Gozman
de606b9553
fix(chromium): handle various exception values in pageerror ( #2293 )
2020-05-19 15:20:49 -07:00
Dmitry Gozman
fbccd328cc
test: disable firefox crash tests ( #2301 )
2020-05-19 14:54:13 -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
2bd427ad1d
feat(exposeBinding): a more powerful exposeFunction with source attribution ( #2263 )
2020-05-18 14:28:06 -07:00
Andrey Lushnikov
a38ac3fb62
fix: report hash in page.url()
( #2252 )
...
Fixes #2247
2020-05-14 17:23:19 -07:00
Pavel Feldman
cb465bc698
fix(abort): abort waiting with error upon disconnect ( #2204 )
2020-05-12 13:38:24 -07:00
Pavel Feldman
7a8dd2c361
feat(console): allow page.on('console', console.log) ( #2145 )
2020-05-07 15:34:09 -07:00
Pavel Feldman
534857269b
fix(console): respect repeat count in webkit ( #2032 )
2020-04-29 12:13:57 -07:00
Dmitry Gozman
a0003354d8
test: add a test for sourceURL in exception stacks ( #1880 )
2020-04-20 13:00:31 -07:00
Dmitry Gozman
649f37f885
fix(pageerror): report correct error message and stack ( #1862 )
...
The error stack matches the browser format.
2020-04-20 11:37:02 -07:00
Yury Semikhatsky
2b96b85e05
fix(firefox): throw error when added script blocked by CSP ( #1841 )
2020-04-17 08:51:54 -07:00
Andrey Lushnikov
0ba823dd6f
feat: introduce page.on('crash')
event ( #1782 )
...
Currently, whenever the page crashes, it emits an `'error'` event.
Error event is a special type of event in node.js; if unhandled,
it crashes the process.
Instead of emitting `'error'` event, this patch switches to emitting
`'crash'` event. Playwright users are free to handle the event
however they like, or just to ignore it.
2020-04-15 00:04:35 -07:00
Joel Einbinder
a7572c7f09
feat: nicer error message for page.addScriptTag ( #1754 )
2020-04-12 18:46:53 -07:00
Dmitry Gozman
ade9d23c28
test: remove module.export.describe wrapper ( #1716 )
2020-04-08 15:19:09 -07:00
Dmitry Gozman
af01d15f62
test: slim down test utils ( #1701 )
2020-04-07 19:15:48 -07:00
Dmitry Gozman
e683c086de
fix(fill): make fill work with date/time inputs ( #1676 )
...
Date/time inputs are locale-specific, and also do not work with insertText. We just set the value on them and emulate input/change events. Note that some browsers do not support these input types just yet.
2020-04-07 10:07:06 -07:00
Dmitry Gozman
e0c8fbf1a6
test: put test runner api on global, remove unused parameters ( #1684 )
2020-04-07 08:10:31 -07:00
Dmitry Gozman
c01ad84bd4
fix(fill): use isVisible to be consistent with waitForSelector ( #1539 )
...
Fixes #1442 .
2020-03-25 14:40:42 -07:00
Dmitry Gozman
60942d0af5
chore(selectors): move selectors logic to selectors.ts ( #1536 )
...
This encapsulates selectors logic in one place, in a preparation for more complex scenarios like main-world selectors or piercing frames.
Note: we had `Page.fill should wait for visible visibilty` test, but we do not actually wait for visible in page.fill(). It happened to pass due to lucky evaluation order.
References #1316 .
2020-03-25 14:08:46 -07:00
Pavel Feldman
23e5d80e06
test: uncomment slow ff tests ( #1479 )
2020-03-22 22:16:39 -07:00
Yury Semikhatsky
535b484637
api(context): get rid of PageEvent ( #1433 )
2020-03-19 16:25:12 -07:00
Dmitry Gozman
7bd924673a
fix(PageEvent): properly wait for initial navigation in chromium and webkit ( #1412 )
2020-03-18 17:14:18 -07:00
Dmitry Gozman
9b86c631c8
api: make BrowserContext.pages() synchronous ( #1369 )
...
Returns all pages which have been initialized already.
References #1348 .
2020-03-13 11:33:33 -07:00
Pavel Feldman
e1d3196460
api(*.selectOption): renamed from *.select ( #1371 )
2020-03-12 21:30:12 -07:00
Joel Einbinder
0d2ae91fac
fix(test): enable presssing in frames test ( #1326 )
...
Fixes #1265
2020-03-10 14:47:52 -07:00
Dmitry Gozman
38c3837b3e
test: remove test which is inherently racy ( #1313 )
...
page.evaluate() sometimes triggers navigation fast enoguh, so that
next page.setContent() has no execution context to evaluate in.
2020-03-10 10:11:44 -07:00
Pavel Feldman
3c35d7b058
api(waitFor): click(waitFor) -> click(force) ( #1275 )
2020-03-06 16:24:21 -08:00
Pavel Feldman
328805747f
test(webkit): disable failing wk test
2020-03-06 10:20:15 -08:00
Pavel Feldman
a802b00880
test: oops - fdescribe
2020-03-06 09:42:13 -08:00
Pavel Feldman
49c1161e00
api(press): bump .press to the page/frame level ( #1262 )
2020-03-06 09:38:08 -08:00
Dmitry Gozman
e5f82af47c
api(popups): emit PageEvent immediately, and resolve page() once initialized ( #1229 )
...
This way we do not miss any popups, even immediately closed ones.
2020-03-05 15:18:27 -08:00
Dmitry Gozman
cd8714d573
tests: skip failing waitForNavigation test in Chromium ( #1248 )
2020-03-05 13:28:45 -08:00
Yury Semikhatsky
aabdac8380
api: remove Page.setCacheEnabled ( #1231 )
2020-03-05 10:09:04 -08:00
Pavel Feldman
11f68bac54
feat(cr, wk): make clicks, input and evaluate await scheduled navigations ( #1200 )
2020-03-04 19:15:01 -08:00
Dmitry Gozman
5ee744cd26
api(page.frame): allow looking up frames by name ( #1228 )
2020-03-04 17:53:39 -08:00
Joel Einbinder
fcfe887c57
feat(select): don't accept undefined as a value ( #1202 )
...
`page.select` accepting an `undefined` value is a legacy of when `page.select` took `...values`. This matches the way the method is documented in the API.
2020-03-03 16:59:41 -08:00
Pavel
ba06fb2f0d
test: mark some tests as skipped
2020-03-02 14:57:54 -08:00
Pavel Feldman
5bd6e4970b
test: it.skip skips and it.fail expects to fail now ( #1178 )
2020-03-02 13:47:08 -08:00
Dmitry Gozman
823bf389a7
api: evaluateOnNewDocument -> addInitScript ( #1152 )
...
Also adds more options to specify the script.
2020-02-27 17:42:14 -08:00
aesyondu
fdfec8eb2a
fix(platform) instanceof bug between execution contexts of RegExp object ( #1048 )
...
First encountered at jest-playwright repo:
https://github.com/mmarkelov/jest-playwright/issues/38
Solution based on:
https://stackoverflow.com/questions/4339288/typeof-for-regexp#comment4724685_4339350
2020-02-24 18:32:17 -08:00