Commit Graph

258 Commits

Author SHA1 Message Date
Dmitry Gozman
307a0b6ea7
fix(dotnet): codegen/docs use Name instead of NameString (#19156) 2022-11-29 20:56:18 -08:00
Dmitry Gozman
43a6bf4d45
fix(inspector): support custom test id attribute (#18996)
Fixes #18959.
2022-11-29 11:43:47 -08:00
Dmitry Gozman
4f72a895e9
fix(inspector): render expect.not correctly (#19125)
Also fixes the same in expect logs.

References #19083.
2022-11-28 20:50:16 -08:00
Pavel Feldman
85467d1b7d
chore: generate get by title (#19119) 2022-11-28 19:55:34 -08:00
Yury Semikhatsky
d3f41eaa47
fix(fetch): cookie with domain=localhost (#18998)
Fixes https://github.com/microsoft/playwright/issues/18362
2022-11-23 09:22:49 -08:00
Dmitry Gozman
190ed9465f
fix(chromium): detach from shared workers (#18976)
This prevents shared workers from stalling upon restart.

We receive `Inspector.targetCrashed` and
`Inspector.targetReloadedAfterCrash` events that assume
`Runtime.runIfWaitingForDebugger` from any attached client. It is easier
and more stable to just detach from shared workers, because we do not
inspect them.

For service workers, we should actually issue
`Runtime.runIfWaitingForDebugger` in such cases, because we attach to
them.

Fixes #18932.
2022-11-22 15:20:42 -08:00
Pavel Feldman
a0ea9b5fba
chore: simplify slowmo implementation (#18990) 2022-11-22 11:06:45 -08:00
Pavel Feldman
228f78c89d
chore: render browser window in trace (#18870) 2022-11-22 08:41:52 -08:00
Dmitry Gozman
941090f0c4
fix(click): account for transformed iframes (#18926)
- Properly convert coordinates for iframes with non-zero borders.
- IFrames that have `transform` anywhere in the ancestors skip
`hitPoint`-based check because we cannot reliably translate the viewport
point into frame document's coordinates.

Fixes #18245.
2022-11-18 16:51:39 -08:00
Dmitry Gozman
f5b4e499fb
fix(locators): frameLocator().nth serialized correctly (#18819)
Fixes #18798.
2022-11-15 10:50:46 -08:00
Pavel Feldman
98513c3737
test: fix video channel tests (#18807) 2022-11-14 22:20:00 -08:00
Pavel Feldman
59418aa6f3
chore: ignore untrusted clicks when recording (#18796)
Fixes https://github.com/microsoft/playwright/issues/18776
2022-11-14 15:16:25 -08:00
Dmitry Gozman
a7b2b04588
fix(getByRole): name and exact (#18719)
Following the `getByText()` and other methods:

- By default, matching is substring and case-insensitive. Before, it was
only case-insensitive, but not substring.
- With new option `exact: true`, matching is full string and
case-sensitive.
- Matching always normalizes whitespace.
- Codegen generates `exact: false` by default.
- `internal:role` treats `[name="foo"i]` as non-exact match.

Various fixes:
- Updated `getByRole` docs to match the reality.
- Locator generator edge cases.
2022-11-11 15:58:36 -08:00
Andrey Lushnikov
f3a99fdd69
chore: address API review comments for the snapshotPathTemplate (#18716)
This patch:
- updates documentation to lead users from `TestConfig.snapshotDir` and
  `testInfo.snapshotSuffix` to `TestConfig.snapshotPathTemplate` as a
  better and more flexible alternative.
- drops `{snapshotSuffix}` from documentation
- stops using `snapshotSuffix = ''` in our own tests and switches us
  to the `snapshotPathTemplate`.
- adds `{testName}` token.
2022-11-10 17:23:57 -08:00
Max Schmitt
56d7d47d43
fix(codegen): make select work with size attribute (#18712)
Fixes https://github.com/microsoft/playwright/issues/18711
2022-11-10 15:06:53 -08:00
Dmitry Gozman
7c80b77c57
feat(clear): remove clear() methods from all classes except Locator (#18703)
The preferred way is to use the locator, so we should not encourage the
use of `ElementHandle` or `Page` in the new APIs.
2022-11-10 12:29:14 -08:00
Pavel Feldman
ca2e7ef199
chore: report paused signal to the debug controller clients (#18701) 2022-11-10 12:15:29 -08:00
Pavel Feldman
c25e67a0e7
chore: conditionally dispatch network events (#18687) 2022-11-09 21:10:57 -08:00
Dmitry Gozman
cafa558845
fix(codegen): update priorites in selector generator (#18688)
- prefer `role=checkbox` over `input[type=checkbox]`
- prefer `#id` over `input[type=checkbox]` and `role=checkbox`
- prefer `text=foo` over `internal:has-text=foo`
- ignore `none` and `presentation` roles
- remove non-strict support
2022-11-09 17:22:13 -08:00
Dmitry Gozman
a7f1c8cb65
fix(codegen): fix csharp options syntax (#18662) 2022-11-08 21:48:01 -08:00
Dmitry Gozman
ef1b68a998
feat(locators): support frame locators in asLocator (#18653)
Drive-by: change `true` to `True` in python.

References #18524.
2022-11-08 17:08:08 -08:00
Pavel Feldman
0355d8618f
chore: use provided value for the generated test id (#18631) 2022-11-08 12:04:43 -08:00
Dmitry Gozman
05b623e6b0
feat(locators): asLocator supports internal:has= (#18625)
The following snippet:
```js
rowLocator
    .filter({ hasText: 'John' })
    .filter({ has: page.getByRole('button', { name: 'Say hello' }) })

```

is shown in the logs:

```log
pw:api waiting for getByRole('listitem').filter({ hasText: 'John' }).filter({ has: getByRole('button', { name: 'Say hello' }) })
```
2022-11-08 08:47:02 -08:00
Dmitry Gozman
28d3f48a65
test: gardening (#18623)
- Separate worker for some Android tests.
- Use png comparator for some screenshots tests instead of buffer
equality.
- Skip drag&drop tests on Android.
- Various timeout fixes.
2022-11-07 15:35:21 -08:00
Dmitry Gozman
6a65a43e9a
chore: use consistent asLocator() in all logs (#18586)
References #18524.
2022-11-04 15:19:16 -07:00
Pavel Feldman
3bc9e07daf
chore: parse locators strictly (#18553) 2022-11-03 15:17:08 -07:00
Pavel Feldman
17c8554255
chore(recorder): explore using codemirror (#18529) 2022-11-03 09:55:23 -07:00
Dmitry Gozman
20f2e0049c
test: unflake codegen tests waiting for highlight (#18518)
Clear existing highlights to avoid resolving with the old highlight
value.
2022-11-02 17:00:33 -07:00
Pavel Feldman
67c9624924
chore: send structured codegen info to the debug controller (#18491) 2022-11-01 18:02:14 -07:00
Pavel Feldman
2183d9e9a2
chore: use codemirror for editor (#18482) 2022-11-01 15:04:30 -07:00
Pavel Feldman
2c3fa1b1ff
chore: add explore locator parser (#18429) 2022-10-31 12:55:35 -07:00
Dmitry Gozman
e725293586
test: print stdout/stderr in signals.spec (#18456) 2022-10-31 12:45:18 -07:00
Pavel Feldman
3e112193a6
test: fix debug controller tests on firefox (#18361) 2022-10-27 09:19:55 -07:00
Yury Semikhatsky
12fdd3336e
test: navigator.storage.getDirectory() across browsers (#18305) 2022-10-26 15:41:36 -07:00
Jean-François Greffier
0fe1998c72
feat(api): add clear() (#18296)
Add `clear()` method as a convenience shortcut for `fill('')`.
Implemented for AndroidDevice, ElementHandle, Frame, Locator and Page.

Fixes https://github.com/microsoft/playwright/issues/14041
2022-10-25 12:56:11 -07:00
Pavel Feldman
37250cde17
chore: switch to the new debug controller harness (#18308) 2022-10-25 09:55:20 -07:00
Pavel Feldman
d819f97f40
test: clean up connect options set for debug controller (#18317) 2022-10-25 09:03:04 -07:00
Pavel Feldman
d8ec7cba47
chore: don't generate new lines in codegen (#18309) 2022-10-25 09:02:06 -07:00
Pavel Feldman
d3948d1308
chore: enable debug controller testing (#18270) 2022-10-24 16:19:58 -07:00
Pavel Feldman
3f850d27e9
fix(highlight): fix the testing harness to be real (#18294) 2022-10-24 15:01:48 -07:00
Max Schmitt
be67189a54
fix(fetch): throw on unexpected end of file brotli requests (#18223)
https://github.com/microsoft/playwright/issues/18190
2022-10-24 12:51:45 -07:00
Dmitry Gozman
48c44f2c78
fix(selectors): hasText and getByText exact match should consider full text (#18260)
Fixes #18259.
2022-10-21 16:29:45 -07:00
Dmitry Gozman
5ed552838e
test: skip "should not include buffers in the trace" on non-default mode (#18215) 2022-10-20 10:19:42 -07:00
Pavel Feldman
84daeafb3a
chore: use internal locator for role (#18187) 2022-10-19 19:38:47 -07:00
Yury Semikhatsky
69092b153a
chore(codegen): do not generate waitForURL (#18167)
Fixes https://github.com/microsoft/playwright/issues/17179
2022-10-19 11:26:19 -07:00
Pavel Feldman
1b541c9932
chore: render typed locators in the trace viewer (#18166) 2022-10-18 19:23:40 -07:00
Pavel Feldman
739b64a09a
chore: render typed locators in the recorder (#18162) 2022-10-18 16:39:58 -07:00
Pavel Feldman
304a4ee8ec
chore: migrate to the internal:text selector (#18135) 2022-10-18 13:09:54 -07:00
Dmitry Gozman
6d363888f2
fix(tracing): do not serialize buffers into the trace file (#18132)
Fixes #18126.
2022-10-17 16:17:25 -07:00
Yury Semikhatsky
7219a68b12
fix: exception in exposeFunction when oopif detaches (#18078)
The test is racy but it was reliably failing several times in 100
iterations.

Fixes https://github.com/microsoft/playwright/issues/18067
2022-10-14 08:37:42 -07:00