Commit graph

2508 commits

Author SHA1 Message Date
Dmitry Gozman 39285c4667
docs: update extensions doc for new headless (#33753) 2024-11-25 01:13:20 -08:00
Max Schmitt 9d92b0d3ec
docs(dotnet): add docs for xUnit (#33742) 2024-11-25 10:09:35 +01:00
Max Schmitt e0e4da8ead
docs(cli): fix docs rendering (#33751) 2024-11-24 14:50:12 +01:00
Pavel Feldman 971b5da741
chore: introduce update-source-method (#33738) 2024-11-22 18:30:35 -08:00
Pavel Feldman 66d9f3acbe
chore: introduce update-snapshots=changed (#33735) 2024-11-22 17:41:31 -08:00
Dmitry Gozman f123f7ac69
fix: isEditable/toBeEditable throw for elements that cannot be editable/readonly (#33713) 2024-11-22 03:40:43 -08:00
Max Schmitt b7e47dc0bd
docs(test-runners): restructure .NET test-runners doc (#33727) 2024-11-22 12:35:14 +01:00
Pavel Feldman 605df0be8f
chore: add more info about snapshot testing (#33721) 2024-11-21 16:11:01 -08:00
Max Schmitt 92436518ff
docs(python): add LocatorAssertions.NotToMatchAriaSnapshot (#33712) 2024-11-21 15:53:37 +01:00
Max Schmitt 77d82b8b07
chore: remove dead code in urlMatches (#33714) 2024-11-21 15:53:28 +01:00
Dmitry Gozman d3ffdefd50
docs: release notes for languages v1.49 (#33706) 2024-11-21 05:45:00 -08:00
Simon Knott 81e28a8854
docs(aria): add demo video (#33668) 2024-11-20 15:36:51 +01:00
Simon Knott bfd64ac11b
docs: add video for 1.49 (#33693) 2024-11-20 15:36:38 +01:00
Dmitry Gozman 94776ad18a
docs: note that permissions list may change (#33690) 2024-11-20 06:08:34 -08:00
Josh Kelley 1afb56ee1b
docs: add docs for 1.49.0's new "chromium" option (#33680) 2024-11-20 01:19:39 -08:00
Simon Knott ae10d56836
docs(fixtures): add rules of thumb for fixture usage (#33472) 2024-11-20 09:06:54 +01:00
aairiian 7f054ef8c6
feat(aria): extend toHaveAccessibleName() to accept an array of expected accessible names (#33277) 2024-11-18 07:46:47 -08:00
Jean-François Greffier 508021362d
fix minor typos in "Getting Started" (#33613) 2024-11-15 14:45:54 -08:00
Amaechi Hope e61cea597a
docs(dotnet): fix assertion snippets (#33622) 2024-11-15 15:02:40 +01:00
Yury Semikhatsky f5477d9051
docs: add ariaSnapshot.timeout for language ports (#33614) 2024-11-14 12:23:42 -08:00
Dmitry Gozman 80ce205d81
docs: update docs about headless shell (#33604) 2024-11-14 05:38:16 -08:00
Simon Knott dc93c8a05b
chore(release): alternative headless mode release notes (#33578)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2024-11-14 08:40:51 +01:00
Yury Semikhatsky 5203c780ae
feat: step timeout option (#33560) 2024-11-13 11:17:54 -08:00
Max Schmitt 382d98760c
chore: update WebKit version to 18.2 (#33570) 2024-11-13 12:33:45 +01:00
Max Schmitt e535b3aa5f
docs(best-practises): add note about saving browser downloads (#33568) 2024-11-13 12:11:12 +01:00
Dmitry Gozman 88082b417a
chore: release notes for v1.49 js (#33565) 2024-11-13 03:04:43 -08:00
Dmitry Gozman f54d3f44c2
chore: download and launch chromium-headless-shell for headless chromium (#33454) 2024-11-13 02:52:28 -08:00
Yury Semikhatsky e3ed9fa7c3
chore: drop support for solid component testing (#33523) 2024-11-11 10:26:50 -08:00
Yury Semikhatsky 9c6c58f8ce
docs: note about screenshot environment (#33501) 2024-11-08 08:33:04 -08:00
Dmitry Gozman d561ba7b86
fix(chromium-headless-shell): fallback to chromium when running headed (#33490) 2024-11-08 07:04:41 -08:00
Dmitry Gozman 67e8defbe9
docs: update tracing.group docs (#33487) 2024-11-07 03:57:18 -08:00
Pavel Feldman a655b0bfb3
chrome: aria api review (#33458) 2024-11-05 15:23:38 -08:00
Max Schmitt c96245dde7
docs(aria-snapshot): fix markdown rendering / langs (#33453) 2024-11-05 15:04:26 +01:00
Dmitry Gozman 9b2ca93a50
chore: followup to tracing.group (#33450) 2024-11-05 04:45:54 -08:00
René fa10bcd5a3
feat(tracing) Adding groups to trace via pw-api (#33081)
Signed-off-by: René <snooz@posteo.de>
Signed-off-by: René <41592183+Snooz82@users.noreply.github.com>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-11-05 03:45:37 -08:00
Pavel Feldman 58b1f322ab
docs: iterate over aria docs (2) (#33440) 2024-11-04 19:24:54 -08:00
Pavel Feldman ec8161cb0a
docs: iterate over aria docs (#33439) 2024-11-04 17:52:53 -08:00
Pavel Feldman 8b49d568de
docs: start adding the aria snapshot documentation (#33407) 2024-11-04 10:53:46 -08:00
Simon Knott cb0171e571
chore(expect): clarify message() for custom matchers (#33321) 2024-11-04 16:58:20 +01:00
Max Schmitt 3b4b8f9e49
docs(python): add snippet for new_context fixture (#33392) 2024-11-01 17:50:34 +01:00
Max Schmitt 33593c5f06
docs(browsers): add note for Python about channels in launch() (#33396) 2024-11-01 17:45:07 +01:00
Denis LE 7a1739792f
docs(best-practices): improve wording (#33342) 2024-10-29 16:27:14 +01:00
Simon Knott 0221f15f4f
chore(control-or-meta): mention in docs (#33338) 2024-10-29 10:07:59 +01:00
Max Schmitt 9eb4fe5546
feat(pwt): serialize and expose Error.cause from Worker process (#32833) 2024-10-29 00:01:59 +01:00
Yury Semikhatsky 0ace47e7cf
chore: revert exposed expect error details on TestError (#33310) 2024-10-25 16:20:18 -07:00
Yury Semikhatsky 87b896e597
chore: remove playwright-ct-vue2 (#33302) 2024-10-25 13:31:55 -07:00
DetachHead 7e00112fec
docs(python): improve the typing example with the pytest plugin (#33296) 2024-10-25 15:27:14 +02:00
Dmitry Gozman 2e01154bb5
feat: screenshot:on-first-failure (#33266) 2024-10-24 04:41:35 -07:00
Max Schmitt 131f8b39c3
docs(vscode): outline more that global teardown needs to be executed manually (#33221) 2024-10-22 14:25:23 +02:00
Max Schmitt 0351fd9401
docs: use WebSocketFrame abstraction for Java & .NET (#33211) 2024-10-21 21:21:30 +02:00
Yury Semikhatsky aebceb345e
chore: expose expect error details on TestError (#33183) 2024-10-21 11:15:55 -07:00
Max Schmitt 36d3a6764e
docs: set minimal Ubuntu version to 22 and Debian to 12 (#33207) 2024-10-21 18:41:27 +02:00
Max Schmitt e866e3306e
devops: stop publishing Ubuntu 20.04 (#33203) 2024-10-21 17:00:10 +02:00
Simon Knott 0d63df4875
feat(test runner): allow multiple global setups (#32955)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-10-18 11:03:00 +02:00
Amaechi Hope 7af9e93304
docs(api): fix code snippets for locator ele (#33153) 2024-10-17 09:11:53 +02:00
Debbie O'Brien 9848ebec5a
docs: add video to release notes (#33147) 2024-10-16 18:36:46 +02:00
Pengoose d10a5e5693
feat(testType): add support for test.fail.only method (#33001) 2024-10-16 06:47:23 -07:00
Pavel Feldman 94321fef1c
chore: implement locator.ariaSnapshot (#33125) 2024-10-15 18:47:26 -07:00
Pavel Feldman b421bd8b0d
chore: add a basic snapshot generator test (#33123) 2024-10-15 15:21:45 -07:00
Anand M Cherian d40425ea58
docs: update to "Matching one of the two alternative locators" section (#33079)
Signed-off-by: Anand M Cherian <63868951+Anand-M-Cherian@users.noreply.github.com>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-10-15 12:45:03 -07:00
Dmitry Gozman 8a275e5a5b
docs: improve docs for WebSocketRoute (#33097) 2024-10-15 02:07:03 -07:00
Pavel Feldman a38ff6e0d8
chore: experimental toMatchAriaSnapshot (#33014) 2024-10-14 14:07:19 -07:00
Max Schmitt 9fcf60464d
chore: various v1.48.0 roll fixes for .NET (#33096) 2024-10-14 16:32:11 +02:00
Dmitry Gozman 25dd9b5cd4
feat: config.build.tsconfig (#33026)
Allows to specify `tsconfig` in the configuration file, which applies to
test files but not the config file itself.

Fixes #32808.
2024-10-10 01:37:46 -07:00
Dmitry Gozman c2cbf26497
docs: refresh timeouts doc (#33025)
After changes a few releases ago, specify that `afterEach` hooks are
included in a separate timeout.

Fixes #32851.
2024-10-09 05:10:10 -07:00
Pavel Feldman dbe881cfdc
docs: add a section on balancing shards (#33011)
Closes https://github.com/microsoft/playwright/issues/32922
2024-10-08 08:35:02 -07:00
Yury Semikhatsky 4fe33db392
docs(route): header override propagation (#32971)
Fix https://github.com/microsoft/playwright/issues/32939
2024-10-07 13:52:55 -07:00
Simon Knott d3fbf1aaeb
fix(clock): amend setSystemTime docs (#32901)
As discussed yesterday over
https://github.com/microsoft/playwright/issues/32807. Adds some words to
differentiate `setSystemTime` from `setFixedTime`.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-10-07 12:12:12 +02:00
Bruno 317ddd4117
docs(best practices): tabs with yarn and pnpm commands added (#32980) 2024-10-07 10:48:30 +02:00
Simon Knott 40670e6ffd
fix(emulate media): document "no-preference" as deprecated (#32881)
Closes https://github.com/microsoft/playwright/issues/32862.

`prefers-color-scheme: no-preference` was removed from browsers. This PR
marks it as deprecated in our docs and removes all mentions.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-10-04 16:49:32 +02:00
Simon Knott 80ff7c396a
chore(docs): fix code highlighting (#32927)
Closes https://github.com/microsoft/playwright/issues/32921

This is the diff when rolling to `playwright.dev` locally:
<img width="1262" alt="Screenshot 2024-10-02 at 14 54 42"
src="https://github.com/user-attachments/assets/aade7ad4-420c-48c4-a2c9-03fe815a3959">

---------

Signed-off-by: Simon Knott <info@simonknott.de>
2024-10-04 16:38:13 +02:00
Simon Knott 6be97f34dd
docs(test-reporters): replace reporter showcase with list of interesting OSS implementations (#32896)
As discussed yesterday, this PR replaces the "reporter showcase" with a
list of interesting implementations for folks who are writing their own
custom reporters.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
2024-10-04 16:29:13 +02:00
Max Schmitt 895be9f8de
chore: lint java docs snippets (#32945) 2024-10-04 11:34:04 +02:00
Max Schmitt 6373fe703d
docs: fix Java/.NET types for docs rolling (#32924) 2024-10-02 13:27:56 +02:00
Max Schmitt 67c37cf813
docs(ci): recommend noble instead of jammy (#32923) 2024-10-02 13:12:11 +02:00
Viet Nguyen Duc dbf7976dd8
docs(selenium): update docker image tag in feat Playwright connect Selenium Grid (#32777) 2024-10-02 11:34:05 +02:00
Simon Knott 6ccaad3a1b
chore: call out that that the vscode extension is for Node.js (#32882)
In https://github.com/microsoft/playwright/issues/32861, an interested
.NET user wanted to try Playwright and found the VS Code Getting Started
guide. It didn't work for them because the VS Code Extension is for
usage with Node.js, and they don't have NPM installed. We can reduce
confusion by mentioning that VS Code Getting started is for Node.js.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
2024-10-02 11:19:51 +02:00
Simon Knott 4bcfa56a13
chore(test runner): mention different timeout (#32883)
In https://github.com/microsoft/playwright/issues/32872, a user notes
that we document `.focus()` to not timeout by default, but in practice
when used without the test runner, it defaults to a 30s timeout.

I've discussed this with Dima, and he noted that our JS documentation
focuses on usage with the Playwright test runner, not with the library.
The test runner disables timeouts for operations in favour of timeouts
for test cases. In the library, we default to a 30s timeouts. This PR
adds this to the "key differences" table.
2024-10-01 11:46:42 +02:00
Dmitry Gozman 6bc5c9ca84
docs: release notes for 1.48 (#32857) 2024-09-27 11:06:11 -07:00
Dmitry Gozman a395fb22c4
feat(routeWebSocket): address api review feedback (#32850) 2024-09-27 04:01:31 -07:00
Yury Semikhatsky e8d08e8d1e
docs: more prominent note on tags being read-only (#32836)
Reference https://github.com/microsoft/playwright/issues/32828
2024-09-26 09:41:38 -07:00
Dmitry Gozman d07f6cfc5c
docs: check that description has an empty line before it (#32830) 2024-09-26 06:31:42 -07:00
Max Schmitt 3b86a9c0e4
docs(markdown): parse :::note's text as children (#32510) 2024-09-26 15:16:26 +02:00
Dmitry Gozman a9d5c39d40
chore: address api review for page.forceGarbageCollection (#32824)
- Renamed to `page.requestGC`.
- Added a useful snippet to the docs.

References #32278.

---------

Signed-off-by: Dmitry Gozman <dgozman@gmail.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-09-26 05:08:33 -07:00
Dmitry Gozman e5433d0576
chore(docs): validate params/options links (#32820)
Also supports fully-qualified links like this:
```
[`option: BrowserType.launch.headless`]
```

References https://github.com/microsoft/playwright/issues/32590.
2024-09-26 01:08:16 -07:00
Max Schmitt b01dd55697
docs: use node-version: lts/* in GHA examples (#32789) 2024-09-24 12:23:47 +02:00
Max Schmitt 26dc8955d3
docs: explain glob patterns (#32728) 2024-09-23 22:22:57 +02:00
Mathias Leppich 281eff1209
docs(trial): note that modifier keys are pressed regardless of trial option (#32734) 2024-09-23 22:17:47 +02:00
Dmitry Gozman cdcaa7fab6
feat: routeWebSocket (#32675)
This introduces `WebSocketRoute` class and
`page/context.routeWebSocket()` methods.
2024-09-20 03:20:06 -07:00
Pavel Feldman 2f4acbb001
chore: use contentFrame() as a canonical locator representation (#32697) 2024-09-18 20:15:01 -07:00
Max Schmitt 523ec83cad
chore: move Location type from testReporter.d.ts to test.d.ts (#32687) 2024-09-18 16:57:11 +02:00
오소현 8761dafc73
feat(test runner): allow to pass arbitrary location to test.step (#32504)
Fixes https://github.com/microsoft/playwright/issues/30160

### Description:
This pull request introduces the ability to specify custom locations for
test steps in Playwright. By enabling the provision of arbitrary
locations to the test.step method, it resolves the limitation where
helper methods obfuscate the original call site, providing more accurate
and meaningful location data in test reports.

### Motivation:
To enhance the utility and clarity of test reports in Playwright.
Specifically, it addresses the need to trace test steps back to their
precise location in the code, which is especially important when steps
are abstracted in helper functions. This feature is crucial for
maintaining accurate documentation and facilitating debugging processes.

### Changes:
Added functionality to pass a custom location object to test.step.

### Expected Outcome:
This PR is expected to significantly improve the precision and
usefulness of diagnostic data in test reports by allowing specific
locations within helper functions to be accurately documented. It
facilitates better tracking of test executions and simplifies the
debugging process, making it easier for developers to understand and
address issues within complex tests.

### References:
Closes https://github.com/microsoft/playwright/issues/30160 -
"[Feature]: allow to pass arbitrary location to test.step"

**Code Check**
I conducted tests on this new feature by integrating it into some
existing test codes, and it worked well. I will attach the code used for
testing and a screenshot showing the successful outcome.

<details>
<summary>toggle dropdown</summary>
<div markdown="1">

```
import type { Location } from '../../../packages/playwright/types/testReporter'
...
test('should respect the back button', async ({ page }) => {
    await page.locator('.todo-list li .toggle').nth(1).check();
    await checkNumberOfCompletedTodosInLocalStorage(page, 1);
...
    await test.step('Showing active items', async () => {
      await page.getByRole('link', { name: 'Active' }).click();
    }, {location});
```

<img width="1109" alt="image"
src="https://github.com/user-attachments/assets/359feafa-0949-4c71-9426-46debef21bdd">
</div>
</details>
2024-09-17 08:11:21 -07:00
Simon Knott f6219e6e79
Revert "feat(tracing): add .pwtrace to trace file extension" (#32648)
Reverts microsoft/playwright#32581
Relates
https://github.com/microsoft/playwright/issues/32226#issuecomment-2351164727
2024-09-17 15:32:30 +02:00
Ana Margarida Silva b23edf5137
fix(docs): remove todo in ci intro docs (#32643) 2024-09-17 10:36:43 +02:00
Max Schmitt 21d162c945
feat(client-certificates): add support for proxies (#32611)
Fixes https://github.com/microsoft/playwright/issues/32370
2024-09-16 17:57:33 +02:00
Max Schmitt b335b00a86
docs: add reference to locator strictness if or resolves to multiple elements (#32633) 2024-09-16 17:30:14 +02:00
Max Schmitt c24ad36f86
docs(docker): fix Docker container permissions (#32621) 2024-09-16 07:39:36 +02:00
Simon Knott aeb4d182f7
feat(tracing): add .pwtrace to trace file extension (#32581)
Closes https://github.com/microsoft/playwright/issues/32226

I've updated every mention of `.trace.zip` except for the release notes.
2024-09-14 10:17:07 +02:00
Matthew Jee f2a974b045
feat(api): add method to force garbage collection (#32383) 2024-09-13 23:09:36 +02:00
Simon Knott 48c7fb6b06
feat(library): accept FormData in fetch (#32602)
Closes https://github.com/microsoft/playwright/issues/26520 by accepting
`FormData`, which became stable in Node.js in v21.
2024-09-13 13:21:02 +02:00