docs: default timeout in library is 30 seconds
Fixes https://github.com/microsoft/playwright/issues/31306
This commit is contained in:
parent
f1475fa644
commit
5700b8930a
|
|
@ -1648,7 +1648,7 @@ Event name, same one would pass into `browserContext.on(event)`.
|
||||||
* langs: js
|
* langs: js
|
||||||
- `optionsOrPredicate` ?<[function]|[Object]>
|
- `optionsOrPredicate` ?<[function]|[Object]>
|
||||||
- `predicate` <[function]> Receives the event data and resolves to truthy value when the waiting should resolve.
|
- `predicate` <[function]> Receives the event data and resolves to truthy value when the waiting should resolve.
|
||||||
- `timeout` ?<[float]> Maximum time to wait for in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout` option in the config, or by using the [`method: BrowserContext.setDefaultTimeout`] method.
|
- `timeout` ?<[float]> Maximum time to wait for in milliseconds. Defaults to `30000` - 30 seconds (`0` - no timeout in Playwright Test). The default value can be changed via `actionTimeout` option in the config, or by using the [`method: BrowserContext.setDefaultTimeout`] method.
|
||||||
|
|
||||||
Either a predicate that receives an event or an options object. Optional.
|
Either a predicate that receives an event or an options object. Optional.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4335,7 +4335,7 @@ frame = event_info.value
|
||||||
* langs: js
|
* langs: js
|
||||||
- `optionsOrPredicate` ?<[function]|[Object]>
|
- `optionsOrPredicate` ?<[function]|[Object]>
|
||||||
- `predicate` <[function]> Receives the event data and resolves to truthy value when the waiting should resolve.
|
- `predicate` <[function]> Receives the event data and resolves to truthy value when the waiting should resolve.
|
||||||
- `timeout` ?<[float]> Maximum time to wait for in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout` option in the config, or by using the [`method: BrowserContext.setDefaultTimeout`] or [`method: Page.setDefaultTimeout`] methods.
|
- `timeout` ?<[float]> Maximum time to wait for in milliseconds. Defaults to `30000` - 30 seconds (`0` - no timeout in Playwright Test). The default value can be changed via `actionTimeout` option in the config, or by using the [`method: BrowserContext.setDefaultTimeout`] or [`method: Page.setDefaultTimeout`] methods.
|
||||||
|
|
||||||
Either a predicate that receives an event or an options object. Optional.
|
Either a predicate that receives an event or an options object. Optional.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ Event name, same one would pass into `webSocket.on(event)`.
|
||||||
* langs: js
|
* langs: js
|
||||||
- `optionsOrPredicate` ?<[function]|[Object]>
|
- `optionsOrPredicate` ?<[function]|[Object]>
|
||||||
- `predicate` <[function]> Receives the event data and resolves to truthy value when the waiting should resolve.
|
- `predicate` <[function]> Receives the event data and resolves to truthy value when the waiting should resolve.
|
||||||
- `timeout` ?<[float]> Maximum time to wait for in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout` option in the config, or by using the [`method: BrowserContext.setDefaultTimeout`] or [`method: Page.setDefaultTimeout`] methods.
|
- `timeout` ?<[float]> Maximum time to wait for in milliseconds. Defaults to `30000` - 30 seconds (`0` - no timeout in Playwright Test). The default value can be changed via `actionTimeout` option in the config, or by using the [`method: BrowserContext.setDefaultTimeout`] or [`method: Page.setDefaultTimeout`] methods.
|
||||||
|
|
||||||
Either a predicate that receives an event or an options object. Optional.
|
Either a predicate that receives an event or an options object. Optional.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ The default value can be changed by using the
|
||||||
* langs: js
|
* langs: js
|
||||||
- `timeout` <[float]>
|
- `timeout` <[float]>
|
||||||
|
|
||||||
Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `navigationTimeout` option in the config, or by using the [`method: BrowserContext.setDefaultNavigationTimeout`],
|
Maximum operation time in milliseconds. Defaults to `30000` - 30 seconds (`0` - no timeout in Playwright Test). The default value can be changed via `navigationTimeout` option in the config, or by using the [`method: BrowserContext.setDefaultNavigationTimeout`],
|
||||||
[`method: BrowserContext.setDefaultTimeout`],
|
[`method: BrowserContext.setDefaultTimeout`],
|
||||||
[`method: Page.setDefaultNavigationTimeout`] or
|
[`method: Page.setDefaultNavigationTimeout`] or
|
||||||
[`method: Page.setDefaultTimeout`] methods.
|
[`method: Page.setDefaultTimeout`] methods.
|
||||||
|
|
@ -38,7 +38,7 @@ value can be changed by using the [`method: BrowserContext.setDefaultTimeout`] o
|
||||||
* langs: js
|
* langs: js
|
||||||
- `timeout` <[float]>
|
- `timeout` <[float]>
|
||||||
|
|
||||||
Maximum time to wait for in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout` option in the config, or by using the [`method: BrowserContext.setDefaultTimeout`] or [`method: Page.setDefaultTimeout`] methods.
|
Maximum time to wait for in milliseconds. Defaults to `30000` - 30 seconds (`0` - no timeout in Playwright Test). The default value can be changed via `actionTimeout` option in the config, or by using the [`method: BrowserContext.setDefaultTimeout`] or [`method: Page.setDefaultTimeout`] methods.
|
||||||
|
|
||||||
## input-strict
|
## input-strict
|
||||||
- `strict` <[boolean]>
|
- `strict` <[boolean]>
|
||||||
|
|
@ -58,7 +58,7 @@ using the [`method: BrowserContext.setDefaultTimeout`] or
|
||||||
* langs: js
|
* langs: js
|
||||||
- `timeout` <[float]>
|
- `timeout` <[float]>
|
||||||
|
|
||||||
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 [`method: BrowserContext.setDefaultTimeout`] or
|
Maximum time in milliseconds. Defaults to `30000` - 30 seconds (`0` - no timeout in Playwright Test). The default value can be changed via `actionTimeout` option in the config, or by using the [`method: BrowserContext.setDefaultTimeout`] or
|
||||||
[`method: Page.setDefaultTimeout`] methods.
|
[`method: Page.setDefaultTimeout`] methods.
|
||||||
|
|
||||||
## input-no-wait-after
|
## input-no-wait-after
|
||||||
|
|
|
||||||
|
|
@ -446,6 +446,7 @@ export class Page extends ChannelOwner<channels.PageChannel> implements api.Page
|
||||||
private async _waitForEvent(event: string, optionsOrPredicate: WaitForEventOptions, logLine?: string): Promise<any> {
|
private async _waitForEvent(event: string, optionsOrPredicate: WaitForEventOptions, logLine?: string): Promise<any> {
|
||||||
return await this._wrapApiCall(async () => {
|
return await this._wrapApiCall(async () => {
|
||||||
const timeout = this._timeoutSettings.timeout(typeof optionsOrPredicate === 'function' ? {} : optionsOrPredicate);
|
const timeout = this._timeoutSettings.timeout(typeof optionsOrPredicate === 'function' ? {} : optionsOrPredicate);
|
||||||
|
console.log('timeout', timeout, '\n\n\n\n');
|
||||||
const predicate = typeof optionsOrPredicate === 'function' ? optionsOrPredicate : optionsOrPredicate.predicate;
|
const predicate = typeof optionsOrPredicate === 'function' ? optionsOrPredicate : optionsOrPredicate.predicate;
|
||||||
const waiter = Waiter.createForEvent(this, event);
|
const waiter = Waiter.createForEvent(this, event);
|
||||||
if (logLine)
|
if (logLine)
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ export class TimeoutSettings {
|
||||||
|
|
||||||
setDefaultTimeout(timeout: number | undefined) {
|
setDefaultTimeout(timeout: number | undefined) {
|
||||||
this._defaultTimeout = timeout;
|
this._defaultTimeout = timeout;
|
||||||
|
console.log('timeoutSettings.ts: setDefaultTimeout: this._defaultTimeout: ', this._defaultTimeout, new Error().stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
setDefaultNavigationTimeout(timeout: number | undefined) {
|
setDefaultNavigationTimeout(timeout: number | undefined) {
|
||||||
|
|
|
||||||
460
packages/playwright-core/types/types.d.ts
vendored
460
packages/playwright-core/types/types.d.ts
vendored
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue