Skip to content
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

turn "Added in: v1.8" into "Added before v1.9" #1456

Merged
merged 2 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dotnet/docs/api/class-accessibility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Most of the accessibility tree gets filtered out when converting from internal b

### SnapshotAsync {#accessibility-snapshot}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>accessibility.SnapshotAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>accessibility.SnapshotAsync</x-search>

:::warning Deprecated

Expand Down
14 changes: 7 additions & 7 deletions dotnet/docs/api/class-browser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Browser.BrowserType

### CloseAsync {#browser-close}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browser.CloseAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browser.CloseAsync</x-search>

In case this browser is obtained using [BrowserType.LaunchAsync()](/api/class-browsertype.mdx#browser-type-launch), closes the browser and all of its pages (if any were opened).

Expand Down Expand Up @@ -76,7 +76,7 @@ await Browser.CloseAsync(options);

### Contexts {#browser-contexts}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browser.Contexts</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browser.Contexts</x-search>

Returns an array of all open browser contexts. In a newly created browser, this will return zero browser contexts.

Expand All @@ -97,7 +97,7 @@ System.Console.WriteLine(browser.Contexts.Count); // prints "1"

### IsConnected {#browser-is-connected}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browser.IsConnected</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browser.IsConnected</x-search>

Indicates that the browser is connected.

Expand Down Expand Up @@ -135,7 +135,7 @@ await Browser.NewBrowserCDPSessionAsync();

### NewContextAsync {#browser-new-context}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browser.NewContextAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browser.NewContextAsync</x-search>

Creates a new browser context. It won't share cookies/cache with other browser contexts.

Expand Down Expand Up @@ -360,7 +360,7 @@ await browser.CloseAsync();

### NewPageAsync {#browser-new-page}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browser.NewPageAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browser.NewPageAsync</x-search>

Creates a new page in a new browser context. Closing this page will close the context as well.

Expand Down Expand Up @@ -573,7 +573,7 @@ await Browser.NewPageAsync(options);

### Version {#browser-version}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browser.Version</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browser.Version</x-search>

Returns the browser version.

Expand All @@ -592,7 +592,7 @@ Browser.Version

### event Disconnected {#browser-event-disconnected}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browser.event Disconnected</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browser.event Disconnected</x-search>

Emitted when Browser gets disconnected from the browser application. This might happen because of one of the following:
* Browser application is closed or crashed.
Expand Down
44 changes: 22 additions & 22 deletions dotnet/docs/api/class-browsercontext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ await context.CloseAsync();

### AddCookiesAsync {#browser-context-add-cookies}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.AddCookiesAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.AddCookiesAsync</x-search>

Adds cookies into this browser context. All pages within this context will have these cookies installed. Cookies can be obtained via [BrowserContext.CookiesAsync()](/api/class-browsercontext.mdx#browser-context-cookies).

Expand Down Expand Up @@ -80,7 +80,7 @@ await context.AddCookiesAsync(new[] { cookie1, cookie2 });

### AddInitScriptAsync {#browser-context-add-init-script}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.AddInitScriptAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.AddInitScriptAsync</x-search>

Adds a script which would be evaluated in one of the following scenarios:
* Whenever a page is created in the browser context or is navigated.
Expand Down Expand Up @@ -138,7 +138,7 @@ BrowserContext.BackgroundPages

### Browser {#browser-context-browser}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.Browser</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.Browser</x-search>

Returns the browser instance of the context. If it was launched as a persistent context null gets returned.

Expand All @@ -155,7 +155,7 @@ BrowserContext.Browser

### ClearCookiesAsync {#browser-context-clear-cookies}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.ClearCookiesAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.ClearCookiesAsync</x-search>

Removes cookies from context. Accepts optional filter.

Expand Down Expand Up @@ -188,7 +188,7 @@ await context.ClearCookiesAsync(new() { Name = "session-id", Domain = "my-origin

### ClearPermissionsAsync {#browser-context-clear-permissions}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.ClearPermissionsAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.ClearPermissionsAsync</x-search>

Clears all permission overrides for the browser context.

Expand All @@ -210,7 +210,7 @@ await context.ClearPermissionsAsync();

### CloseAsync {#browser-context-close}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.CloseAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.CloseAsync</x-search>

Closes the browser context. All the pages that belong to the browser context will be closed.

Expand All @@ -237,7 +237,7 @@ await BrowserContext.CloseAsync(options);

### CookiesAsync {#browser-context-cookies}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.CookiesAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.CookiesAsync</x-search>

If no URLs are specified, this method returns all cookies. If URLs are specified, only cookies that affect those URLs are returned.

Expand Down Expand Up @@ -282,7 +282,7 @@ await BrowserContext.CookiesAsync(urls);

### ExposeBindingAsync {#browser-context-expose-binding}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.ExposeBindingAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.ExposeBindingAsync</x-search>

The method adds a function called `name` on the `window` object of every frame in every page in the context. When called, the function executes `callback` and returns a [Promise] which resolves to the return value of `callback`. If the `callback` returns a [Promise], it will be awaited.

Expand Down Expand Up @@ -337,7 +337,7 @@ await page.GetByRole(AriaRole.Button).ClickAsync();

### ExposeFunctionAsync {#browser-context-expose-function}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.ExposeFunctionAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.ExposeFunctionAsync</x-search>

The method adds a function called `name` on the `window` object of every frame in every page in the context. When called, the function executes `callback` and returns a [Promise] which resolves to the return value of `callback`.

Expand Down Expand Up @@ -399,7 +399,7 @@ class BrowserContextExamples

### GrantPermissionsAsync {#browser-context-grant-permissions}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.GrantPermissionsAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.GrantPermissionsAsync</x-search>

Grants specified permissions to the browser context. Only grants corresponding permissions to the given origin if specified.

Expand Down Expand Up @@ -467,7 +467,7 @@ await BrowserContext.NewCDPSessionAsync(page);

### NewPageAsync {#browser-context-new-page}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.NewPageAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.NewPageAsync</x-search>

Creates a new page in the browser context.

Expand All @@ -484,7 +484,7 @@ await BrowserContext.NewPageAsync();

### Pages {#browser-context-pages}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.Pages</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.Pages</x-search>

Returns all open pages in the context.

Expand All @@ -501,7 +501,7 @@ BrowserContext.Pages

### RouteAsync {#browser-context-route}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.RouteAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.RouteAsync</x-search>

Routing provides the capability to modify network requests that are made by any page in the browser context. Once route is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or aborted.

Expand Down Expand Up @@ -722,7 +722,7 @@ await BrowserContext.WaitForPageAsync(action, options);

### SetDefaultNavigationTimeout {#browser-context-set-default-navigation-timeout}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.SetDefaultNavigationTimeout</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.SetDefaultNavigationTimeout</x-search>

This setting will change the default maximum navigation time for the following methods and related shortcuts:
* [Page.GoBackAsync()](/api/class-page.mdx#page-go-back)
Expand Down Expand Up @@ -751,7 +751,7 @@ BrowserContext.SetDefaultNavigationTimeout(timeout);

### SetDefaultTimeout {#browser-context-set-default-timeout}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.SetDefaultTimeout</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.SetDefaultTimeout</x-search>

This setting will change the default maximum time for all the methods accepting `timeout` option.

Expand All @@ -774,7 +774,7 @@ BrowserContext.SetDefaultTimeout(timeout);

### SetExtraHTTPHeadersAsync {#browser-context-set-extra-http-headers}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.SetExtraHTTPHeadersAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.SetExtraHTTPHeadersAsync</x-search>

The extra HTTP headers will be sent with every request initiated by any page in the context. These headers are merged with page-specific extra HTTP headers set with [Page.SetExtraHTTPHeadersAsync()](/api/class-page.mdx#page-set-extra-http-headers). If page overrides a particular header, page-specific header value will be used instead of the browser context header value.

Expand All @@ -800,7 +800,7 @@ await BrowserContext.SetExtraHTTPHeadersAsync(headers);

### SetGeolocationAsync {#browser-context-set-geolocation}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.SetGeolocationAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.SetGeolocationAsync</x-search>

Sets the context's geolocation. Passing `null` or `undefined` emulates position unavailable.

Expand Down Expand Up @@ -837,7 +837,7 @@ Consider using [BrowserContext.GrantPermissionsAsync()](/api/class-browsercontex

### SetOfflineAsync {#browser-context-set-offline}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.SetOfflineAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.SetOfflineAsync</x-search>

**Usage**

Expand All @@ -857,7 +857,7 @@ await BrowserContext.SetOfflineAsync(offline);

### StorageStateAsync {#browser-context-storage-state}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.StorageStateAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.StorageStateAsync</x-search>

Returns storage state for this browser context, contains current cookies and local storage snapshot.

Expand All @@ -880,7 +880,7 @@ await BrowserContext.StorageStateAsync(options);

### UnrouteAsync {#browser-context-unroute}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.UnrouteAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.UnrouteAsync</x-search>

Removes a route created with [BrowserContext.RouteAsync()](/api/class-browsercontext.mdx#browser-context-route). When `handler` is not specified, removes all routes for the `url`.

Expand Down Expand Up @@ -1013,7 +1013,7 @@ BrowserContext.BackgroundPage += async (_, page) => {};

### event Close {#browser-context-event-close}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.event Close</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.event Close</x-search>

Emitted when Browser context gets closed. This might happen because of one of the following:
* Browser context is closed.
Expand Down Expand Up @@ -1082,7 +1082,7 @@ When no [Page.Dialog](/api/class-page.mdx#page-event-dialog) or [BrowserContext.

### event Page {#browser-context-event-page}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserContext.event Page</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserContext.event Page</x-search>

The event is emitted when a new Page is created in the BrowserContext. The page may still be loading. The event will also fire for popup pages. See also [Page.Popup](/api/class-page.mdx#page-event-popup) to receive events about popups relevant to a specific page.

Expand Down
10 changes: 5 additions & 5 deletions dotnet/docs/api/class-browsertype.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class BrowserTypeExamples

### ConnectAsync {#browser-type-connect}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserType.ConnectAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserType.ConnectAsync</x-search>

This method attaches Playwright to an existing browser instance. When connecting to another browser launched via `BrowserType.launchServer` in Node.js, the major and minor version needs to match the client version (1.2.3 → is compatible with 1.2.x).

Expand Down Expand Up @@ -120,7 +120,7 @@ var page = defaultContext.Pages[0];

### ExecutablePath {#browser-type-executable-path}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserType.ExecutablePath</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserType.ExecutablePath</x-search>

A path where Playwright expects to find a bundled browser executable.

Expand All @@ -137,7 +137,7 @@ BrowserType.ExecutablePath

### LaunchAsync {#browser-type-launch}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserType.LaunchAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserType.LaunchAsync</x-search>

Returns the browser instance.

Expand Down Expand Up @@ -242,7 +242,7 @@ var browser = await playwright.Chromium.LaunchAsync(new() {

### LaunchPersistentContextAsync {#browser-type-launch-persistent-context}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserType.LaunchPersistentContextAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserType.LaunchPersistentContextAsync</x-search>

Returns the persistent browser context instance.

Expand Down Expand Up @@ -507,7 +507,7 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options);

### Name {#browser-type-name}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>browserType.Name</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>browserType.Name</x-search>

Returns browser name. For example: `'chromium'`, `'webkit'` or `'firefox'`.

Expand Down
4 changes: 2 additions & 2 deletions dotnet/docs/api/class-cdpsession.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ await client.SendAsync("Animation.setPlaybackRate", new() { { "playbackRate", pl

### DetachAsync {#cdp-session-detach}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>cdpSession.DetachAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>cdpSession.DetachAsync</x-search>

Detaches the CDPSession from the target. Once detached, the CDPSession object won't emit any events and can't be used to send messages.

Expand Down Expand Up @@ -72,7 +72,7 @@ CdpSession.Event(eventName);

### SendAsync {#cdp-session-send}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.8</font><x-search>cdpSession.SendAsync</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>cdpSession.SendAsync</x-search>

**Usage**

Expand Down
Loading
Loading