Commit Graph

34 Commits

Author SHA1 Message Date
Yury Semikhatsky
fbe0fb2977
fix(api.json): do not copy documentation from base class members (#4048) 2020-10-02 19:19:19 -07:00
Dmitry Gozman
5e42029fce
api: allow exposeBinding to pass handles (#4030)
This adds an option `{ handle: true }` to pass a single handle instead of arbitrary json values.
2020-10-01 22:47:31 -07:00
Dmitry Gozman
0ade6af689
api(trace): introduce artifacts options (#3914)
api(trace): introduce artifacts options

This introduces launch({ artifactsPath }) and newContext({ relativeArtifactsPath, recordTrace }) options.
- artifactsPath option controls the directory where all artifacts go. If not passed, artifacts are not collected.
- relativeArtifactsPath can be used to put context-specific artifacts into a subfolder. If not passed, shared artifactsPath is used.
- recordTrace controls trace recording.

We also expose trace types under playwright/types/trace.d.ts.

In the follow up:
- videos will be put into artifactsPath;
- downloads will be put into artifactsPath, or keep using existing downloadsPath when artifactsPath is not specified.
2020-09-18 11:54:00 -07:00
Max Schmitt
190d16daa3
feat: add browser type to device descriptors (#3731) 2020-09-03 13:12:43 -07:00
Joel Einbinder
6a93cb9749
fix(types): don't show types that we don't export (#3185)
Today we have a bunch of types used by the d.ts file that are not exported. We don't want to export them because it would greatly increase our semver API surface area, so this patch inlines them. Now users will not see names of types they can't import.
2020-08-28 17:53:03 -07:00
Dmitry Gozman
f4e8f34c96
chore: move chromium to src/server/chromium, enfore installer deps (#3582) 2020-08-22 15:46:42 -07:00
Dmitry Gozman
9fca63f8ec
chore: move src/rpc/client to src/client (#3581) 2020-08-22 15:13:51 -07:00
Joel Einbinder
c0b9cecc65
feat(types): export ConnectOptions (#3147) 2020-08-16 16:40:25 -07:00
Dmitry Gozman
85c93e91a7
api: introduce ElementHandle.waitForSelector (#3452)
This is similar to Frame.waitForSelector, but relative to the handle.
2020-08-14 14:47:24 -07:00
Joel Einbinder
55a78482e4
fix(types): fix type generation to make ts tests work (#3385) 2020-08-11 14:31:20 -07:00
Dmitry Gozman
3179e71912
feat(rpc): in-process rpc on by default (#3104) 2020-08-10 14:18:58 -07:00
Dmitry Gozman
c6acc32889
docs(api): explicit nulls, use Serializable and EvaluationArgument more (#3358) 2020-08-07 20:55:22 -07:00
Joel Einbinder
c9409bf1b3
fix(types): add missing properties to DeviceDescriptor (#3332) 2020-08-06 15:45:13 -07:00
Max Schmitt
21b1be7351
docs(selectors): fixed selector register example (#3169) 2020-07-29 10:37:57 -07:00
Andrey Lushnikov
47e30f047b
feat: introduce chromiumSandbox launch option (#3067)
The option is intended to be used instead of the `--no-sandbox`
argument that is accepted exclusively by Chromium and crashes
WebKit.

References #2745
2020-07-21 13:49:09 -07:00
Dmitry Gozman
0c80c22716
feat(rpc): plumb CDPSession (#2862) 2020-07-07 18:47:00 -07:00
Joel Einbinder
fb84e19b6f
feat(types): autocomplete for default devices (#2198)
* feat(types): autocomplete for default devices

* don't export the extra Device type

Co-authored-by: Joel Einbinder <joel.einbinde@gmail.com>
2020-06-18 12:28:20 -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
Andrey Lushnikov
43eed027bd
chore: rename root index-for-dev.js into index.js (#2337) 2020-05-23 00:03:57 -07:00
Joel Einbinder
8e396fdac0
fix(types): add missing types for removing event listeners (#2307) 2020-05-20 07:34:36 -07:00
Pavel Feldman
c5b0baacd1
chore: remove main index.js from playwright-core (#2178) 2020-05-11 09:38:09 -07:00
Pavel Feldman
d487a315b9
doc: fix the route docs (#2174) 2020-05-11 08:22:48 -07:00
Pavel Feldman
bcce48362a
api(waitForSelector): make "state: visible" default, includes rename to state (#2091) 2020-05-04 11:03:44 -07:00
Joel Einbinder
671cfa0a54
fix(types): support objects with typed keys and values (#1752)
There are a few places in the API where we use objects as maps. This patch adds them to docs and the types.

For `env`, we accept booleans and numbers as well because they are often used for their string values.
2020-04-23 14:45:57 -07:00
Dmitry Gozman
948d51d52c
fix(types): export selected types (#1881)
Currently exports LaunchOptions, BrowserContextOptions, Cookie and their deps.
2020-04-20 17:30:57 -07:00
Pavel Feldman
0656771167
api(networkidle): remove networkidle2 (#1883) 2020-04-20 16:52:26 -07:00
Dmitry Gozman
cd2ecb2212
fix(types): allow explicit subtypes for unwrapped handles (#1747) 2020-04-10 20:10:34 -07:00
Pavel Feldman
75571e8eb8
feat(downloads): support downloads on cr and wk (#1632) 2020-04-02 17:56:14 -07:00
Pavel Feldman
e241c1bef8
chore: remove web mode (#1625) 2020-04-01 14:42:47 -07:00
Joel Einbinder
a853690c16
fix(types): don't export derived types (#1598)
I was playing around today with different ways of changing the way we export types for #1439. I looked at only exporting 'Parameter' types, only exporting 'Return' types, only exporting a manual list of 'important' types. They all had different pros and cons, and it was very difficult to settle on a good answer.

For now, let's not export any parameter/return types. We can whitelist some types upon user request. I'm thinking `LaunchOptions` and `AccessibilitySnapshot` could be quite useful. We can always add new types after 1.0, but we can't remove them.

The patch looks funny because this was my original intent for the types, but I didn't know I had to `export {}` to tell typescript that my .d.ts shouldn't export everything.
2020-03-31 16:19:20 -07:00
Joel Einbinder
92c5ab3b7e
fix(types): correctly infer type in $eval and $$eval (#1603) 2020-03-31 13:22:38 -07:00
Joel Einbinder
08aebc72fa
fix(types): add types for waitForEvent (#1601) 2020-03-31 09:17:54 -07:00
Dmitry Gozman
16c7a5bd5c
api(eval): accept zero or one arguments in all evaluation functions (#1431) 2020-03-20 15:08:17 -07:00
Joel Einbinder
825555cddf
types: better types (#1166)
This generates typescript definitions based on the api.md, instead of autogenerating them from the typescript source code.

Now types
 - only include the public api
 - work with older versions of typescript
 - include descriptions
 - are more consistent
 - are more complete

#6
2020-03-20 01:30:35 -07:00