-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: improve dotnet getting started #30594
Conversation
@@ -29,7 +29,7 @@ playwright codegen demo.playwright.dev/todomvc | |||
``` | |||
|
|||
```bash csharp | |||
pwsh bin/Debug/netX/playwright.ps1 codegen demo.playwright.dev/todomvc | |||
pwsh bin/Debug/net8.0/playwright.ps1 codegen demo.playwright.dev/todomvc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd not touch this, since either we should change it everywhere or leave it as it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should change it everywhere as it makes for a much better learning journey rather than having to manually modify it for each command, codegen, trace viewer etc
dotnet only changes version once per year so when we recommend version 9 we make a change and thats it
@@ -173,19 +172,19 @@ public class UnitTest1 : PageTest | |||
public async Task TestCleanup() | |||
{ | |||
// This will produce e.g.: | |||
// bin/Debug/net8.0/playwright-traces/PlaywrightTests.UnitTest1.zip | |||
// bin/Debug/net8.0/playwright-traces/PlaywrightTests.ExampleTest.GetStartedLink.zip | |||
await Context.Tracing.StopAsync(new() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets adjust this snippet (MSTest and NUnit) or add it in a commented variant, so that users know how to implemented "retain-on-failure".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the comment as it is mentioned below.
Need guidelines on how to add retain on failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also follow-up with that.
Playwright provides an async function called [Expect](./test-assertions) to assert and wait until the expected condition is met. | ||
|
||
```csharp | ||
await Expect(Page).ToHaveTitleAsync(new Regex("Playwright")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like ToHaveTitleAsync
is the most useless one, lets give users an example which uses a locator, e.g. ToHaveTextAsync
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is, but it aligns with JS and Python so if we change it we should change it everywhere. should we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should, lets follow-up with that.
Co-authored-by: Max Schmitt <[email protected]> Signed-off-by: Debbie O'Brien <[email protected]>
full re-write of dotnet guide