Skip to content

Commit

Permalink
feat(roll): roll to ToT Playwright (24-08-24) (#1482)
Browse files Browse the repository at this point in the history
  • Loading branch information
playwrightmachine authored Aug 24, 2024
1 parent 78e4a02 commit e86cb62
Show file tree
Hide file tree
Showing 24 changed files with 53 additions and 105 deletions.
10 changes: 0 additions & 10 deletions dotnet/docs/api/class-browser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,6 @@ await browser.CloseAsync();
Optional password to use if HTTP proxy requires authentication.

Network proxy settings to use with this context. Defaults to none.

:::note
For Chromium on Windows the browser needs to be launched with the global proxy for this option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example `launch({ proxy: { server: 'http://per-context' } })`.
:::

- `RecordHarContent` `enum HarContentPolicy { Omit, Embed, Attach }?` *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-record-har-content"/><a href="#browser-new-context-option-record-har-content" class="list-anchor">#</a>

Optional setting to control resource content management. If `omit` is specified, content is not persisted. If `attach` is specified, resources are persisted as separate files and all of these files are archived along with the HAR file. Defaults to `embed`, which stores content inline the HAR file as per HAR specification.
Expand Down Expand Up @@ -507,11 +502,6 @@ await Browser.NewPageAsync(options);
Optional password to use if HTTP proxy requires authentication.

Network proxy settings to use with this context. Defaults to none.

:::note
For Chromium on Windows the browser needs to be launched with the global proxy for this option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example `launch({ proxy: { server: 'http://per-context' } })`.
:::

- `RecordHarContent` `enum HarContentPolicy { Omit, Embed, Attach }?` *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-record-har-content"/><a href="#browser-new-page-option-record-har-content" class="list-anchor">#</a>

Optional setting to control resource content management. If `omit` is specified, content is not persisted. If `attach` is specified, resources are persisted as separate files and all of these files are archived along with the HAR file. Defaults to `embed`, which stores content inline the HAR file as per HAR specification.
Expand Down
4 changes: 2 additions & 2 deletions dotnet/docs/api/class-elementhandle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1163,11 +1163,11 @@ await handle.SelectOptionAsync(new[] {
- `NoWaitAfter` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="element-handle-select-option-option-no-wait-after"/><a href="#element-handle-select-option-option-no-wait-after" class="list-anchor">#</a>

:::warning[Deprecated]
This option will default to `true` in the future.
This option has no effect.
:::


Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to `false`.
This option has no effect.
- `Timeout` [float]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="element-handle-select-option-option-timeout"/><a href="#element-handle-select-option-option-timeout" class="list-anchor">#</a>

Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [BrowserContext.SetDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [Page.SetDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods.
Expand Down
4 changes: 2 additions & 2 deletions dotnet/docs/api/class-frame.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2216,11 +2216,11 @@ await frame.SelectOptionAsync("select#colors", new[] { "red", "green", "blue" })
- `NoWaitAfter` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-select-option-option-no-wait-after"/><a href="#frame-select-option-option-no-wait-after" class="list-anchor">#</a>

:::warning[Deprecated]
This option will default to `true` in the future.
This option has no effect.
:::


Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to `false`.
This option has no effect.
- `Strict` [bool]? *(optional)* <font size="2">Added in: v1.14</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-select-option-option-strict"/><a href="#frame-select-option-option-strict" class="list-anchor">#</a>

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.
Expand Down
4 changes: 2 additions & 2 deletions dotnet/docs/api/class-locator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1915,11 +1915,11 @@ await element.SelectOptionAsync(new[] { "red", "green", "blue" });
- `NoWaitAfter` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="locator-select-option-option-no-wait-after"/><a href="#locator-select-option-option-no-wait-after" class="list-anchor">#</a>

:::warning[Deprecated]
This option will default to `true` in the future.
This option has no effect.
:::


Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to `false`.
This option has no effect.
- `Timeout` [float]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="locator-select-option-option-timeout"/><a href="#locator-select-option-option-timeout" class="list-anchor">#</a>

Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [BrowserContext.SetDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [Page.SetDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods.
Expand Down
4 changes: 2 additions & 2 deletions dotnet/docs/api/class-page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4353,11 +4353,11 @@ await page.SelectOptionAsync("select#colors", new[] { "red", "green", "blue" });
- `NoWaitAfter` [bool]? *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-select-option-option-no-wait-after"/><a href="#page-select-option-option-no-wait-after" class="list-anchor">#</a>
:::warning[Deprecated]
This option will default to `true` in the future.
This option has no effect.
:::
Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to `false`.
This option has no effect.
- `Strict` [bool]? *(optional)* <font size="2">Added in: v1.14</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-select-option-option-strict"/><a href="#page-select-option-option-strict" class="list-anchor">#</a>
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.
Expand Down
9 changes: 2 additions & 7 deletions dotnet/docs/network.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,10 @@ await using var browser = await BrowserType.LaunchAsync(new()
});
```

When specifying proxy for each context individually, **Chromium on Windows** needs a hint that proxy will be set. This is done via passing a non-empty proxy server to the browser itself. Here is an example of a context-specific proxy:
Its also possible to specify it per context:

```csharp
var proxy = new Proxy { Server = "per-context" };
await using var browser = await BrowserType.LaunchAsync(new()
{
// Browser proxy option is required for Chromium on Windows.
Proxy = proxy
});
await using var browser = await BrowserType.LaunchAsync();
await using var context = await browser.NewContextAsync(new()
{
Proxy = new Proxy { Server = "http://myproxy.com:3128" },
Expand Down
10 changes: 0 additions & 10 deletions java/docs/api/class-browser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,6 @@ browser.close();
Optional password to use if HTTP proxy requires authentication.

Network proxy settings to use with this context. Defaults to none.

:::note
For Chromium on Windows the browser needs to be launched with the global proxy for this option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example `launch({ proxy: { server: 'http://per-context' } })`.
:::

- `setRecordHarContent` `enum HarContentPolicy { OMIT, EMBED, ATTACH }` *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-record-har-content"/><a href="#browser-new-context-option-record-har-content" class="list-anchor">#</a>

Optional setting to control resource content management. If `omit` is specified, content is not persisted. If `attach` is specified, resources are persisted as separate files and all of these files are archived along with the HAR file. Defaults to `embed`, which stores content inline the HAR file as per HAR specification.
Expand Down Expand Up @@ -512,11 +507,6 @@ Browser.newPage(options);
Optional password to use if HTTP proxy requires authentication.

Network proxy settings to use with this context. Defaults to none.

:::note
For Chromium on Windows the browser needs to be launched with the global proxy for this option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example `launch({ proxy: { server: 'http://per-context' } })`.
:::

- `setRecordHarContent` `enum HarContentPolicy { OMIT, EMBED, ATTACH }` *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-record-har-content"/><a href="#browser-new-page-option-record-har-content" class="list-anchor">#</a>

Optional setting to control resource content management. If `omit` is specified, content is not persisted. If `attach` is specified, resources are persisted as separate files and all of these files are archived along with the HAR file. Defaults to `embed`, which stores content inline the HAR file as per HAR specification.
Expand Down
4 changes: 2 additions & 2 deletions java/docs/api/class-elementhandle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1168,11 +1168,11 @@ handle.selectOption(new String[] {"red", "green", "blue"});
- `setNoWaitAfter` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="element-handle-select-option-option-no-wait-after"/><a href="#element-handle-select-option-option-no-wait-after" class="list-anchor">#</a>

:::warning[Deprecated]
This option will default to `true` in the future.
This option has no effect.
:::


Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to `false`.
This option has no effect.
- `setTimeout` [double] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="element-handle-select-option-option-timeout"/><a href="#element-handle-select-option-option-timeout" class="list-anchor">#</a>

Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [BrowserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [Page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods.
Expand Down
4 changes: 2 additions & 2 deletions java/docs/api/class-frame.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2132,11 +2132,11 @@ frame.selectOption("select#colors", new String[] {"red", "green", "blue"});
- `setNoWaitAfter` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-select-option-option-no-wait-after"/><a href="#frame-select-option-option-no-wait-after" class="list-anchor">#</a>

:::warning[Deprecated]
This option will default to `true` in the future.
This option has no effect.
:::


Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to `false`.
This option has no effect.
- `setStrict` [boolean] *(optional)* <font size="2">Added in: v1.14</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="frame-select-option-option-strict"/><a href="#frame-select-option-option-strict" class="list-anchor">#</a>

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.
Expand Down
4 changes: 2 additions & 2 deletions java/docs/api/class-locator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1917,11 +1917,11 @@ element.selectOption(new String[] {"red", "green", "blue"});
- `setNoWaitAfter` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="locator-select-option-option-no-wait-after"/><a href="#locator-select-option-option-no-wait-after" class="list-anchor">#</a>

:::warning[Deprecated]
This option will default to `true` in the future.
This option has no effect.
:::


Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to `false`.
This option has no effect.
- `setTimeout` [double] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="locator-select-option-option-timeout"/><a href="#locator-select-option-option-timeout" class="list-anchor">#</a>

Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [BrowserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [Page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods.
Expand Down
4 changes: 2 additions & 2 deletions java/docs/api/class-page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4108,11 +4108,11 @@ page.selectOption("select#colors", new String[] {"red", "green", "blue"});
- `setNoWaitAfter` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-select-option-option-no-wait-after"/><a href="#page-select-option-option-no-wait-after" class="list-anchor">#</a>
:::warning[Deprecated]
This option will default to `true` in the future.
This option has no effect.
:::
Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to `false`.
This option has no effect.
- `setStrict` [boolean] *(optional)* <font size="2">Added in: v1.14</font><a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-select-option-option-strict"/><a href="#page-select-option-option-strict" class="list-anchor">#</a>
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.
Expand Down
12 changes: 5 additions & 7 deletions java/docs/network.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,15 @@ Here is an example of a global proxy:
Browser browser = chromium.launch(new BrowserType.LaunchOptions()
.setProxy(new Proxy("http://myproxy.com:3128")
.setUsername('usr')
.setPassword('pwd'));
.setPassword('pwd')));
```

When specifying proxy for each context individually, **Chromium on Windows** needs a hint that proxy will be set. This is done via passing a non-empty proxy server to the browser itself. Here is an example of a context-specific proxy:
Its also possible to specify it per context:

```java
Browser browser = chromium.launch(new BrowserType.LaunchOptions()
// Browser proxy option is required for Chromium on Windows.
.setProxy(new Proxy("per-context"));
BrowserContext context = chromium.launch(new Browser.NewContextOptions()
.setProxy(new Proxy("http://myproxy.com:3128"));
Browser browser = chromium.launch();
BrowserContext context = browser.newContext(new Browser.NewContextOptions()
.setProxy(new Proxy("http://myproxy.com:3128")));
```

## Network events
Expand Down
10 changes: 0 additions & 10 deletions nodejs/docs/api/class-browser.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,6 @@ If directly using this method to create [BrowserContext]s, it is best practice t
Optional password to use if HTTP proxy requires authentication.

Network proxy settings to use with this context. Defaults to none.

:::note
For Chromium on Windows the browser needs to be launched with the global proxy for this option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example `launch({ proxy: { server: 'http://per-context' } })`.
:::

- `recordHar` [Object] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-context-option-record-har"/><a href="#browser-new-context-option-record-har" class="list-anchor">#</a>
- `omitContent` [boolean] *(optional)*

Expand Down Expand Up @@ -581,11 +576,6 @@ await browser.newPage(options);
Optional password to use if HTTP proxy requires authentication.

Network proxy settings to use with this context. Defaults to none.

:::note
For Chromium on Windows the browser needs to be launched with the global proxy for this option to work. If all contexts override the proxy, global proxy will be never used and can be any string, for example `launch({ proxy: { server: 'http://per-context' } })`.
:::

- `recordHar` [Object] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="browser-new-page-option-record-har"/><a href="#browser-new-page-option-record-har" class="list-anchor">#</a>
- `omitContent` [boolean] *(optional)*

Expand Down
4 changes: 2 additions & 2 deletions nodejs/docs/api/class-elementhandle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1172,11 +1172,11 @@ handle.selectOption(['red', 'green', 'blue']);
- `noWaitAfter` [boolean] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="element-handle-select-option-option-no-wait-after"/><a href="#element-handle-select-option-option-no-wait-after" class="list-anchor">#</a>

:::warning[Deprecated]
This option will default to `true` in the future.
This option has no effect.
:::


Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to `false`.
This option has no effect.
- `timeout` [number] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="element-handle-select-option-option-timeout"/><a href="#element-handle-select-option-option-timeout" class="list-anchor">#</a>

Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout` option in the config, or by using the [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods.
Expand Down
Loading

0 comments on commit e86cb62

Please sign in to comment.