Commit graph

115 commits

Author SHA1 Message Date
Dmitry Gozman c323a3e50b chore(chromium): move Page to common, implement PageDelegate (#184) 2019-12-09 14:08:20 -07:00
Yury Semikhatsky f9d5a18d05 chore(webkit): remove unused fields from Target (#183) 2019-12-09 12:13:19 -08:00
Dmitry Gozman 88aea0a886
fix: fix races in didClose and didDisconnect across browsers (#182)
Also merge initialize and swapSessionOnNavigation in webkit.
2019-12-09 10:16:30 -08:00
Dmitry Gozman b3817aab2a chore(webkit): remove most session usages from Page (#181)
These are moved to FrameManager, so that we can reuse Page between browsers.
2019-12-09 10:48:54 -07:00
Pavel Feldman f5cd742b79
test: rebaseline some click tests (#179) 2019-12-08 17:17:49 -08:00
Dmitry Gozman f38ab5d80f chore: reuse BrowserFetcher between browsers (#177) 2019-12-08 13:29:03 -08:00
Dmitry Gozman 0d0f6b7d03 fix(webkit): improve target swap handling (#175)
- Fix "page closed twice" race.
- Do not fire 'disconnected' on swapped out sessions.
- Use a different error for commands sent to swapped out targets.
  This allows callers to detect this situation and retry/throw/catch.
- Restore more state on swap: extra http headers, user agent, emulated media.
2019-12-07 16:58:23 -08:00
Yury Semikhatsky 02e29219fd fix(webkit): make go back/forard return null on error (#171) 2019-12-06 16:38:23 -08:00
Dmitry Gozman 5ab0faab93 chore: remove most usages of session from firefox Page (#169) 2019-12-06 17:34:27 -07:00
Pavel 0884e29695 chore: rearrange test spec files 2019-12-06 16:15:47 -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
Dmitry Gozman 14f078308d
chore: remove some usage of client from Page (#163)
This brings us closer to reusing Page between browsers.
2019-12-06 13:36:47 -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
Yury Semikhatsky b84d3c6cbe chore: do not accumulate protocol messages for debugging (#150) 2019-12-05 14:13:17 -08:00
Dmitry Gozman 51ca756efe
chore: encapsulate target business in Browser class (#151)
Page and BrowserContext are now closer to be reused between browsers.
2019-12-05 14:11:48 -08:00
Pavel Feldman 2d77760f01
chore: move tests around after targets extraction (#153) 2019-12-05 13:15:17 -08:00
Joel Einbinder 4478c653fd fix(install): generate new protocol.d.ts when browsers are downloaded (#149) 2019-12-05 12:21:55 -07:00
Dmitry Gozman d4f0084f67
chore: move element coordinates handling to common (#139)
Browser now implement boundingBox(), contentQuads() and layoutViewport().
2019-12-05 09:54:50 -08:00
Dmitry Gozman 3f554b3273 fix: handle failures of adoptElementHandle (#134)
There is no way to trigger this issue through the api just yet, but there will be
once we support handles as selectors.
2019-12-05 09:45:36 -07:00
Yury Semikhatsky 25af050bd4 feat(webkit): add page back/forward commands (#144) 2019-12-05 08:32:52 -08:00
Yury Semikhatsky b5af3cac11 fix(install): print version of the browser being downloaded (#146) 2019-12-05 08:30:58 -08:00
Joel Einbinder 9f603c49fb
feat: easy download (#56) 2019-12-04 17:58:38 -08:00
Pavel Feldman e1c4eaae28
chore: make targets chromium feature (#137) 2019-12-04 16:12:43 -08:00
Yury Semikhatsky 3305363f2a
fix(webkit): pass --headless only on Mac (#135) 2019-12-04 17:08:35 -07:00
Dmitry Gozman fc5898892b
feat(selectors): support optional "visible" property in all selectors (#129) 2019-12-04 13:11:10 -08:00
Joel Einbinder 492f539310
chore(firefox): lint against the juggler protocol (#94) 2019-12-04 10:33:29 -08:00
Pavel Feldman 01b321d014
feat(webkit): implement headless on Mac (#128) 2019-12-03 14:10:01 -08:00
Dmitry Gozman e124d44a55 chore: rework wait task to accept arbitrary task on dom world (#126) 2019-12-03 11:51:41 -07:00
Yury Semikhatsky ba54ad46b3 feat(page): add Page.setJavaScriptEnabled for WebKit (#125) 2019-12-03 10:47:02 -08:00
Dmitry Gozman 6b3c2632e7
feat(selectors): support various selectors in waitFor methods (#122) 2019-12-03 10:43:13 -08:00
Dmitry Gozman bb1433a143
feat(selectors): support various kinds of selectors (#118)
This adds support for generic "engine=body [>> engine=body]*" selector syntax
and auto-detects simple css or xpath.
2019-12-02 17:33:44 -08:00
Pavel Feldman 505c9e3660 test: uncomment more cookies tests 2019-12-02 17:02:33 -08:00
Pavel Feldman 8989da6c16 fix(cookies): follow up to make all platform tests pass 2019-12-02 16:48:38 -08:00
Pavel Feldman 040f93faa2 feat(cookies): implement cookies across the board (#121) 2019-12-02 16:36:46 -08:00
Yury Semikhatsky 2ca2a4cb18 feat(launcher): throw on browser launch failure, default args (#119) 2019-12-02 16:17:53 -08:00
Dmitry Gozman ffaf7326ab
chore: put remoteObject directly on JSHandle (#113) 2019-12-02 13:12:28 -08:00
Dmitry Gozman 113ffd6808
chore: reuse ConsoleMessage between browsers (#116) 2019-12-02 13:01:01 -08:00
Dmitry Gozman b6c892842b
feat(screenshot): multiple element screenshots are now taken sequentially (#114)
This makes multiple element screenshots to not fight for the page viewport
by putting viewport manipulation under screenshot task queue.

Drive-by: encapsulated all screenshot logic in Screenshotter.
2019-12-02 10:53:58 -08:00
Dmitry Gozman 76ab83f581 chore: reuse Dialog between browsers (#115) 2019-12-02 11:53:23 -07:00
Dmitry Gozman 8efd258e40
chore: encapsulate dom-related logic to DOMWorld, part 1 (#112) 2019-11-28 12:50:52 -08:00
Pavel Feldman 336338c97e
test: fix webkit tests (#111) 2019-11-27 16:23:46 -08:00
Dmitry Gozman 961556a596
chore: cleanup multiple definitions and types (#109) 2019-11-27 16:03:51 -08:00
Dmitry Gozman c3393039b0
chore: reuse ElementHandle between browsers (#108) 2019-11-27 16:02:31 -08:00
Dmitry Gozman b596f36bad chore: separate common part of ElementHandle from chromium-specific (#106) 2019-11-27 14:26:46 -08:00
Pavel Feldman 56b4f009ac chore: refactor the file chooser api (#107) 2019-11-27 14:26:30 -08:00
Pavel Feldman cf9c4d153a feat(webkit): implement file chooser interception (frontend) (#98) 2019-11-27 13:50:24 -08:00