Expectations Class
The entry point of the web-first assertions, as Assertions.Expect in Playwright. Import it with using static Meziantou.AspNetCore.Testing.Expectations;, then write await Expect(page.GetByRole("status")).ToHaveTextAsync("Saved");.
public static class ExpectationsMethods
| Name | Description |
|---|---|
| Expect(Locator) | Gets the assertions of a locator. |
| Expect(TestPage) | Gets the assertions of a page. |
Expect overloads
Expect(Locator)
Expectations.csGets the assertions of a locator.
public static LocatorAssertions Expect(Locator locator)Expect(TestPage)
Expectations.csGets the assertions of a page.
public static PageAssertions Expect(TestPage page)