Commit graph

60 commits

Author SHA1 Message Date
Dmitry Gozman 7843c29d32
feat(selectors): auto-detect each selector part (#1160) 2020-02-28 14:41:32 -08:00
Dmitry Gozman d97ea70804
chore: move more injected code to injected to reduce evaluation size (#1093) 2020-02-25 07:06:20 -08:00
Dmitry Gozman ba29470cc1
fix(api): rename relativePoint to offset, remove unused parameters from input (#1092) 2020-02-24 21:12:02 -08:00
Dmitry Gozman 1f8508d1ed
feat(waitFor): update various waitFor options to be a single boolean (#1066) 2020-02-22 09:16:28 -05:00
Dmitry Gozman 40164298a8
api: remove ElementHandle.visibleRatio (#1069) 2020-02-19 16:08:25 -08:00
Dmitry Gozman 33824aa1d7
feat(click): waitForInteractable option, defaults to true (#934) (#1052) 2020-02-19 09:34:57 -08:00
Pavel Feldman f2b2d72693
fix(input): emit change events upon page.setInputFiles (#1028) 2020-02-18 09:15:47 -08:00
Dmitry Gozman dbb45d443a
Revert "feat(click): waitForInteractable option, defaults to true (#934)" (#1013)
Reason: new tests are flaky on all bots.
2020-02-14 13:05:23 -08:00
Dmitry Gozman 9413351d3f
feat(click): waitForInteractable option, defaults to true (#934) 2020-02-14 11:55:34 -08:00
Dmitry Gozman c69dccf7c1
feat(click): use browser-provided scrollIntoViewIfNeeded (#893) 2020-02-11 10:30:09 -08:00
Pavel Feldman 84f5700294
feat(api): rename browserContext() to context() in the apis, remove url from newPage (#906) 2020-02-10 10:41:45 -08:00
Pavel Feldman 4d84e35096
fix(upload): detect mime type from file extension (#911) 2020-02-10 10:08:51 -08:00
Andrey Lushnikov a72784a677
fix(test): properly clean input field (#860) 2020-02-05 18:11:33 -08:00
Joel Einbinder 4be39f8af0
chore(types): upgrade to typescript 3.7.5 (#855) 2020-02-05 16:53:36 -08:00
Pavel Feldman e3e2da3186
feat(check): introduce page.check/uncheck (#826) 2020-02-04 14:39:10 -08:00
Pavel Feldman 05d4746eb5
feat(selectors): temporarily remove zs engine (#824) 2020-02-03 16:14:37 -08:00
Pavel Feldman 1059e22f9e
fix(fill): make fill work for input[type=number] (#819) 2020-02-03 15:50:45 -08:00
Andrey Lushnikov b82bc5fbd4
feat: treat selectors with leading '(//' as xpath (#821)
This starts treating the following selectors as xpath:
- `page.$('//div')`
- `page.$('(//div)[1]')`
- `page.$('((((//div))))[1]')`

(and generally, any number of leading openting parenthesis)

Fixes #817
2020-02-03 14:52:18 -08:00
Yury Semikhatsky 603b9f54dd
fix: make contentFrame cross-frame handles test pass (#761) 2020-01-30 11:04:09 -08:00
Dmitry Gozman 2bef4aea03
feat(api): introduce selectors.register method (#701) 2020-01-28 11:20:34 -08:00
Dmitry Gozman 541fa95ce4 fix(ownerFrame): correctly handle adopted node usecase (#677) 2020-01-27 11:43:43 -08:00
Dmitry Gozman 894e91bb68 fix(api): remove $x form the api, $$ works equally good (#544) 2020-01-20 11:30:22 -08:00
Dmitry Gozman 734c752fea chore: rework log api calls functionality to not replace objects (#518) 2020-01-16 17:48:38 -08:00
Dmitry Gozman 74b208cae5 feat(selectors): text=foo selector engine (#475) 2020-01-13 17:39:43 -08:00
Dmitry Gozman a1d1f26fb7 chore: more strict type checking (#466) 2020-01-13 13:33:25 -08:00
Pavel Feldman a8b9920a14 feat(logging): log the API calls (#464) 2020-01-13 09:14:28 -08:00
Arjun Attam 5c1f7cfb0c fix(fill): use HTMLInputElement.select (#406) 2020-01-07 13:57:17 -08:00
Dmitry Gozman 9c966c8b19
feat(pw-web): introduce platform.ts to absract between node and browser platforms (#392) 2020-01-07 11:55:24 -08:00
Arjun Attam 562e6f5fe1 chore(license): use Apache 2.0 (#389) 2020-01-06 18:22:35 -08:00
Dmitry Gozman 491eeeef7e feat(scrollIntoView): expose scrollIntoViewIfNeeded in api (#382)
This also replaces isIntersectingViewport with visibleRatio for more flexibility.
2020-01-06 13:16:56 -08:00
Dmitry Gozman f1d6fe6bd8 chore: remove non-input related stuff from input (#369) 2020-01-03 12:59:06 -08:00
Dmitry Gozman 12ac458614 fix(elementhandle): contentFrame and ownerFrame work in various scenarios (#311)
Drive-by: use evaluateInUtility for various utility evals.
2019-12-19 15:19:22 -08:00
Dmitry Gozman b378bc7f6c
feature(evaluate): support cross-context element handles (#295) 2019-12-19 11:44:07 -08:00
Dmitry Gozman c172a7e7e0 feature: $wait similar to waitForFunction, but taking a selector (#303) 2019-12-18 18:11:02 -08:00
Dmitry Gozman 7750db97fe
api: remove ExecutionContext from api (#290)
In the current state, it is superseeded by Frame and JSHandle.
2019-12-18 13:51:45 -08:00
Pavel Feldman 6d0dfd0abf
feat(context): start moving overrides to the context level 2019-12-18 12:23:33 -08:00
Dmitry Gozman fd927000ea feature: update api around selectors (#280)
- Selector is again a string.
- Most methods taking selector also accept waitFor option.
- Available waitFor options are: 'visible', 'hidden', 'any' === true, false === undefined.
- waitForXPath is removed.
- waitForSelector is replaced by $(selector, { waitFor: true }).
2019-12-17 14:30:02 -08:00
Dmitry Gozman 48be99a56e feat(selectors): add id selectors (#270) 2019-12-16 20:49:18 -08:00
Pavel Feldman df95b9ddb4 feat(waitFor): allow actions to wait for selector; make visible requirement default (#254) 2019-12-14 20:13:22 -07:00
Dmitry Gozman 97c50c22ab chore: inherit FrameExecutionContext from ExecutionContext (#234) 2019-12-12 21:11:52 -08:00
Dmitry Gozman 39fa313535 chore: merge DOMWorldDelegate and PageDelegate (#228) 2019-12-12 17:51:05 -08:00
Dmitry Gozman 59b0900321
feat(selectors): introduce zs selector engine (#214) 2019-12-12 09:02:37 -08:00
Joel Einbinder e3f34bd69a
fix(fill): throw when the element isn't fillable (#160)
An element is fillable if its:
- In dom
- Not display:none or visibility:hidden
- textarea or input or contenteditable

if textarea or input it must also be
- not readOnly
- not disabled

#133
2019-12-09 14:51:19 -08:00
Pavel Feldman f5cd742b79
test: rebaseline some click tests (#179) 2019-12-08 17:17:49 -08:00
Pavel b45ea22660 test: fix element.handle nested frames 2019-12-06 15:11:14 -08:00
Pavel bcb62de4b2 fix(test): make click tests pass everywhere 2019-12-06 14:48:41 -08:00
Pavel 349ce22565 lint: follow up with lints 2019-12-06 12:04:11 -08:00
Pavel Feldman bb1888c86e feat(screenshots): make them work everywhere (#164) 2019-12-06 11:33:24 -08:00
Joel Einbinder 39b22b41c5
feat: make JSHandle generic (#140)
This makes it so that JSHandles and ElementHandles are aware of what types they point to. As a fun bonus, `$eval('input')` knows its going to get an HTMLInputElement.

Most of this patch is casting things where previously we just assumed ElementHandles held the right kind of node. This gets us closer to being able to turn on `noImplicityAny` as well.

#6
2019-12-05 16:26:09 -08:00
Dmitry Gozman e992c7fa7d chore: unify screenshot handling between browsers, introduce Screenshotter everywhere (#156) 2019-12-05 14:48:39 -08:00