1573 Commits

Author SHA1 Message Date
Dmitry Gozman
894abbfe28
feat(selectors): has-text pseudo-class (#5120)
This pseudo-class matches approximately when
`element.textContent.includes(textToSearchFor)`.
2021-01-25 14:19:07 -08:00
Dmitry Gozman
d78d337e29
feat(fill): make fill work when targeting elements inside the label (#5143) 2021-01-25 13:40:19 -08:00
Dmitry Gozman
beed9a79a3
feat(chromium): bump to 845618 (#5138) 2021-01-25 07:45:21 -08:00
Pavel Feldman
464fdc1800
chore: make recorder a supplement (#5131) 2021-01-24 19:21:19 -08:00
Pavel Feldman
be9bef513e
chore: move recorder to server side (#5128) 2021-01-24 08:44:11 -08:00
Joel Einbinder
3e4e511d84
feat(pause): page._pause to wait for user to click resume (#5050) 2021-01-22 18:47:02 -08:00
Andrey Lushnikov
74816e4000
fix(installer): release lock if things go south (#5125)
References #5110
2021-01-23 04:27:33 +03:00
Dmitry Gozman
3e1c72ac5f
fix(reload): do not throw when reload is racing with navigation (#5113)
When `page.reload()` is racing against the renderer-initiated
navigation, we might end up with `waitForNavigation()` being rejected
before the reload implementation is able to catch it.

To avoid that, carefully use Promise.all and await `waitForNavigation`
from the get go.

Same happens to `page.goForward()` and `page.goBack()`.
2021-01-22 15:58:53 -08:00
Yury Semikhatsky
a4eb121399
fix: add parameter to close/crash/disconnected etc events (#5098) 2021-01-22 09:58:31 -08:00
Dmitry Gozman
a9b75365eb
feat(logs): add wrapApiCall for logging to many api methods (#5093)
Some methods (quite a few!) were missing the wrapper that produces the log.
2021-01-22 06:49:59 -08:00
Pavel Feldman
13cc0c51e2
chore: throttle thumbnail workers, remove video processing (#5097) 2021-01-21 19:00:32 -08:00
Dmitry Gozman
7a4b94e66c
feat(selectors): nth-match selector (#5081)
Introduces :nth-match(ul > li, 3) css extension, with one-based index.
2021-01-21 16:39:49 -08:00
Pavel Feldman
c757ba72a9
chore: add storybook dep (#5082) 2021-01-21 08:29:01 -08:00
Pavel Feldman
4b5c876bbf
chore: allow opening empty trace viewer (#5080) 2021-01-20 19:16:23 -08:00
Dmitry Gozman
16249ccbda
feat(trace): account for more action types in timeline (#5077) 2021-01-20 16:19:01 -08:00
Dmitry Gozman
263f164238
feat(trace viewer): improve source tab (#5038)
- Show stack trace and allow to select one.
- Fix an issue when the page is closed before action end and we lack an id.
- Fix timeline time labels.
2021-01-19 14:45:26 -08:00
Yury Semikhatsky
d00c5cfd64
feat(webkit): bump to 1423 (#5057) 2021-01-19 14:02:41 -08:00
Yury Semikhatsky
615954b285
fix(dom): make selectOption wait for options (#5036) 2021-01-19 11:27:05 -08:00
Dmitry Gozman
0586c2554f feat(text selector): normalize whitespace for quoted match (#5049)
This changes quoted text selector like `text="Foo Bar"` to perform
normalized whitespace match.

Most of the time users want to match some string visible on the page,
and that always means normalized whitespace.

We keep the case sensitivity and full-string vs substring difference
between quoted and unquoted matches.
2021-01-19 09:30:34 -08:00
Dmitry Gozman
0a7b917ee3
feat(chromium): bump to 844399 (#5044) 2021-01-17 17:28:06 -08:00
Dmitry Gozman
17e953c2d8
chore: make generate_types not depend on the source (#5040)
The only dependency is a list of devices that we
can turn into a js file.
2021-01-17 12:09:20 -08:00
Dmitry Gozman
afaec552dd
feat(trace): show dialogs, navigations and misc events (#5025) 2021-01-15 18:30:55 -08:00
Dmitry Gozman
b45905ae3f
feat(trace viewer): small improvements (#5007)
- Show logs.
- Show errors.
- Highlight actions.
2021-01-14 20:16:02 -08:00
Andrey Lushnikov
61b0dbb3ef
devops: start downloading firefox arm builds on Apple Silicon. (#5019) 2021-01-15 01:55:17 +03:00
Andrey Lushnikov
ff20b9d107
devops: support frequent minor releases of MacOS BigSur. (#5016)
Pre-BigSur, MacOS updates were labeled as "minor" releases, so we had
to bake separate builds for different 10.X releases.

In BigSur era, it doesn't seem to be the case, so for now we can re-use
our BigSur builds across all BigSur versions (11.0, 11.1 and 11.2).

If we ever need to have a custom build for some bigsur minor version,
e.g. `11.6`, we'll have a new browser platform along with generic
`mac11` platform.

Fixes #4775.
2021-01-14 22:45:09 +03:00
Dmitry Gozman
0a999bf0a6
fix(driver): remove path trickery from install command (#5008) 2021-01-13 19:21:30 -08:00
Dmitry Gozman
e3ebba5573
chore: cleanup code that is not used by cli anymore (#5005) 2021-01-13 17:02:53 -08:00
Dmitry Gozman
5c3f483659
fix(cli): do not extend injected script on same-document navigations (#5002)
Otherwise, the injected script has to be ready for reentrancy.
2021-01-13 14:25:42 -08:00
Pavel Feldman
9a9ac60d21
fix: fix the cli tests, generate snake python (#5003) 2021-01-13 12:52:03 -08:00
Joel Einbinder
decf373c81
fix(electron): return a ChromiumBrowserContext for electron (#4913) 2021-01-13 12:08:14 -08:00
Yury Semikhatsky
29c34325c9
fix(cookies): make filtering by url work with subdomains (#4989) 2021-01-12 15:56:29 -08:00
Dmitry Gozman
d62b661cfa
docs: rename proximity selectors to position selectors (#4975) 2021-01-11 18:25:41 -08:00
Pavel Feldman
cb6e4a6657
chore: update snippets in python docs (#4976) 2021-01-11 17:04:24 -08:00
Dmitry Gozman
725191967b
fix(connect): provide an error message when ws endpoint is incorrect (#4978) 2021-01-11 15:53:45 -08:00
Yury Semikhatsky
728846b377
fix(launcher): add vcruntime140_1.dll to the list of known deps (#4973) 2021-01-11 15:01:29 -08:00
Dominik Deren
bf64fedd88
fix(trace viewer): updating default traceStorageDir value (#4962)
fix(trace viewer): updating default traceStorageDir value

When `npx playwright show-trace <tracePath>` command is executed, without providing the `resources` optional parameter, the function expected the `traceStorageDir` default value to be the same directory as in which the tracePath resides. This change updates it to the `dirname(tracePath)/trace-resources` if it exists. Such a directory hirerachy is the default that is created when running the tracer in Playwright.
2021-01-11 13:36:35 -08:00
Dominik Deren
e990a805a8
fix: restore network request title in trace viewer. (#4957) 2021-01-09 13:03:58 -08:00
Dmitry Gozman
5a2cfdbd47
api: add isChecked method (#4953)
This adds `{Page,Frame}.isChecked(selector)` and `ElementHandle.isChecked()` methods.

Useful to do assertions in tests:
```js
await page.click('text="Add TODO"');
expect(await page.isChecked('.item-done')).toBe(false);
```
2021-01-08 17:36:17 -08:00
Pavel Feldman
b7e0b1b393
docs: annotate evaluate(pageFunction) js-specific (#4954) 2021-01-08 16:17:54 -08:00
Joel Einbinder
31d980fc92
chore(webpack): minify injected sources (#4946) 2021-01-08 16:15:05 -08:00
Dmitry Gozman
135e0344fc
feat(cli): small improvements (#4952)
- Allow specifying which browsers to install. This comes handy in playwright-cli.
- Print "npx playwright" as a tool name in help messages, instead of "cli".
2021-01-08 15:42:08 -08:00
Dmitry Gozman
f0a8729137
chore: remove unused selector engines (#4950)
css and id are superseeded by the new css engine.
2021-01-08 14:51:43 -08:00
Dmitry Gozman
3f904056ee
api: add isVisible, isHidden, isEnabled, isDisabled and isEditable (#4915)
These methods are useful for verification in tests, e.g.
```js
expect(await page.isEnabled(':text("Remove All")')).toBe(false);
await page.click(':text("Add Item")');
expect(await page.isVisible('.item:text("new item")')).toBe(true);
expect(await page.isEnabled(':text("Remove All")')).toBe(true);
```
2021-01-08 12:27:54 -08:00
Dmitry Gozman
d08cbc33a7
docs: brush up selector docs (#4939)
docs: brush up selector docs

- Remove duplication
- Move extensions block to ChromiumBrowser
- Remove accidental ":xpath" extension from css selectors
- Document :has and :is extensions
2021-01-08 10:59:24 -08:00
Dmitry Gozman
2e05feac25
feat(cli): bring in trace viewer (#4920) 2021-01-07 16:15:34 -08:00
Dmitry Gozman
eb9ea20511
feat(selectors): proximity selectors (#4923) 2021-01-07 14:12:59 -08:00
Yury Semikhatsky
0a2fe62cb7
fix(extensions): do not enable screencast for background pages (#4919) 2021-01-06 15:08:28 -08:00
Dmitry Gozman
f672033e11
chore: bundle small build of highlight.js (#4907)
This follows the "build from source" configuration (https://highlightjs.org/usage/#source)
and reduces the footprint from 2mb to 100kb.
2021-01-06 09:31:42 -08:00
Dmitry Gozman
d47fb6a780
feat(cli): build driver and upload to cdn (#4841) 2021-01-05 14:04:47 -08:00
Dmitry Gozman
5215add60d
chore: remove selectorsV2Enabled switch (#4880)
Selectors V2 seem to stick.
2021-01-04 15:32:31 -08:00