Commit graph

145 commits

Author SHA1 Message Date
Pavel Feldman 913821f675
chore: roll Electron to 12.2.1 (#9271) 2021-10-01 19:40:47 -07:00
Dmitry Gozman 080e372a4f
feat(inspector): use chrome/msedge when chromium is not available (#9269)
Drive-by: language-specific error message.
2021-10-01 17:06:00 -07:00
Yury Semikhatsky 235eaca34a
fix(fetch): use data, form and multipart for different post data (#9248) 2021-10-01 12:11:33 -07:00
Nick Partridge b126a5685b
feat: add path option to toMatchSnapshot (#9156) 2021-10-01 09:15:44 -07:00
Sidharth Vinod 3296c21a80
feat(cli): Support trace file URLs (#9030) 2021-10-01 07:08:41 -07:00
Dmitry Gozman 5633520f45
fix(selenium connect): register in gracefullyCloseAll for driver cleanup (#9218)
Otherwise, killing the driver does not cleanup sessions in the grid.
2021-09-29 14:54:24 -07:00
Dmitry Gozman 0a690778e4
fix(expect): beautiful expect stacks (#9204)
We now mark our wrapper as `__PWTRAP__[expect.toHaveText]` and
find it later in the stack trace.

Added trace/inspector tests to ensure this behavior in the future.
2021-09-28 16:02:34 -07:00
Max Schmitt cd22072685
chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
Pavel Feldman 241411ad42
chore: render expect in trace viewer (#9141) 2021-09-27 09:19:59 -07:00
Yury Semikhatsky 45b365d958
fix: increase recent logs buffer (#9143) 2021-09-24 17:28:06 -07:00
Dmitry Gozman 2afe76d86d
feat(launch): connect to process.env.SELENIUM_REMOTE_URL instead of local launch (#9056) 2021-09-22 21:13:32 -07:00
Joel Einbinder c673ef5330
chore(registry): refactor logic of what browsers to download to top level (#9078) 2021-09-22 11:43:13 -07:00
Dmitry Gozman 5200134749
chore: improve http request utilities (#9031) 2021-09-20 13:50:26 -07:00
Yury Semikhatsky cc15227327
fix: do not dedup header values (#8998) 2021-09-17 17:19:13 -07:00
Pavel Feldman 63ff405e6e
fix(inspector): stop on all snapshottable actions (#8990) 2021-09-17 15:24:15 -07:00
Yury Semikhatsky 806a71a4f0
feat(fetch): support form data and json encodings (#8975) 2021-09-16 17:48:43 -07:00
Andrey Lushnikov 4f762ba90a
feat: introduce experimental general-purpose grid (#8941)
This patch adds a general-purpose grid framework to parallelize
Playwright across multiple agents.

This patch adds two CLI commands to manage grid:

- `npx playwright experimental-grid-server` - to launch grid
- `npx playwrigth experimental-grid-agent` - to launch agent in a host
  environment.

Grid server accepts an `--agent-factory` argument. A simple
`factory.js` might look like this:

```js
const child_process = require('child_process');

module.exports = {
  name: 'My Simple Factory',
  capacity: Infinity, // How many workers launch per agent
  timeout: 10_000, // 10 seconds timeout to create agent
  launch: ({agentId, gridURL, playwrightVersion}) => child_process.spawn(`npx`, [
    'playwright'
    'experimental-grid-agent',
    '--grid-url', gridURL,
    '--agent-id', agentId,
  ], {
    cwd: __dirname,
    shell: true,
    stdio: 'inherit',
  }),
};
```

With this `factory.js`, grid server could be launched like this:

```bash
npx playwright experimental-grid-server --factory=./factory.js
```

Once launched, it could be used with Playwright Test using env variable:

```bash
PW_GRID=http://localhost:3000 npx playwright test
```
2021-09-16 01:20:36 -07:00
Pavel Feldman 14bc663742
chrome: don't nest pw:api steps (#8932) 2021-09-15 11:34:23 -07:00
Joel Einbinder 70a3aab486
fix(httpServer): speed up closing by destroying active sockets (#8919) 2021-09-15 11:40:54 -04:00
Max Schmitt 6a3d2b9fb9
fix(install-deps): make it work without sudo (#8914) 2021-09-14 14:09:37 +02:00
Yury Semikhatsky f8c0f0d637
feat(fetch): support query params (#8893) 2021-09-13 14:29:44 -07:00
Andrey Lushnikov 32ea4f542b
fix: a human-readable error when lock cannot be acquired (#8768)
Fixes #8709
2021-09-08 06:03:16 -07:00
Max Schmitt e40b805782
feat(test-runner): support baseURL in toHaveURL (#8743) 2021-09-07 18:34:02 +02:00
Pavel Feldman 0d5b41ce7b
feat(headers): add Headers.headers that would mimic the behavior of the deprecated getters (#8665) 2021-09-02 20:48:23 -07:00
Pavel Feldman 42e44f888b
feat(rawheaders): introduce initial plumbing (#8638) 2021-09-01 18:28:20 -07:00
Pavel Feldman 1c169289b2
chore: move async utils into a separate file (#8595) 2021-08-31 14:44:08 -07:00
Maximilian Hils 4d26fb9ccb
chore: use a regular import for browsers.json (#8579)
Fixes #8512
2021-08-31 07:50:17 -07:00
Pavel Feldman e47bacdecb
fix(cookies): read response headers off extra info event, if any (#8526) 2021-08-30 09:58:44 -07:00
Pavel Feldman dd31f3bd43
chore: introduce manual promise helper (#8533) 2021-08-29 11:21:06 -07:00
Pavel Feldman 4ed976f2e9
chore: remove isContextDestroyedError heuristic (#8456) 2021-08-26 18:44:49 -07:00
Dmitry Gozman e726c18788
chore: use 'mime' for various mimeType-extension mappings (#8426) 2021-08-25 11:18:35 -07:00
Joel Einbinder fc991fe897
chore(typescript): turn on noImplicitOverride (#7810) 2021-08-25 10:11:18 -04:00
Dmitry Gozman b0a7843247
chore: migrate tracing ResourceSnapshot to follow har entry format (#8391)
This will ease the migration of tracing to har.
2021-08-24 13:17:58 -07:00
Max Schmitt c4eb2d4b1e
chore: move sdkLanguage over to the protocol init call (#8329) 2021-08-20 21:32:21 +02:00
Pavel Feldman 44887c237d
chore: reimplement socks to be readable (#8315) 2021-08-19 15:16:46 -07:00
Andrey Lushnikov d9206ebefc
chore: pretend world is win64 (#8306)
It looks like we have a very small share of users on 32-bit windows.
This is a tiny change that stops Playwright from using 32-bit windows
binaries.

References #8045
2021-08-19 06:09:04 -07:00
Dmitry Gozman 246495f705
fix(tracing): improve captureStackTrace (#8236)
- Simplify by only considering client/ vs non-client/
- Fix stack traces when calling from other playwright code, e.g. from the cli
- Account for re-entrant calls that happen when
  instrumenting context creation/desctruction
- Add tests
- Fix StackTraceView on Windows
2021-08-16 17:06:38 -07:00
Pavel Feldman 40fb9d85e0
feat(test-result): render image diff (#8061) 2021-08-07 15:47:03 -07:00
Max Schmitt 3e491114f2
test: fix some failing locators tests (#7989) 2021-08-04 23:36:27 +02:00
Max Schmitt 4e8e75beb1
chore: ensure assertions result in a message (#7981) 2021-08-04 08:26:07 -07:00
Thomas Chaplin 9d7a0ec2d9
fix(dependencies): add missing package libxshmfence1 to ubuntu:20.04 (#7796) 2021-07-26 10:50:51 +02:00
Max Schmitt 449c8a77dd
chore: disable source-map reference in JS for production builds (#7622) 2021-07-22 20:29:36 +02:00
Andrey Lushnikov b2c5bfb72c
chore: nicer message to install dependencies (#7715)
If we know how to install all dependencies, then we should recommend
a Playwright CLI one-liner to install dependencies.

References #7682
2021-07-19 03:54:42 -07:00
Andrey Lushnikov 3c6b058e2b
chore: nicer message to ask for browser installation (#7691)
References #7682
2021-07-16 17:00:27 -07:00
Andrey Lushnikov 865aff8c9d
feat: support msedge-dev installation (#7679)
Fixes #7677
2021-07-16 09:56:51 -07:00
Joel Einbinder 7e95ee07ae
fix(utils): fix the list dependnecies script (#7649) 2021-07-15 10:27:16 -07:00
Pavel Feldman 67f5fb6a4f
fix(webkit): add libevdev dep (#7630) 2021-07-14 20:20:03 -07:00
Dmitry Gozman 0742cb9076
chore: move working with browser channels to Registry Executables (#7581) 2021-07-13 19:03:49 -07:00
Dmitry Gozman 57c5e4d8cf
chore: replace Registry api with Executable list (#7544) 2021-07-13 15:57:40 -07:00
Dmitry Gozman 65606c093a
chore: simplify Registry api (#7451) 2021-07-09 16:10:23 -07:00