You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/ci-intro.md
+42-6Lines changed: 42 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -148,7 +148,7 @@ jobs:
148
148
steps:
149
149
- uses: actions/checkout@v4
150
150
- name: Setup dotnet
151
-
uses: actions/setup-dotnet@v3
151
+
uses: actions/setup-dotnet@v4
152
152
with:
153
153
dotnet-version: 8.0.x
154
154
- run: dotnet build
@@ -266,7 +266,7 @@ jobs:
266
266
steps:
267
267
- uses: actions/checkout@v4
268
268
- name: Setup dotnet
269
-
uses: actions/setup-dotnet@v3
269
+
uses: actions/setup-dotnet@v4
270
270
with:
271
271
dotnet-version: 8.0.x
272
272
- run: dotnet build
@@ -370,7 +370,7 @@ jobs:
370
370
steps:
371
371
- uses: actions/checkout@v4
372
372
- name: Setup dotnet
373
-
uses: actions/setup-dotnet@v3
373
+
uses: actions/setup-dotnet@v4
374
374
with:
375
375
dotnet-version: 8.0.x
376
376
- run: dotnet build
@@ -388,23 +388,49 @@ jobs:
388
388
389
389
Once you have your [GitHub actions workflow](#setting-up-github-actions) setup then all you need to do is [Create a repo on GitHub](https://docs.github.com/en/get-started/quickstart/create-a-repo) or push your code to an existing repository. Follow the instructions on GitHub and don't forget to [initialize a git repository](https://github.com/git-guides/git-init) using the `git init` command so you can [add](https://github.com/git-guides/git-add), [commit](https://github.com/git-guides/git-commit) and [push](https://github.com/git-guides/git-push) your code.
390
390
391
+
######
392
+
* langs: js, java, python
393
+
391
394
<img width="861" alt="Create a Repo and Push to GitHub" src="https://user-images.githubusercontent.com/13063165/183423254-d2735278-a2ab-4d63-bb99-48d8e5e447bc.png"/>
392
395
396
+
397
+
######
398
+
* langs: csharp
399
+
400
+

401
+
393
402
## Opening the Workflows
394
403
395
404
Click on the **Actions** tab to see the workflows. Here you will see if your tests have passed or failed.
396
405
397
-
<img width="847" alt="Opening the Workflows" src="https://user-images.githubusercontent.com/13063165/183423584-2ea18038-cd49-4daa-a20c-2205352f0933.png"/>
406
+
######
407
+
* langs: js, python, java
408
+
409
+

410
+
411
+
######
412
+
* langs: csharp
413
+
414
+

398
415
399
416
On Pull Requests you can also click on the **Details** link in the [PR status check](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks).
400
417
401
418
<img width="645" alt="pr status checked" src="https://user-images.githubusercontent.com/13063165/183722462-17a985db-0e10-4205-b16c-8aaac36117b9.png" />
402
419
420
+
403
421
## Viewing Test Logs
404
422
405
423
Clicking on the workflow run will show you the all the actions that GitHub performed and clicking on **Run Playwright tests** will show the error messages, what was expected and what was received as well as the call log.
406
424
407
-
<img width="839" alt="Viewing Test Logs" src="https://user-images.githubusercontent.com/13063165/183423783-58bf2008-514e-4f96-9c12-c9a55703960c.png"/>
425
+
######
426
+
* langs: js, python, java
427
+
428
+

429
+
430
+
######
431
+
* langs: csharp
432
+
433
+

408
434
409
435
410
436
## HTML Report
@@ -441,12 +467,22 @@ Once you have served the report using `npx playwright show-report`, click on the
[trace.playwright.dev](https://trace.playwright.dev) is a statically hosted variant of the Trace Viewer. You can upload trace files using drag and drop.
You can upload Traces which get created on your CI like GitHub Actions as artifacts. This requires [starting and stopping the trace](./trace-viewer-intro#recording-a-trace). We recommend only recording traces for failing tests. Once your traces have been uploaded to CI, they can then be downloaded and opened using [trace.playwright.dev](https://trace.playwright.dev), which is a statically hosted variant of the Trace Viewer. You can upload trace files using drag and drop.
4. Install required browsers by replacing `netX` with the actual output folder name, e.g. `net8.0`:
72
+
1. Install required browsers. This example uses `net8.0`, if you are using a different version of .NET you will need to adjust the command and change `net8.0` to your version.
73
73
74
74
```bash
75
-
pwsh bin/Debug/netX/playwright.ps1 install
75
+
pwsh bin/Debug/net8.0/playwright.ps1 install
76
76
```
77
77
78
-
If `pwsh` is not available, you have to [install PowerShell](https://docs.microsoft.com/powershell/scripting/install/installing-powershell).
78
+
If `pwsh` is not available, you will have to [install PowerShell](https://docs.microsoft.com/powershell/scripting/install/installing-powershell).
@@ -170,33 +170,13 @@ public class UnitTest1 : PageTest
170
170
171
171
## Running the Example Tests
172
172
173
-
By default tests will be run on Chromium. This can be configured via the `BROWSER` environment variable, or by adjusting the [launch configuration options](./test-runners.md). Tests are run in headless mode meaning no browser will open up when running the tests. Results of the tests and test logs will be shown in the terminal.
174
-
175
-
<Tabs
176
-
groupId="test-runners"
177
-
defaultValue="nunit"
178
-
values={[
179
-
{label: 'NUnit', value: 'nunit'},
180
-
{label: 'MSTest', value: 'mstest'}
181
-
]
182
-
}>
183
-
<TabItemvalue="nunit">
184
-
185
-
```bash
186
-
dotnet test -- NUnit.NumberOfTestWorkers=5
187
-
```
188
-
189
-
</TabItem>
190
-
<TabItemvalue="mstest">
173
+
By default tests will be run on Chromium. This can be configured via the `BROWSER` environment variable, or by adjusting the [launch configuration options](./running-tests.md). Tests are run in headless mode meaning no browser will open up when running the tests. Results of the tests and test logs will be shown in the terminal.
191
174
192
175
```bash
193
-
dotnet test -- MSTest.Parallelize.Workers=5
176
+
dotnet test
194
177
```
195
178
196
-
</TabItem>
197
-
</Tabs>
198
-
199
-
See our doc on [Test Runners](./test-runners.md) to learn more about running tests in headed mode, running multiple tests, running specific configurations etc.
179
+
See our doc on [Running and Debugging Tests](./running-tests.md) to learn more about running tests in headed mode, running multiple tests, running specific configurations etc.
200
180
201
181
## System requirements
202
182
@@ -209,7 +189,7 @@ See our doc on [Test Runners](./test-runners.md) to learn more about running tes
209
189
210
190
-[Write tests using web first assertions, page fixtures and locators](./writing-tests.md)
211
191
-[Run single test, multiple tests, headed mode](./running-tests.md)
212
-
-[Learn more about the NUnit and MSTest base classes](./test-runners.md)
213
-
-[Generate tests with Codegen](./codegen.md)
192
+
-[Generate tests with Codegen](./codegen-intro.md)
214
193
-[See a trace of your tests](./trace-viewer-intro.md)
215
-
-[Using Playwright as library](./library.md)
194
+
-[Run tests on CI](./ci-intro.md)
195
+
-[Learn more about the NUnit and MSTest base classes](./test-runners.md)
- After executing the handler added with [`method: Page.addLocatorHandler`], Playwright will now wait until the overlay that triggered the handler is not visible anymore. You can opt-out of this behavior with the new `NoWaitAfter` option.
34
+
- You can use new `Times` option in [`method: Page.addLocatorHandler`] to specify maximum number of times the handler should be run.
35
+
- The handler in [`method: Page.addLocatorHandler`] now accepts the locator as argument.
36
+
- New [`method: Page.removeLocatorHandler`] method for removing previously added locator handlers.
37
+
38
+
```csharp
39
+
varlocator=Page.GetByText("This interstitial covers the button");
// Run your tests that can be interrupted by the overlay.
45
+
// ...
46
+
awaitPage.RemoveLocatorHandlerAsync(locator);
47
+
```
48
+
49
+
**Miscellaneous options**
50
+
51
+
- New method [`method: FormData.append`] allows to specify repeating fields with the same name in [`Multipart`](./api/class-apirequestcontext#api-request-context-fetch-option-multipart) option in `APIRequestContext.FetchAsync()`:
52
+
-```
53
+
```csharp
54
+
var formData = Context.APIRequest.CreateFormData();
55
+
formData.Append("file", new FilePayload()
56
+
{
57
+
Name = "f1.js",
58
+
MimeType = "text/javascript",
59
+
Buffer = System.Text.Encoding.UTF8.GetBytes("var x = 2024;")
0 commit comments