docs(dotnet): suggest using pwsh (#10844)
This commit is contained in:
parent
1d50db809d
commit
8cc862c614
|
|
@ -98,7 +98,7 @@ playwright install --help
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash csharp
|
```bash csharp
|
||||||
bin\Debug\netX\playwright.ps1 install --help
|
pwsh bin\Debug\netX\playwright.ps1 install --help
|
||||||
```
|
```
|
||||||
|
|
||||||
## Generate code
|
## Generate code
|
||||||
|
|
@ -116,7 +116,7 @@ playwright codegen wikipedia.org
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash csharp
|
```bash csharp
|
||||||
bin\Debug\netX\playwright.ps1 codegen wikipedia.org
|
pwsh bin\Debug\netX\playwright.ps1 codegen wikipedia.org
|
||||||
```
|
```
|
||||||
|
|
||||||
Run `codegen` and perform actions in the browser. Playwright CLI will generate JavaScript code for the user interactions. `codegen` will attempt to generate resilient text-based selectors.
|
Run `codegen` and perform actions in the browser. Playwright CLI will generate JavaScript code for the user interactions. `codegen` will attempt to generate resilient text-based selectors.
|
||||||
|
|
@ -146,7 +146,7 @@ playwright codegen --save-storage=auth.json
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash csharp
|
```bash csharp
|
||||||
bin\Debug\netX\playwright.ps1 codegen --save-storage=auth.json
|
pwsh bin\Debug\netX\playwright.ps1 codegen --save-storage=auth.json
|
||||||
# Perform authentication and exit.
|
# Perform authentication and exit.
|
||||||
# auth.json will contain the storage state.
|
# auth.json will contain the storage state.
|
||||||
```
|
```
|
||||||
|
|
@ -173,7 +173,7 @@ playwright codegen --load-storage=auth.json my.web.app
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash csharp
|
```bash csharp
|
||||||
bin\Debug\netX\playwright.ps1 open --load-storage=auth.json my.web.app
|
pwsh bin\Debug\netX\playwright.ps1 open --load-storage=auth.json my.web.app
|
||||||
playwright codegen --load-storage=auth.json my.web.app
|
playwright codegen --load-storage=auth.json my.web.app
|
||||||
# Perform actions in authenticated state.
|
# Perform actions in authenticated state.
|
||||||
```
|
```
|
||||||
|
|
@ -581,5 +581,5 @@ playwright install-deps chromium
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash csharp
|
```bash csharp
|
||||||
bin\Debug\netX\playwright.ps1 install-deps chromium
|
pwsh bin\Debug\netX\playwright.ps1 install-deps chromium
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ dotnet add package Microsoft.Playwright
|
||||||
# Build the project
|
# Build the project
|
||||||
dotnet build
|
dotnet build
|
||||||
# Install required browsers
|
# Install required browsers
|
||||||
bin\Debug\netX\playwright.ps1 install
|
pwsh bin\Debug\netX\playwright.ps1 install
|
||||||
```
|
```
|
||||||
|
|
||||||
Create a `Program.cs` that will navigate to `https://playwright.dev/dotnet` and take a screenshot in Chromium.
|
Create a `Program.cs` that will navigate to `https://playwright.dev/dotnet` and take a screenshot in Chromium.
|
||||||
|
|
@ -76,7 +76,7 @@ dotnet add package Microsoft.Playwright.NUnit
|
||||||
# Build the project
|
# Build the project
|
||||||
dotnet build
|
dotnet build
|
||||||
# Install required browsers
|
# Install required browsers
|
||||||
bin\Debug\netX\playwright.ps1 install
|
pwsh bin\Debug\netX\playwright.ps1 install
|
||||||
```
|
```
|
||||||
|
|
||||||
Edit UnitTest1.cs file.
|
Edit UnitTest1.cs file.
|
||||||
|
|
@ -116,7 +116,7 @@ dotnet test -- NUnit.NumberOfTestWorkers=5
|
||||||
[Command line tools](./cli.md) can be used to record user interactions and generate C# code.
|
[Command line tools](./cli.md) can be used to record user interactions and generate C# code.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bin\Debug\netX\playwright.ps1 codegen
|
pwsh bin\Debug\netX\playwright.ps1 codegen
|
||||||
```
|
```
|
||||||
|
|
||||||
## System requirements
|
## System requirements
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue