diff --git a/dotnet/versioned_docs/version-stable/actionability.mdx b/dotnet/versioned_docs/version-stable/actionability.mdx index 207a338572395..0f97ce27c1841 100644 --- a/dotnet/versioned_docs/version-stable/actionability.mdx +++ b/dotnet/versioned_docs/version-stable/actionability.mdx @@ -109,6 +109,7 @@ For example, consider a scenario where Playwright will click `Sign Up` button re [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" [APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /test-assertions.mdx "APIResponseAssertions" [Browser]: /api/class-browser.mdx "Browser" [BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" [BrowserType]: /api/class-browsertype.mdx "BrowserType" diff --git a/dotnet/versioned_docs/version-stable/api-testing.mdx b/dotnet/versioned_docs/version-stable/api-testing.mdx index d44d6eea0106d..906608ebf2bfa 100644 --- a/dotnet/versioned_docs/version-stable/api-testing.mdx +++ b/dotnet/versioned_docs/version-stable/api-testing.mdx @@ -98,6 +98,7 @@ using NUnit.Framework; namespace PlaywrightTests { + [TestFixture] public class TestGitHubAPI : PlaywrightTest { static string REPO = "test-repo-2"; @@ -223,6 +224,7 @@ using NUnit.Framework; namespace PlaywrightTests { + [TestFixture] public class TestGitHubAPI : PlaywrightTest { static string REPO = "test-repo-2"; @@ -410,6 +412,7 @@ var context = await Browser.NewContextAsync(new() { StorageState = state }); [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" [APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /test-assertions.mdx "APIResponseAssertions" [Browser]: /api/class-browser.mdx "Browser" [BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" [BrowserType]: /api/class-browsertype.mdx "BrowserType" diff --git a/dotnet/versioned_docs/version-stable/api/class-accessibility.mdx b/dotnet/versioned_docs/version-stable/api/class-accessibility.mdx index 3e73bb11a8e8e..af19f786eb14e 100644 --- a/dotnet/versioned_docs/version-stable/api/class-accessibility.mdx +++ b/dotnet/versioned_docs/version-stable/api/class-accessibility.mdx @@ -54,6 +54,7 @@ Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(accessibilitySnapsho [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" [APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /test-assertions.mdx "APIResponseAssertions" [Browser]: /api/class-browser.mdx "Browser" [BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" [BrowserType]: /api/class-browsertype.mdx "BrowserType" diff --git a/dotnet/versioned_docs/version-stable/api/class-apirequest.mdx b/dotnet/versioned_docs/version-stable/api/class-apirequest.mdx index 94dfebaff7af4..88eec6cc3a1b3 100644 --- a/dotnet/versioned_docs/version-stable/api/class-apirequest.mdx +++ b/dotnet/versioned_docs/version-stable/api/class-apirequest.mdx @@ -41,6 +41,7 @@ Creates new instances of [APIRequestContext]. [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" [APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /test-assertions.mdx "APIResponseAssertions" [Browser]: /api/class-browser.mdx "Browser" [BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" [BrowserType]: /api/class-browsertype.mdx "BrowserType" diff --git a/dotnet/versioned_docs/version-stable/api/class-apirequestcontext.mdx b/dotnet/versioned_docs/version-stable/api/class-apirequestcontext.mdx index 0c52f206310a1..ddc3ea116cc1e 100644 --- a/dotnet/versioned_docs/version-stable/api/class-apirequestcontext.mdx +++ b/dotnet/versioned_docs/version-stable/api/class-apirequestcontext.mdx @@ -48,6 +48,7 @@ Creates a new [FormData] instance which is used for providing form and multipart An instance of [FormData] can be created via [ApiRequestContext.CreateFormData](/api/class-apirequestcontext.mdx#api-request-context-create-form-data). - `Headers`# - `IgnoreHTTPSErrors`# + - `MaxRedirects`# - `Multipart`# An instance of [FormData] can be created via [ApiRequestContext.CreateFormData](/api/class-apirequestcontext.mdx#api-request-context-create-form-data). @@ -78,6 +79,7 @@ All responses returned by [ApiRequestContext.GetAsync(url, options)](/api/class- An instance of [FormData] can be created via [ApiRequestContext.CreateFormData](/api/class-apirequestcontext.mdx#api-request-context-create-form-data). - `Headers`# - `IgnoreHTTPSErrors`# + - `MaxRedirects`# - `Method`# - `Multipart`# @@ -97,6 +99,7 @@ Sends HTTP(S) request and returns its response. The method will populate request - `FailOnStatusCode`# - `Headers`# - `IgnoreHTTPSErrors`# + - `MaxRedirects`# - `Params`# - `Timeout`# - returns:# @@ -112,6 +115,7 @@ Sends HTTP(S) [GET](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GE - `FailOnStatusCode`# - `Headers`# - `IgnoreHTTPSErrors`# + - `MaxRedirects`# - `Params`# - `Timeout`# - returns:# @@ -131,6 +135,7 @@ Sends HTTP(S) [HEAD](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/H An instance of [FormData] can be created via [ApiRequestContext.CreateFormData](/api/class-apirequestcontext.mdx#api-request-context-create-form-data). - `Headers`# - `IgnoreHTTPSErrors`# + - `MaxRedirects`# - `Multipart`# An instance of [FormData] can be created via [ApiRequestContext.CreateFormData](/api/class-apirequestcontext.mdx#api-request-context-create-form-data). @@ -153,6 +158,7 @@ Sends HTTP(S) [PATCH](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/ An instance of [FormData] can be created via [ApiRequestContext.CreateFormData](/api/class-apirequestcontext.mdx#api-request-context-create-form-data). - `Headers`# - `IgnoreHTTPSErrors`# + - `MaxRedirects`# - `Multipart`# An instance of [FormData] can be created via [ApiRequestContext.CreateFormData](/api/class-apirequestcontext.mdx#api-request-context-create-form-data). @@ -175,6 +181,7 @@ Sends HTTP(S) [POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/P An instance of [FormData] can be created via [ApiRequestContext.CreateFormData](/api/class-apirequestcontext.mdx#api-request-context-create-form-data). - `Headers`# - `IgnoreHTTPSErrors`# + - `MaxRedirects`# - `Multipart`# An instance of [FormData] can be created via [ApiRequestContext.CreateFormData](/api/class-apirequestcontext.mdx#api-request-context-create-form-data). @@ -198,6 +205,7 @@ Returns storage state for this request context, contains current cookies and loc [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" [APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /test-assertions.mdx "APIResponseAssertions" [Browser]: /api/class-browser.mdx "Browser" [BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" [BrowserType]: /api/class-browsertype.mdx "BrowserType" diff --git a/dotnet/versioned_docs/version-stable/api/class-apiresponse.mdx b/dotnet/versioned_docs/version-stable/api/class-apiresponse.mdx index 620a4731e9c9a..c39820668ad7f 100644 --- a/dotnet/versioned_docs/version-stable/api/class-apiresponse.mdx +++ b/dotnet/versioned_docs/version-stable/api/class-apiresponse.mdx @@ -107,6 +107,7 @@ Contains the URL of the response. [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" [APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /test-assertions.mdx "APIResponseAssertions" [Browser]: /api/class-browser.mdx "Browser" [BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" [BrowserType]: /api/class-browsertype.mdx "BrowserType" diff --git a/dotnet/versioned_docs/version-stable/api/class-browser.mdx b/dotnet/versioned_docs/version-stable/api/class-browser.mdx index 02ec8b9cf2b7a..45e9a3006d184 100644 --- a/dotnet/versioned_docs/version-stable/api/class-browser.mdx +++ b/dotnet/versioned_docs/version-stable/api/class-browser.mdx @@ -103,11 +103,6 @@ Indicates that the browser is connected. - `DeviceScaleFactor`# - `ExtraHTTPHeaders`# - `ForcedColors`# - - :::note - It's not supported in WebKit, see [here](https://bugs.webkit.org/show_bug.cgi?id=225281) in their issue tracker. - ::: - - `Geolocation`# - `Latitude` <[double]> Latitude between -90 and 90. - `Longitude` <[double]> Longitude between -180 and 180. @@ -195,11 +190,6 @@ await browser.CloseAsync(); - `DeviceScaleFactor`# - `ExtraHTTPHeaders`# - `ForcedColors`# - - :::note - It's not supported in WebKit, see [here](https://bugs.webkit.org/show_bug.cgi?id=225281) in their issue tracker. - ::: - - `Geolocation`# - `Latitude` <[double]> Latitude between -90 and 90. - `Longitude` <[double]> Longitude between -180 and 180. @@ -268,6 +258,7 @@ Returns the browser version. [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" [APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /test-assertions.mdx "APIResponseAssertions" [Browser]: /api/class-browser.mdx "Browser" [BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" [BrowserType]: /api/class-browsertype.mdx "BrowserType" diff --git a/dotnet/versioned_docs/version-stable/api/class-browsercontext.mdx b/dotnet/versioned_docs/version-stable/api/class-browsercontext.mdx index 88abdb3b2cbe6..1e1d842626d4a 100644 --- a/dotnet/versioned_docs/version-stable/api/class-browsercontext.mdx +++ b/dotnet/versioned_docs/version-stable/api/class-browsercontext.mdx @@ -34,6 +34,7 @@ await context.CloseAsync(); - [event BrowserContext.Response](/api/class-browsercontext.mdx#browser-context-event-response) - [BrowserContext.AddCookiesAsync(cookies)](/api/class-browsercontext.mdx#browser-context-add-cookies) - [BrowserContext.AddInitScriptAsync(script)](/api/class-browsercontext.mdx#browser-context-add-init-script) +- [BrowserContext.APIRequest](/api/class-browsercontext.mdx#browser-context-request) - [BrowserContext.Browser](/api/class-browsercontext.mdx#browser-context-browser) - [BrowserContext.ClearCookiesAsync()](/api/class-browsercontext.mdx#browser-context-clear-cookies) - [BrowserContext.ClearPermissionsAsync()](/api/class-browsercontext.mdx#browser-context-clear-permissions) @@ -53,10 +54,9 @@ await context.CloseAsync(); - [BrowserContext.SetGeolocationAsync(geolocation)](/api/class-browsercontext.mdx#browser-context-set-geolocation) - [BrowserContext.SetOfflineAsync(offline)](/api/class-browsercontext.mdx#browser-context-set-offline) - [BrowserContext.StorageStateAsync(options)](/api/class-browsercontext.mdx#browser-context-storage-state) +- [BrowserContext.Tracing](/api/class-browsercontext.mdx#browser-context-tracing) - [BrowserContext.UnrouteAsync(url, handler)](/api/class-browsercontext.mdx#browser-context-unroute) - [BrowserContext.WaitForPageAsync(action, options)](/api/class-browsercontext.mdx#browser-context-wait-for-page) -- [BrowserContext.APIRequest](/api/class-browsercontext.mdx#browser-context-request) -- [BrowserContext.Tracing](/api/class-browsercontext.mdx#browser-context-tracing) ## event BrowserContext.Close {#browser-context-event-close} @@ -602,6 +602,7 @@ API testing helper associated with this context. Requests made with this API wil [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" [APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /test-assertions.mdx "APIResponseAssertions" [Browser]: /api/class-browser.mdx "Browser" [BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" [BrowserType]: /api/class-browsertype.mdx "BrowserType" diff --git a/dotnet/versioned_docs/version-stable/api/class-browsertype.mdx b/dotnet/versioned_docs/version-stable/api/class-browsertype.mdx index d7919010b9be6..9b2bc3c37adfd 100644 --- a/dotnet/versioned_docs/version-stable/api/class-browsertype.mdx +++ b/dotnet/versioned_docs/version-stable/api/class-browsertype.mdx @@ -66,6 +66,12 @@ The default browser context is accessible via [Browser.Contexts](/api/class-brow Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers. ::: +```csharp +var browser = await playwright.Chromium.ConnectOverCDPAsync("http://localhost:9222"); +var defaultContext = browser.Contexts[0]; +var page = defaultContext.Pages[0]; +``` + ## BrowserType.ExecutablePath {#browser-type-executable-path} Added in: v1.8 @@ -142,11 +148,6 @@ var browser = await playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions - `ExecutablePath`# - `ExtraHTTPHeaders`# - `ForcedColors`# - - :::note - It's not supported in WebKit, see [here](https://bugs.webkit.org/show_bug.cgi?id=225281) in their issue tracker. - ::: - - `Geolocation`# - `Latitude` <[double]> Latitude between -90 and 90. - `Longitude` <[double]> Longitude between -180 and 180. @@ -215,6 +216,7 @@ Returns browser name. For example: `'chromium'`, `'webkit'` or `'firefox'`. [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" [APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /test-assertions.mdx "APIResponseAssertions" [Browser]: /api/class-browser.mdx "Browser" [BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" [BrowserType]: /api/class-browsertype.mdx "BrowserType" diff --git a/dotnet/versioned_docs/version-stable/api/class-consolemessage.mdx b/dotnet/versioned_docs/version-stable/api/class-consolemessage.mdx index 17b6b0fc2abf6..4ca123d7ef3af 100644 --- a/dotnet/versioned_docs/version-stable/api/class-consolemessage.mdx +++ b/dotnet/versioned_docs/version-stable/api/class-consolemessage.mdx @@ -69,6 +69,7 @@ One of the following values: `'log'`, `'debug'`, `'info'`, `'error'`, `'warning' [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" [APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /test-assertions.mdx "APIResponseAssertions" [Browser]: /api/class-browser.mdx "Browser" [BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" [BrowserType]: /api/class-browsertype.mdx "BrowserType" diff --git a/dotnet/versioned_docs/version-stable/api/class-dialog.mdx b/dotnet/versioned_docs/version-stable/api/class-dialog.mdx index 65f2cfb9875f3..a28e60b18e8a0 100644 --- a/dotnet/versioned_docs/version-stable/api/class-dialog.mdx +++ b/dotnet/versioned_docs/version-stable/api/class-dialog.mdx @@ -88,6 +88,7 @@ Returns dialog's type, can be one of `alert`, `beforeunload`, `confirm` or `prom [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" [APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /test-assertions.mdx "APIResponseAssertions" [Browser]: /api/class-browser.mdx "Browser" [BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" [BrowserType]: /api/class-browsertype.mdx "BrowserType" diff --git a/dotnet/versioned_docs/version-stable/api/class-download.mdx b/dotnet/versioned_docs/version-stable/api/class-download.mdx index 3bafa11cf8e29..dcee387d77801 100644 --- a/dotnet/versioned_docs/version-stable/api/class-download.mdx +++ b/dotnet/versioned_docs/version-stable/api/class-download.mdx @@ -109,6 +109,7 @@ Returns downloaded url. [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" [APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /test-assertions.mdx "APIResponseAssertions" [Browser]: /api/class-browser.mdx "Browser" [BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" [BrowserType]: /api/class-browsertype.mdx "BrowserType" diff --git a/dotnet/versioned_docs/version-stable/api/class-elementhandle.mdx b/dotnet/versioned_docs/version-stable/api/class-elementhandle.mdx index 8aa896f1c9021..8f15ae2dd2e89 100644 --- a/dotnet/versioned_docs/version-stable/api/class-elementhandle.mdx +++ b/dotnet/versioned_docs/version-stable/api/class-elementhandle.mdx @@ -660,7 +660,7 @@ To press a special key, like `Control` or `ArrowDown`, use [ElementHandle.PressA ```csharp await elementHandle.TypeAsync("Hello"); // Types instantly -await elementHandle.TypeAsync("World", delay: 100); // Types slower, like a user +await elementHandle.TypeAsync("World", new() { Delay = 100 }); // Types slower, like a user ``` An example of typing into a text field and then submitting the form: @@ -729,7 +729,7 @@ If the element does not satisfy the condition for the `timeout` milliseconds, th * `'detached'` - wait for element to not be present in DOM. * `'visible'` - wait for element to have non-empty bounding box and no `visibility:hidden`. Note that element without any content or with `display:none` has an empty bounding box and is not considered visible. * `'hidden'` - wait for element to be either detached from DOM, or have an empty bounding box or `visibility:hidden`. This is opposite to the `'visible'` option. - - `Strict`# + - `Strict`# - `Timeout`# - returns:# @@ -753,6 +753,7 @@ This method does not work across navigations, use [Page.WaitForSelectorAsync(sel [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" [APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /test-assertions.mdx "APIResponseAssertions" [Browser]: /api/class-browser.mdx "Browser" [BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" [BrowserType]: /api/class-browsertype.mdx "BrowserType" diff --git a/dotnet/versioned_docs/version-stable/api/class-filechooser.mdx b/dotnet/versioned_docs/version-stable/api/class-filechooser.mdx index b396d53758f79..99507f93634d0 100644 --- a/dotnet/versioned_docs/version-stable/api/class-filechooser.mdx +++ b/dotnet/versioned_docs/version-stable/api/class-filechooser.mdx @@ -64,6 +64,7 @@ Sets the value of the file input this chooser is associated with. If some of the [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" [APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /test-assertions.mdx "APIResponseAssertions" [Browser]: /api/class-browser.mdx "Browser" [BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" [BrowserType]: /api/class-browsertype.mdx "BrowserType" diff --git a/dotnet/versioned_docs/version-stable/api/class-formdata.mdx b/dotnet/versioned_docs/version-stable/api/class-formdata.mdx index 23f45998385fc..2d075b0c2462b 100644 --- a/dotnet/versioned_docs/version-stable/api/class-formdata.mdx +++ b/dotnet/versioned_docs/version-stable/api/class-formdata.mdx @@ -27,6 +27,7 @@ Sets a field on the form. File values can be passed either as `Path` or as `File [APIRequest]: /api/class-apirequest.mdx "APIRequest" [APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext" [APIResponse]: /api/class-apiresponse.mdx "APIResponse" +[APIResponseAssertions]: /test-assertions.mdx "APIResponseAssertions" [Browser]: /api/class-browser.mdx "Browser" [BrowserContext]: /api/class-browsercontext.mdx "BrowserContext" [BrowserType]: /api/class-browsertype.mdx "BrowserType" diff --git a/dotnet/versioned_docs/version-stable/api/class-frame.mdx b/dotnet/versioned_docs/version-stable/api/class-frame.mdx index 604dde485629d..bdcf27de85dc9 100644 --- a/dotnet/versioned_docs/version-stable/api/class-frame.mdx +++ b/dotnet/versioned_docs/version-stable/api/class-frame.mdx @@ -136,7 +136,7 @@ Adds a `` tag into the page with the desired url or a `