Skip to content

Commit

Permalink
feat(roll): roll to 1.26 Playwright (microsoft#783)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
playwrightmachine and github-actions[bot] authored Sep 20, 2022
1 parent acbc70d commit 8b960bd
Show file tree
Hide file tree
Showing 195 changed files with 3,475 additions and 2,197 deletions.
1 change: 1 addition & 0 deletions dotnet/versioned_docs/version-stable/actionability.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions dotnet/versioned_docs/version-stable/api-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ using NUnit.Framework;
namespace PlaywrightTests
{

[TestFixture]
public class TestGitHubAPI : PlaywrightTest
{
static string REPO = "test-repo-2";
Expand Down Expand Up @@ -223,6 +224,7 @@ using NUnit.Framework;
namespace PlaywrightTests
{

[TestFixture]
public class TestGitHubAPI : PlaywrightTest
{
static string REPO = "test-repo-2";
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 1 addition & 10 deletions dotnet/versioned_docs/version-stable/api/class-browser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ Indicates that the browser is connected.
- `DeviceScaleFactor`<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="browser-new-context-option-device-scale-factor"/> &#60;[double]?&#62; Specify device scale factor (can be thought of as dpr). Defaults to `1`.<a href="#browser-new-context-option-device-scale-factor" class="list-anchor">#</a>
- `ExtraHTTPHeaders`<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="browser-new-context-option-extra-http-headers"/> &#60;[IDictionary]?<[string], [string]>&#62; An object containing additional HTTP headers to be sent with every request.<a href="#browser-new-context-option-extra-http-headers" class="list-anchor">#</a>
- `ForcedColors`<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="browser-new-context-option-forced-colors"/> &#60;`enum ForcedColors { Active, None }?`&#62; Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See [Page.EmulateMediaAsync(options)](/api/class-page.mdx#page-emulate-media) for more details. Defaults to `'none'`.<a href="#browser-new-context-option-forced-colors" class="list-anchor">#</a>

:::note
It's not supported in WebKit, see [here](https://bugs.webkit.org/show_bug.cgi?id=225281) in their issue tracker.
:::

- `Geolocation`<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="browser-new-context-option-geolocation"/> &#60;Geolocation?&#62;<a href="#browser-new-context-option-geolocation" class="list-anchor">#</a>
- `Latitude` &#60;[double]&#62; Latitude between -90 and 90.
- `Longitude` &#60;[double]&#62; Longitude between -180 and 180.
Expand Down Expand Up @@ -195,11 +190,6 @@ await browser.CloseAsync();
- `DeviceScaleFactor`<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="browser-new-page-option-device-scale-factor"/> &#60;[double]?&#62; Specify device scale factor (can be thought of as dpr). Defaults to `1`.<a href="#browser-new-page-option-device-scale-factor" class="list-anchor">#</a>
- `ExtraHTTPHeaders`<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="browser-new-page-option-extra-http-headers"/> &#60;[IDictionary]?<[string], [string]>&#62; An object containing additional HTTP headers to be sent with every request.<a href="#browser-new-page-option-extra-http-headers" class="list-anchor">#</a>
- `ForcedColors`<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="browser-new-page-option-forced-colors"/> &#60;`enum ForcedColors { Active, None }?`&#62; Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See [Page.EmulateMediaAsync(options)](/api/class-page.mdx#page-emulate-media) for more details. Defaults to `'none'`.<a href="#browser-new-page-option-forced-colors" class="list-anchor">#</a>

:::note
It's not supported in WebKit, see [here](https://bugs.webkit.org/show_bug.cgi?id=225281) in their issue tracker.
:::

- `Geolocation`<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="browser-new-page-option-geolocation"/> &#60;Geolocation?&#62;<a href="#browser-new-page-option-geolocation" class="list-anchor">#</a>
- `Latitude` &#60;[double]&#62; Latitude between -90 and 90.
- `Longitude` &#60;[double]&#62; Longitude between -180 and 180.
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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}

Expand Down Expand Up @@ -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"
Expand Down
12 changes: 7 additions & 5 deletions dotnet/versioned_docs/version-stable/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font>
Expand Down Expand Up @@ -142,11 +148,6 @@ var browser = await playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions
- `ExecutablePath`<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-executable-path"/> &#60;[string]?&#62; Path to a browser executable to run instead of the bundled one. If `executablePath` is a relative path, then it is resolved relative to the current working directory. Note that Playwright only works with the bundled Chromium, Firefox or WebKit, use at your own risk.<a href="#browser-type-launch-persistent-context-option-executable-path" class="list-anchor">#</a>
- `ExtraHTTPHeaders`<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-extra-http-headers"/> &#60;[IDictionary]?<[string], [string]>&#62; An object containing additional HTTP headers to be sent with every request.<a href="#browser-type-launch-persistent-context-option-extra-http-headers" class="list-anchor">#</a>
- `ForcedColors`<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-forced-colors"/> &#60;`enum ForcedColors { Active, None }?`&#62; Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See [Page.EmulateMediaAsync(options)](/api/class-page.mdx#page-emulate-media) for more details. Defaults to `'none'`.<a href="#browser-type-launch-persistent-context-option-forced-colors" class="list-anchor">#</a>

:::note
It's not supported in WebKit, see [here](https://bugs.webkit.org/show_bug.cgi?id=225281) in their issue tracker.
:::

- `Geolocation`<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="browser-type-launch-persistent-context-option-geolocation"/> &#60;Geolocation?&#62;<a href="#browser-type-launch-persistent-context-option-geolocation" class="list-anchor">#</a>
- `Latitude` &#60;[double]&#62; Latitude between -90 and 90.
- `Longitude` &#60;[double]&#62; Longitude between -180 and 180.
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions dotnet/versioned_docs/version-stable/api/class-dialog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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`<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="element-handle-wait-for-selector-option-strict"/> &#60;[bool]?&#62; When true, the call requires selector to resolve to a single element. If given selector resolves to more then one element, the call throws an exception. <font size="2">Added in: v1.15</font><a href="#element-handle-wait-for-selector-option-strict" class="list-anchor">#</a>
- `Strict`<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="element-handle-wait-for-selector-option-strict"/> &#60;[bool]?&#62; When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. <font size="2">Added in: v1.15</font><a href="#element-handle-wait-for-selector-option-strict" class="list-anchor">#</a>
- `Timeout`<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="element-handle-wait-for-selector-option-timeout"/> &#60;[double]?&#62; Maximum time in milliseconds, defaults to 30 seconds, pass `0` to disable timeout. The default value can be changed by using the [BrowserContext.SetDefaultTimeout(timeout)](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [Page.SetDefaultTimeout(timeout)](/api/class-page.mdx#page-set-default-timeout) methods.<a href="#element-handle-wait-for-selector-option-timeout" class="list-anchor">#</a>
- returns:<a aria-hidden="true" tabindex="-1" class="list-anchor-link" id="element-handle-wait-for-selector-return"/> &#60;[ElementHandle]?&#62;<a href="#element-handle-wait-for-selector-return" class="list-anchor">#</a>

Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading

0 comments on commit 8b960bd

Please sign in to comment.