Skip to content
Open
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
4 changes: 4 additions & 0 deletions nodejs/docs/api/class-page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ await page.agent(options);
- `cacheOutFile` [string] *(optional)*

When specified, generated entries are written into the `cacheOutFile` instead of updating the `cacheFile`.
- `expect` [Object] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-agent-option-expect"/><a href="#page-agent-option-expect" class="list-anchor">#</a>
- `timeout` [number] *(optional)*

Default timeout for expect calls in milliseconds, defaults to 5000ms.
- `limits` [Object] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-agent-option-limits"/><a href="#page-agent-option-limits" class="list-anchor">#</a>
- `maxTokens` [number] *(optional)*

Expand Down
6 changes: 3 additions & 3 deletions nodejs/docs/api/class-pageagent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ await agent.expect('"0 items" to be reported');
Maximum number of tokens to consume. The agentic loop will stop after input + output tokens exceed this value. Defaults to context-wide value specified in `agent` property.
- `timeout` [number] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-agent-expect-option-timeout"/><a href="#page-agent-expect-option-timeout" class="list-anchor">#</a>

Request timeout in milliseconds. Defaults to action timeout. Pass `0` to disable timeout.
Expect timeout in milliseconds. Defaults to `5000`. The default value can be changed via `expect.timeout` option in the config, or by specifying the `expect` property of the [expect](/api/class-page.mdx#page-agent-option-expect) option. Pass `0` to disable timeout.

**Returns**
- [Promise]&lt;[void]&gt;<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-agent-expect-return"/><a href="#page-agent-expect-return" class="list-anchor">#</a>
Expand Down Expand Up @@ -102,7 +102,7 @@ await agent.extract('List of items in the cart', z.object({
Maximum number of tokens to consume. The agentic loop will stop after input + output tokens exceed this value. Defaults to context-wide value specified in `agent` property.
- `timeout` [number] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-agent-extract-option-timeout"/><a href="#page-agent-extract-option-timeout" class="list-anchor">#</a>

Request timeout in milliseconds. Defaults to action timeout. Pass `0` to disable timeout.
Extract timeout in milliseconds. Defaults to `5000`. 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. Pass `0` to disable timeout.

**Returns**
- [Promise]&lt;[Object]&gt;<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-agent-extract-return"/><a href="#page-agent-extract-return" class="list-anchor">#</a>
Expand Down Expand Up @@ -153,7 +153,7 @@ await agent.perform('Click submit button');
Maximum number of tokens to consume. The agentic loop will stop after input + output tokens exceed this value. Defaults to context-wide value specified in `agent` property.
- `timeout` [number] *(optional)*<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-agent-perform-option-timeout"/><a href="#page-agent-perform-option-timeout" class="list-anchor">#</a>

Request timeout in milliseconds. Defaults to action timeout. Pass `0` to disable timeout.
Perform timeout in milliseconds. Defaults to `5000`. 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. Pass `0` to disable timeout.

**Returns**
- [Promise]&lt;[Object]&gt;<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="page-agent-perform-return"/><a href="#page-agent-perform-return" class="list-anchor">#</a>
Expand Down