Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs: linkify params and options (#32823)

Dmitry Gozmana2bdb2fd7907
diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts
index eacc1393e3..6702fc9fb2 100644
--- a/packages/playwright-core/types/types.d.ts
+++ b/packages/playwright-core/types/types.d.ts
@@ -29,9 +29,10 @@ type ElementHandleWaitForSelectorOptionsNotHidden = ElementHandleWaitForSelector
};
/**
- * Page provides methods to interact with a single tab in a {@link Browser}, or an
- * [extension background page](https://developer.chrome.com/extensions/background_pages) in Chromium. One {@link
- * Browser} instance might have multiple {@link Page} instances.
+ * Page provides methods to interact with a single tab in a [Browser](https://playwright.dev/docs/api/class-browser),
+ * or an [extension background page](https://developer.chrome.com/extensions/background_pages) in Chromium. One
+ * [Browser](https://playwright.dev/docs/api/class-browser) instance might have multiple
+ * [Page](https://playwright.dev/docs/api/class-page) instances.
*
* This example creates a page, navigates it to a URL, and then saves a screenshot:
*
@@ -72,7 +73,8 @@ type ElementHandleWaitForSelectorOptionsNotHidden = ElementHandleWaitForSelector
*/
export interface Page {
/**
- * Returns the value of the `pageFunction` invocation.
+ * Returns the value of the
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression) invocation.
*
* If the function passed to the
* [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a [Promise],
@@ -88,7 +90,7 @@ export interface Page {
*
* **Usage**
*
- * Passing argument to `pageFunction`:
+ * Passing argument to [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression):
*
* ```js
* const result = await page.evaluate(([x, y]) => {
@@ -105,7 +107,7 @@ export interface Page {
* console.log(await page.evaluate(`1 + ${x}`)); // prints "11"
* ```
*
- * {@link ElementHandle} instances can be passed as an argument to the
+ * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
* [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate):
*
* ```js
@@ -117,11 +119,13 @@ export interface Page {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression).
*/
evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<R>;
/**
- * Returns the value of the `pageFunction` invocation.
+ * Returns the value of the
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression) invocation.
*
* If the function passed to the
* [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a [Promise],
@@ -137,7 +141,7 @@ export interface Page {
*
* **Usage**
*
- * Passing argument to `pageFunction`:
+ * Passing argument to [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression):
*
* ```js
* const result = await page.evaluate(([x, y]) => {
@@ -154,7 +158,7 @@ export interface Page {
* console.log(await page.evaluate(`1 + ${x}`)); // prints "11"
* ```
*
- * {@link ElementHandle} instances can be passed as an argument to the
+ * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
* [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate):
*
* ```js
@@ -166,18 +170,21 @@ export interface Page {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression).
*/
evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
/**
- * Returns the value of the `pageFunction` invocation as a {@link JSHandle}.
+ * Returns the value of the
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression) invocation as a
+ * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* The only difference between
* [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) and
* [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) is that
* [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
- * {@link JSHandle}.
+ * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* If the function passed to the
* [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
@@ -198,7 +205,7 @@ export interface Page {
* const aHandle = await page.evaluateHandle('document'); // Handle for the 'document'
* ```
*
- * {@link JSHandle} instances can be passed as an argument to the
+ * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
* [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle):
*
* ```js
@@ -209,17 +216,20 @@ export interface Page {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression).
*/
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
/**
- * Returns the value of the `pageFunction` invocation as a {@link JSHandle}.
+ * Returns the value of the
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression) invocation as a
+ * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* The only difference between
* [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) and
* [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) is that
* [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
- * {@link JSHandle}.
+ * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* If the function passed to the
* [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
@@ -240,7 +250,7 @@ export interface Page {
* const aHandle = await page.evaluateHandle('document'); // Handle for the 'document'
* ```
*
- * {@link JSHandle} instances can be passed as an argument to the
+ * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
* [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle):
*
* ```js
@@ -251,7 +261,8 @@ export interface Page {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression).
*/
evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<SmartHandle<R>>;
@@ -289,7 +300,9 @@ export interface Page {
* and [page.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-page#page-add-init-script) is not
* defined.
* @param script Script to be evaluated in the page.
- * @param arg Optional argument to pass to `script` (only supported when passing a function).
+ * @param arg Optional argument to pass to
+ * [`script`](https://playwright.dev/docs/api/class-page#page-add-init-script-option-script) (only supported when
+ * passing a function).
*/
addInitScript<Arg>(script: PageFunction<Arg, any> | { path?: string, content?: string }, arg?: Arg): Promise<void>;
@@ -339,12 +352,15 @@ export interface Page {
* **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
* Use
* [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
- * other {@link Locator} helper methods or web-first assertions instead.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
*
* The method finds an element matching the specified selector within the page and passes it as a first argument to
- * `pageFunction`. If no elements match the selector, the method throws an error. Returns the value of `pageFunction`.
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression). If no
+ * elements match the selector, the method throws an error. Returns the value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression) returns a
+ * [Promise], then
* [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
* would wait for the promise to resolve and return its value.
*
@@ -360,7 +376,8 @@ export interface Page {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
* @param options
*/
$eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], Arg, R>, arg: Arg): Promise<R>;
@@ -368,12 +385,15 @@ export interface Page {
* **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
* Use
* [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
- * other {@link Locator} helper methods or web-first assertions instead.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
*
* The method finds an element matching the specified selector within the page and passes it as a first argument to
- * `pageFunction`. If no elements match the selector, the method throws an error. Returns the value of `pageFunction`.
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression). If no
+ * elements match the selector, the method throws an error. Returns the value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression) returns a
+ * [Promise], then
* [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
* would wait for the promise to resolve and return its value.
*
@@ -389,7 +409,8 @@ export interface Page {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
* @param options
*/
$eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg): Promise<R>;
@@ -397,12 +418,15 @@ export interface Page {
* **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
* Use
* [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
- * other {@link Locator} helper methods or web-first assertions instead.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
*
* The method finds an element matching the specified selector within the page and passes it as a first argument to
- * `pageFunction`. If no elements match the selector, the method throws an error. Returns the value of `pageFunction`.
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression). If no
+ * elements match the selector, the method throws an error. Returns the value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression) returns a
+ * [Promise], then
* [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
* would wait for the promise to resolve and return its value.
*
@@ -418,7 +442,8 @@ export interface Page {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
* @param options
*/
$eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], void, R>, arg?: any): Promise<R>;
@@ -426,12 +451,15 @@ export interface Page {
* **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
* Use
* [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
- * other {@link Locator} helper methods or web-first assertions instead.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
*
* The method finds an element matching the specified selector within the page and passes it as a first argument to
- * `pageFunction`. If no elements match the selector, the method throws an error. Returns the value of `pageFunction`.
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression). If no
+ * elements match the selector, the method throws an error. Returns the value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression) returns a
+ * [Promise], then
* [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
* would wait for the promise to resolve and return its value.
*
@@ -447,7 +475,8 @@ export interface Page {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-option-expression).
* @param options
*/
$eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, void, R>, arg?: any): Promise<R>;
@@ -455,12 +484,18 @@ export interface Page {
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other {@link Locator} helper methods and web-first assertions do a better job.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
+ * job.
*
* The method finds all elements matching the specified selector within the page and passes an array of matched
- * elements as a first argument to `pageFunction`. Returns the result of `pageFunction` invocation.
+ * elements as a first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression). Returns
+ * the result of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression)
+ * invocation.
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression) returns
+ * a [Promise], then
* [page.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all)
* would wait for the promise to resolve and return its value.
*
@@ -472,18 +507,25 @@ export interface Page {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression).
*/
$$eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], Arg, R>, arg: Arg): Promise<R>;
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other {@link Locator} helper methods and web-first assertions do a better job.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
+ * job.
*
* The method finds all elements matching the specified selector within the page and passes an array of matched
- * elements as a first argument to `pageFunction`. Returns the result of `pageFunction` invocation.
+ * elements as a first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression). Returns
+ * the result of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression)
+ * invocation.
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression) returns
+ * a [Promise], then
* [page.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all)
* would wait for the promise to resolve and return its value.
*
@@ -495,18 +537,25 @@ export interface Page {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression).
*/
$$eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], Arg, R>, arg: Arg): Promise<R>;
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other {@link Locator} helper methods and web-first assertions do a better job.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
+ * job.
*
* The method finds all elements matching the specified selector within the page and passes an array of matched
- * elements as a first argument to `pageFunction`. Returns the result of `pageFunction` invocation.
+ * elements as a first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression). Returns
+ * the result of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression)
+ * invocation.
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression) returns
+ * a [Promise], then
* [page.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all)
* would wait for the promise to resolve and return its value.
*
@@ -518,18 +567,25 @@ export interface Page {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression).
*/
$$eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], void, R>, arg?: any): Promise<R>;
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other {@link Locator} helper methods and web-first assertions do a better job.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
+ * job.
*
* The method finds all elements matching the specified selector within the page and passes an array of matched
- * elements as a first argument to `pageFunction`. Returns the result of `pageFunction` invocation.
+ * elements as a first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression). Returns
+ * the result of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression)
+ * invocation.
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression) returns
+ * a [Promise], then
* [page.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all)
* would wait for the promise to resolve and return its value.
*
@@ -541,12 +597,15 @@ export interface Page {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-eval-on-selector-all-option-expression).
*/
$$eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], void, R>, arg?: any): Promise<R>;
/**
- * Returns when the `pageFunction` returns a truthy value. It resolves to a JSHandle of the truthy value.
+ * Returns when the
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-expression) returns a
+ * truthy value. It resolves to a JSHandle of the truthy value.
*
* **Usage**
*
@@ -577,12 +636,15 @@ export interface Page {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-expression).
* @param options
*/
waitForFunction<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, options?: PageWaitForFunctionOptions): Promise<SmartHandle<R>>;
/**
- * Returns when the `pageFunction` returns a truthy value. It resolves to a JSHandle of the truthy value.
+ * Returns when the
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-expression) returns a
+ * truthy value. It resolves to a JSHandle of the truthy value.
*
* **Usage**
*
@@ -613,7 +675,8 @@ export interface Page {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-expression).
* @param options
*/
waitForFunction<R>(pageFunction: PageFunction<void, R>, arg?: any, options?: PageWaitForFunctionOptions): Promise<SmartHandle<R>>;
@@ -623,15 +686,21 @@ export interface Page {
* [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
* about [locators](https://playwright.dev/docs/locators).
*
- * Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
- * `detached`.
+ * Returns when element specified by selector satisfies
+ * [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option. Returns `null` if
+ * waiting for `hidden` or `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using {@link Locator}
- * objects and web-first assertions makes the code wait-for-selector-free.
+ * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
+ * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions makes the code
+ * wait-for-selector-free.
*
- * Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
- * at the moment of calling the method `selector` already satisfies the condition, the method will return immediately.
- * If the selector doesn't satisfy the condition for the `timeout` milliseconds, the function will throw.
+ * Wait for the [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) to
+ * satisfy [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option (either
+ * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) already satisfies
+ * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
+ * [`timeout`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-timeout) milliseconds, the
+ * function will throw.
*
* **Usage**
*
@@ -661,15 +730,21 @@ export interface Page {
* [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
* about [locators](https://playwright.dev/docs/locators).
*
- * Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
- * `detached`.
+ * Returns when element specified by selector satisfies
+ * [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option. Returns `null` if
+ * waiting for `hidden` or `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using {@link Locator}
- * objects and web-first assertions makes the code wait-for-selector-free.
+ * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
+ * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions makes the code
+ * wait-for-selector-free.
*
- * Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
- * at the moment of calling the method `selector` already satisfies the condition, the method will return immediately.
- * If the selector doesn't satisfy the condition for the `timeout` milliseconds, the function will throw.
+ * Wait for the [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) to
+ * satisfy [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option (either
+ * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) already satisfies
+ * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
+ * [`timeout`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-timeout) milliseconds, the
+ * function will throw.
*
* **Usage**
*
@@ -699,15 +774,21 @@ export interface Page {
* [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
* about [locators](https://playwright.dev/docs/locators).
*
- * Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
- * `detached`.
+ * Returns when element specified by selector satisfies
+ * [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option. Returns `null` if
+ * waiting for `hidden` or `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using {@link Locator}
- * objects and web-first assertions makes the code wait-for-selector-free.
+ * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
+ * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions makes the code
+ * wait-for-selector-free.
*
- * Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
- * at the moment of calling the method `selector` already satisfies the condition, the method will return immediately.
- * If the selector doesn't satisfy the condition for the `timeout` milliseconds, the function will throw.
+ * Wait for the [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) to
+ * satisfy [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option (either
+ * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) already satisfies
+ * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
+ * [`timeout`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-timeout) milliseconds, the
+ * function will throw.
*
* **Usage**
*
@@ -737,15 +818,21 @@ export interface Page {
* [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
* about [locators](https://playwright.dev/docs/locators).
*
- * Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
- * `detached`.
+ * Returns when element specified by selector satisfies
+ * [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option. Returns `null` if
+ * waiting for `hidden` or `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using {@link Locator}
- * objects and web-first assertions makes the code wait-for-selector-free.
+ * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
+ * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions makes the code
+ * wait-for-selector-free.
*
- * Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
- * at the moment of calling the method `selector` already satisfies the condition, the method will return immediately.
- * If the selector doesn't satisfy the condition for the `timeout` milliseconds, the function will throw.
+ * Wait for the [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) to
+ * satisfy [`state`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-state) option (either
+ * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-selector) already satisfies
+ * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
+ * [`timeout`](https://playwright.dev/docs/api/class-page#page-wait-for-selector-option-timeout) milliseconds, the
+ * function will throw.
*
* **Usage**
*
@@ -772,12 +859,18 @@ export interface Page {
waitForSelector(selector: string, options: PageWaitForSelectorOptions): Promise<null|ElementHandle<SVGElement | HTMLElement>>;
/**
- * The method adds a function called `name` on the `window` object of every frame in this page. 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.
+ * The method adds a function called
+ * [`name`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-name) on the `window` object of
+ * every frame in this page. When called, the function executes
+ * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) and returns a
+ * [Promise] which resolves to the return value of
+ * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback). If the
+ * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) returns a [Promise],
+ * it will be awaited.
*
- * The first argument of the `callback` function contains information about the caller: `{ browserContext:
- * BrowserContext, page: Page, frame: Frame }`.
+ * The first argument of the
+ * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) function contains
+ * information about the caller: `{ browserContext: BrowserContext, page: Page, frame: Frame }`.
*
* See
* [browserContext.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding)
@@ -818,12 +911,18 @@ export interface Page {
*/
exposeBinding(name: string, playwrightBinding: (source: BindingSource, arg: JSHandle) => any, options: { handle: true }): Promise<void>;
/**
- * The method adds a function called `name` on the `window` object of every frame in this page. 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.
+ * The method adds a function called
+ * [`name`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-name) on the `window` object of
+ * every frame in this page. When called, the function executes
+ * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) and returns a
+ * [Promise] which resolves to the return value of
+ * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback). If the
+ * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) returns a [Promise],
+ * it will be awaited.
*
- * The first argument of the `callback` function contains information about the caller: `{ browserContext:
- * BrowserContext, page: Page, frame: Frame }`.
+ * The first argument of the
+ * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-binding-option-callback) function contains
+ * information about the caller: `{ browserContext: BrowserContext, page: Page, frame: Frame }`.
*
* See
* [browserContext.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding)
@@ -922,7 +1021,8 @@ export interface Page {
/**
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
*
- * The arguments passed into `console.log` are available on the {@link ConsoleMessage} event handler argument.
+ * The arguments passed into `console.log` are available on the
+ * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
*
* **Usage**
*
@@ -986,7 +1086,7 @@ export interface Page {
/**
* Emitted when attachment download started. User can access basic file operations on downloaded content via the
- * passed {@link Download} instance.
+ * passed [Download](https://playwright.dev/docs/api/class-download) instance.
*/
on(event: 'download', listener: (download: Download) => any): this;
@@ -1053,7 +1153,7 @@ export interface Page {
* [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
* and
* [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
- * respectively instead of similar methods on the {@link Page}.
+ * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
*
* ```js
* // Start waiting for popup before clicking. Note no await.
@@ -1107,7 +1207,7 @@ export interface Page {
on(event: 'response', listener: (response: Response) => any): this;
/**
- * Emitted when {@link WebSocket} request is sent.
+ * Emitted when [WebSocket](https://playwright.dev/docs/api/class-websocket) request is sent.
*/
on(event: 'websocket', listener: (webSocket: WebSocket) => any): this;
@@ -1220,7 +1320,8 @@ export interface Page {
/**
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
*
- * The arguments passed into `console.log` are available on the {@link ConsoleMessage} event handler argument.
+ * The arguments passed into `console.log` are available on the
+ * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
*
* **Usage**
*
@@ -1284,7 +1385,7 @@ export interface Page {
/**
* Emitted when attachment download started. User can access basic file operations on downloaded content via the
- * passed {@link Download} instance.
+ * passed [Download](https://playwright.dev/docs/api/class-download) instance.
*/
addListener(event: 'download', listener: (download: Download) => any): this;
@@ -1351,7 +1452,7 @@ export interface Page {
* [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
* and
* [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
- * respectively instead of similar methods on the {@link Page}.
+ * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
*
* ```js
* // Start waiting for popup before clicking. Note no await.
@@ -1405,7 +1506,7 @@ export interface Page {
addListener(event: 'response', listener: (response: Response) => any): this;
/**
- * Emitted when {@link WebSocket} request is sent.
+ * Emitted when [WebSocket](https://playwright.dev/docs/api/class-websocket) request is sent.
*/
addListener(event: 'websocket', listener: (webSocket: WebSocket) => any): this;
@@ -1613,7 +1714,8 @@ export interface Page {
/**
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
*
- * The arguments passed into `console.log` are available on the {@link ConsoleMessage} event handler argument.
+ * The arguments passed into `console.log` are available on the
+ * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
*
* **Usage**
*
@@ -1677,7 +1779,7 @@ export interface Page {
/**
* Emitted when attachment download started. User can access basic file operations on downloaded content via the
- * passed {@link Download} instance.
+ * passed [Download](https://playwright.dev/docs/api/class-download) instance.
*/
prependListener(event: 'download', listener: (download: Download) => any): this;
@@ -1744,7 +1846,7 @@ export interface Page {
* [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
* and
* [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
- * respectively instead of similar methods on the {@link Page}.
+ * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
*
* ```js
* // Start waiting for popup before clicking. Note no await.
@@ -1798,7 +1900,7 @@ export interface Page {
prependListener(event: 'response', listener: (response: Response) => any): this;
/**
- * Emitted when {@link WebSocket} request is sent.
+ * Emitted when [WebSocket](https://playwright.dev/docs/api/class-websocket) request is sent.
*/
prependListener(event: 'websocket', listener: (webSocket: WebSocket) => any): this;
@@ -1826,7 +1928,8 @@ export interface Page {
* handler is only called when you perform an action/assertion - if the overlay becomes visible but you don't
* perform any actions, the handler will not be triggered.
* - After executing the handler, Playwright will ensure that overlay that triggered the handler is not visible
- * anymore. You can opt-out of this behavior with `noWaitAfter`.
+ * anymore. You can opt-out of this behavior with
+ * [`noWaitAfter`](https://playwright.dev/docs/api/class-page#page-add-locator-handler-option-no-wait-after).
* - The execution time of the handler counts towards the timeout of the action/assertion that executed the handler.
* If your handler takes too long, it might cause timeouts.
* - You can register multiple handlers. However, only a single handler will be running at a time. Make sure the
@@ -1876,8 +1979,9 @@ export interface Page {
* ```
*
* An example with a custom callback on every actionability check. It uses a `<body>` locator that is always visible,
- * so the handler is called before every actionability check. It is important to specify `noWaitAfter`, because the
- * handler does not hide the `<body>` element.
+ * so the handler is called before every actionability check. It is important to specify
+ * [`noWaitAfter`](https://playwright.dev/docs/api/class-page#page-add-locator-handler-option-no-wait-after), because
+ * the handler does not hide the `<body>` element.
*
* ```js
* // Setup the handler.
@@ -1891,7 +1995,7 @@ export interface Page {
* ```
*
* Handler takes the original locator as an argument. You can also automatically remove the handler after a number of
- * invocations by setting `times`:
+ * invocations by setting [`times`](https://playwright.dev/docs/api/class-page#page-add-locator-handler-option-times):
*
* ```js
* await page.addLocatorHandler(page.getByLabel('Close'), async locator => {
@@ -1900,8 +2004,9 @@ export interface Page {
* ```
*
* @param locator Locator that triggers the handler.
- * @param handler Function that should be run once `locator` appears. This function should get rid of the element that blocks actions
- * like click.
+ * @param handler Function that should be run once
+ * [`locator`](https://playwright.dev/docs/api/class-page#page-add-locator-handler-option-locator) appears. This
+ * function should get rid of the element that blocks actions like click.
* @param options
*/
addLocatorHandler(locator: Locator, handler: ((locator: Locator) => Promise<any>), options?: {
@@ -1979,19 +2084,24 @@ export interface Page {
* **NOTE** Use locator-based [locator.check([options])](https://playwright.dev/docs/api/class-locator#locator-check) instead.
* Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method checks an element matching `selector` by performing the following steps:
- * 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
+ * This method checks an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-check-option-selector) by performing the following
+ * steps:
+ * 1. Find an element matching [`selector`](https://playwright.dev/docs/api/class-page#page-check-option-selector).
+ * If there is none, wait until a matching element is attached to the DOM.
* 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
* already checked, this method returns immediately.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
- * the element is detached during the checks, the whole action is retried.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-page#page-check-option-force) option is set. If the element
+ * is detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
* element.
* 1. Ensure that the element is now checked. If not, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-page#page-check-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param options
@@ -2043,17 +2153,24 @@ export interface Page {
* **NOTE** Use locator-based [locator.click([options])](https://playwright.dev/docs/api/class-locator#locator-click) instead.
* Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method clicks an element matching `selector` by performing the following steps:
- * 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
- * the element is detached during the checks, the whole action is retried.
+ * This method clicks an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-click-option-selector) by performing the following
+ * steps:
+ * 1. Find an element matching [`selector`](https://playwright.dev/docs/api/class-page#page-click-option-selector).
+ * If there is none, wait until a matching element is attached to the DOM.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-page#page-click-option-force) option is set. If the element
+ * is detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
- * element, or the specified `position`.
- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.
- *
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * element, or the specified
+ * [`position`](https://playwright.dev/docs/api/class-page#page-click-option-position).
+ * 1. Wait for initiated navigations to either succeed or fail, unless
+ * [`noWaitAfter`](https://playwright.dev/docs/api/class-page#page-click-option-no-wait-after) option is set.
+ *
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-page#page-click-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param options
@@ -2128,13 +2245,16 @@ export interface Page {
}): Promise<void>;
/**
- * If `runBeforeUnload` is `false`, does not run any unload handlers and waits for the page to be closed. If
- * `runBeforeUnload` is `true` the method will run unload handlers, but will **not** wait for the page to close.
+ * If [`runBeforeUnload`](https://playwright.dev/docs/api/class-page#page-close-option-run-before-unload) is `false`,
+ * does not run any unload handlers and waits for the page to be closed. If
+ * [`runBeforeUnload`](https://playwright.dev/docs/api/class-page#page-close-option-run-before-unload) is `true` the
+ * method will run unload handlers, but will **not** wait for the page to close.
*
* By default, `page.close()` **does not** run `beforeunload` handlers.
*
- * **NOTE** if `runBeforeUnload` is passed as true, a `beforeunload` dialog might be summoned and should be handled
- * manually via [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) event.
+ * **NOTE** if [`runBeforeUnload`](https://playwright.dev/docs/api/class-page#page-close-option-run-before-unload) is
+ * passed as true, a `beforeunload` dialog might be summoned and should be handled manually via
+ * [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) event.
* @param options
*/
close(options?: {
@@ -2164,16 +2284,23 @@ export interface Page {
* **NOTE** Use locator-based [locator.dblclick([options])](https://playwright.dev/docs/api/class-locator#locator-dblclick)
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method double clicks an element matching `selector` by performing the following steps:
- * 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
- * the element is detached during the checks, the whole action is retried.
+ * This method double clicks an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-dblclick-option-selector) by performing the following
+ * steps:
+ * 1. Find an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-dblclick-option-selector). If there is none,
+ * wait until a matching element is attached to the DOM.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-page#page-dblclick-option-force) option is set. If the
+ * element is detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the
- * element, or the specified `position`.
+ * element, or the specified
+ * [`position`](https://playwright.dev/docs/api/class-page#page-dblclick-option-position).
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-page#page-dblclick-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
*
* **NOTE** `page.dblclick()` dispatches two `click` events and a single `dblclick` event.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
@@ -2257,10 +2384,13 @@ export interface Page {
* await page.dispatchEvent('button#submit', 'click');
* ```
*
- * Under the hood, it creates an instance of an event based on the given `type`, initializes it with `eventInit`
- * properties and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.
+ * Under the hood, it creates an instance of an event based on the given
+ * [`type`](https://playwright.dev/docs/api/class-page#page-dispatch-event-option-type), initializes it with
+ * [`eventInit`](https://playwright.dev/docs/api/class-page#page-dispatch-event-option-event-init) properties and
+ * dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.
*
- * Since `eventInit` is event-specific, please refer to the events documentation for the lists of initial properties:
+ * Since [`eventInit`](https://playwright.dev/docs/api/class-page#page-dispatch-event-option-event-init) is
+ * event-specific, please refer to the events documentation for the lists of initial properties:
* - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
* - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
* - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
@@ -2440,10 +2570,15 @@ export interface Page {
}): Promise<void>;
/**
- * The method adds a function called `name` on the `window` object of every frame in the page. When called, the
- * function executes `callback` and returns a [Promise] which resolves to the return value of `callback`.
+ * The method adds a function called
+ * [`name`](https://playwright.dev/docs/api/class-page#page-expose-function-option-name) on the `window` object of
+ * every frame in the page. When called, the function executes
+ * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-function-option-callback) and returns a
+ * [Promise] which resolves to the return value of
+ * [`callback`](https://playwright.dev/docs/api/class-page#page-expose-function-option-callback).
*
- * If the `callback` returns a [Promise], it will be awaited.
+ * If the [`callback`](https://playwright.dev/docs/api/class-page#page-expose-function-option-callback) returns a
+ * [Promise], it will be awaited.
*
* See
* [browserContext.exposeFunction(name, callback)](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function)
@@ -2489,9 +2624,10 @@ export interface Page {
* **NOTE** Use locator-based [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill)
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method waits for an element matching `selector`, waits for [actionability](https://playwright.dev/docs/actionability) checks,
- * focuses the element, fills it and triggers an `input` event after filling. Note that you can pass an empty string
- * to clear the input field.
+ * This method waits for an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-fill-option-selector), waits for
+ * [actionability](https://playwright.dev/docs/actionability) checks, focuses the element, fills it and triggers an `input` event after
+ * filling. Note that you can pass an empty string to clear the input field.
*
* If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
* error. However, if the element is inside the `<label>` element that has an associated
@@ -2536,8 +2672,10 @@ export interface Page {
* **NOTE** Use locator-based [locator.focus([options])](https://playwright.dev/docs/api/class-locator#locator-focus) instead.
* Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method fetches an element with `selector` and focuses it. If there's no element matching `selector`, the
- * method waits until a matching element appears in the DOM.
+ * This method fetches an element with
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-focus-option-selector) and focuses it. If there's no
+ * element matching [`selector`](https://playwright.dev/docs/api/class-page#page-focus-option-selector), the method
+ * waits until a matching element appears in the DOM.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param options
@@ -2778,8 +2916,10 @@ export interface Page {
disabled?: boolean;
/**
- * Whether `name` is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when `name` is a
- * regular expression. Note that exact match still trims whitespace.
+ * Whether [`name`](https://playwright.dev/docs/api/class-page#page-get-by-role-option-name) is matched exactly:
+ * case-sensitive and whole-string. Defaults to false. Ignored when
+ * [`name`](https://playwright.dev/docs/api/class-page#page-get-by-role-option-name) is a regular expression. Note
+ * that exact match still trims whitespace.
*/
exact?: boolean;
@@ -2808,7 +2948,8 @@ export interface Page {
/**
* Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
- * case-insensitive and searches for a substring, use `exact` to control this behavior.
+ * case-insensitive and searches for a substring, use
+ * [`exact`](https://playwright.dev/docs/api/class-page#page-get-by-role-option-exact) to control this behavior.
*
* Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
*/
@@ -3014,7 +3155,8 @@ export interface Page {
* The method will throw an error if:
* - there's an SSL error (e.g. in case of self-signed certificates).
* - target URL is invalid.
- * - the `timeout` is exceeded during navigation.
+ * - the [`timeout`](https://playwright.dev/docs/api/class-page#page-goto-option-timeout) is exceeded during
+ * navigation.
* - the remote server does not respond or is unreachable.
* - the main resource failed to load.
*
@@ -3027,8 +3169,9 @@ export interface Page {
*
* **NOTE** Headless mode doesn't support navigation to a PDF document. See the
* [upstream issue](https://bugs.chromium.org/p/chromium/issues/detail?id=761295).
- * @param url URL to navigate page to. The url should include scheme, e.g. `https://`. When a `baseURL` via the context options
- * was provided and the passed URL is a path, it gets merged via the
+ * @param url URL to navigate page to. The url should include scheme, e.g. `https://`. When a
+ * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
+ * options was provided and the passed URL is a path, it gets merged via the
* [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
* @param options
*/
@@ -3065,16 +3208,22 @@ export interface Page {
* **NOTE** Use locator-based [locator.hover([options])](https://playwright.dev/docs/api/class-locator#locator-hover) instead.
* Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method hovers over an element matching `selector` by performing the following steps:
- * 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
- * the element is detached during the checks, the whole action is retried.
+ * This method hovers over an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-hover-option-selector) by performing the following
+ * steps:
+ * 1. Find an element matching [`selector`](https://playwright.dev/docs/api/class-page#page-hover-option-selector).
+ * If there is none, wait until a matching element is attached to the DOM.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-page#page-hover-option-force) option is set. If the element
+ * is detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the
- * element, or the specified `position`.
+ * element, or the specified
+ * [`position`](https://playwright.dev/docs/api/class-page#page-hover-option-position).
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-page#page-hover-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param options
@@ -3322,8 +3471,9 @@ export interface Page {
* **NOTE** Use locator-based [locator.isHidden([options])](https://playwright.dev/docs/api/class-locator#locator-is-hidden)
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
- * Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/docs/actionability#visible). `selector` that
- * does not match any elements is considered hidden.
+ * Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/docs/actionability#visible).
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-is-hidden-option-selector) that does not match any
+ * elements is considered hidden.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param options
@@ -3347,8 +3497,9 @@ export interface Page {
* **NOTE** Use locator-based [locator.isVisible([options])](https://playwright.dev/docs/api/class-locator#locator-is-visible)
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
- * Returns whether the element is [visible](https://playwright.dev/docs/actionability#visible). `selector` that does not match any elements
- * is considered not visible.
+ * Returns whether the element is [visible](https://playwright.dev/docs/actionability#visible).
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-is-visible-option-selector) that does not match any
+ * elements is considered not visible.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param options
@@ -3387,8 +3538,8 @@ export interface Page {
* `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
* div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.
*
- * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
- * FrameLocator}s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
+ * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
*/
has?: Locator;
@@ -3396,8 +3547,8 @@ export interface Page {
* Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
* outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.
*
- * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
- * FrameLocator}s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
+ * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
*/
hasNot?: Locator;
@@ -3432,7 +3583,8 @@ export interface Page {
* User can inspect selectors or perform manual steps while paused. Resume will continue running the original script
* from the place it was paused.
*
- * **NOTE** This method requires Playwright to be started in a headed mode, with a falsy `headless` option.
+ * **NOTE** This method requires Playwright to be started in a headed mode, with a falsy
+ * [`headless`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-headless) option.
*/
pause(): Promise<void>;
@@ -3457,8 +3609,10 @@ export interface Page {
* await page.pdf({ path: 'page.pdf' });
* ```
*
- * The `width`, `height`, and `margin` options accept values labeled with units. Unlabeled values are treated as
- * pixels.
+ * The [`width`](https://playwright.dev/docs/api/class-page#page-pdf-option-width),
+ * [`height`](https://playwright.dev/docs/api/class-page#page-pdf-option-height), and
+ * [`margin`](https://playwright.dev/docs/api/class-page#page-pdf-option-margin) options accept values labeled with
+ * units. Unlabeled values are treated as pixels.
*
* A few examples:
* - `page.pdf({width: 100})` - prints with width set to 100 pixels
@@ -3471,7 +3625,7 @@ export interface Page {
* - `cm` - centimeter
* - `mm` - millimeter
*
- * The `format` options are:
+ * The [`format`](https://playwright.dev/docs/api/class-page#page-pdf-option-format) options are:
* - `Letter`: 8.5in x 11in
* - `Legal`: 8.5in x 14in
* - `Tabloid`: 11in x 17in
@@ -3484,8 +3638,10 @@ export interface Page {
* - `A5`: 5.83in x 8.27in
* - `A6`: 4.13in x 5.83in
*
- * **NOTE** `headerTemplate` and `footerTemplate` markup have the following limitations: > 1. Script tags inside
- * templates are not evaluated. > 2. Page styles are not visible inside templates.
+ * **NOTE** [`headerTemplate`](https://playwright.dev/docs/api/class-page#page-pdf-option-header-template) and
+ * [`footerTemplate`](https://playwright.dev/docs/api/class-page#page-pdf-option-footer-template) markup have the
+ * following limitations: > 1. Script tags inside templates are not evaluated. > 2. Page styles are not visible inside
+ * templates.
* @param options
*/
pdf(options?: {
@@ -3495,12 +3651,15 @@ export interface Page {
displayHeaderFooter?: boolean;
/**
- * HTML template for the print footer. Should use the same format as the `headerTemplate`.
+ * HTML template for the print footer. Should use the same format as the
+ * [`headerTemplate`](https://playwright.dev/docs/api/class-page#page-pdf-option-header-template).
*/
footerTemplate?: string;
/**
- * Paper format. If set, takes priority over `width` or `height` options. Defaults to 'Letter'.
+ * Paper format. If set, takes priority over
+ * [`width`](https://playwright.dev/docs/api/class-page#page-pdf-option-width) or
+ * [`height`](https://playwright.dev/docs/api/class-page#page-pdf-option-height) options. Defaults to 'Letter'.
*/
format?: string;
@@ -3561,14 +3720,18 @@ export interface Page {
pageRanges?: string;
/**
- * The file path to save the PDF to. If `path` is a relative path, then it is resolved relative to the current working
- * directory. If no path is provided, the PDF won't be saved to the disk.
+ * The file path to save the PDF to. If [`path`](https://playwright.dev/docs/api/class-page#page-pdf-option-path) is a
+ * relative path, then it is resolved relative to the current working directory. If no path is provided, the PDF won't
+ * be saved to the disk.
*/
path?: string;
/**
- * Give any CSS `@page` size declared in the page priority over what is declared in `width` and `height` or `format`
- * options. Defaults to `false`, which will scale the content to fit the paper size.
+ * Give any CSS `@page` size declared in the page priority over what is declared in
+ * [`width`](https://playwright.dev/docs/api/class-page#page-pdf-option-width) and
+ * [`height`](https://playwright.dev/docs/api/class-page#page-pdf-option-height) or
+ * [`format`](https://playwright.dev/docs/api/class-page#page-pdf-option-format) options. Defaults to `false`, which
+ * will scale the content to fit the paper size.
*/
preferCSSPageSize?: boolean;
@@ -3601,9 +3764,10 @@ export interface Page {
* [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down) and
* [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
*
- * `key` can specify the intended
+ * [`key`](https://playwright.dev/docs/api/class-page#page-press-option-key) can specify the intended
* [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
- * to generate the text for. A superset of the `key` values can be found
+ * to generate the text for. A superset of the
+ * [`key`](https://playwright.dev/docs/api/class-page#page-press-option-key) values can be found
* [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
*
* `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
@@ -3613,10 +3777,11 @@ export interface Page {
* Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
* `ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.
*
- * Holding down `Shift` will type the text that corresponds to the `key` in the upper case.
+ * Holding down `Shift` will type the text that corresponds to the
+ * [`key`](https://playwright.dev/docs/api/class-page#page-press-option-key) in the upper case.
*
- * If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
- * texts.
+ * If [`key`](https://playwright.dev/docs/api/class-page#page-press-option-key) is a single character, it is
+ * case-sensitive, so the values `a` and `A` will generate different respective texts.
*
* Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
* specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.
@@ -3737,7 +3902,8 @@ export interface Page {
*
* **NOTE** [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) will not
* intercept requests intercepted by Service Worker. See [this](https://github.com/microsoft/playwright/issues/1090)
- * issue. We recommend disabling Service Workers when using request interception by setting `serviceWorkers` to
+ * issue. We recommend disabling Service Workers when using request interception by setting
+ * [`serviceWorkers`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-service-workers) to
* `'block'`.
*
* **NOTE** [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) will not
@@ -3785,7 +3951,8 @@ export interface Page {
* [page.unroute(url[, handler])](https://playwright.dev/docs/api/class-page#page-unroute).
*
* **NOTE** Enabling routing disables http cache.
- * @param url A glob pattern, regex pattern or predicate receiving [URL] to match while routing. When a `baseURL` via the context
+ * @param url A glob pattern, regex pattern or predicate receiving [URL] to match while routing. When a
+ * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
* options was provided and the passed URL is a path, it gets merged via the
* [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
* @param handler handler function to route the request.
@@ -3804,7 +3971,9 @@ export interface Page {
*
* Playwright will not serve requests intercepted by Service Worker from the HAR file. See
* [this](https://github.com/microsoft/playwright/issues/1090) issue. We recommend disabling Service Workers when
- * using request interception by setting `serviceWorkers` to `'block'`.
+ * using request interception by setting
+ * [`serviceWorkers`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-service-workers) to
+ * `'block'`.
* @param har Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerecorded network data. If `path` is a
* relative path, then it is resolved relative to the current working directory.
* @param options
@@ -3854,8 +4023,8 @@ export interface Page {
*
* **Usage**
*
- * Below is an example of a simple handler that blocks some websocket messages. See {@link WebSocketRoute} for more
- * details and examples.
+ * Below is an example of a simple handler that blocks some websocket messages. See
+ * [WebSocketRoute](https://playwright.dev/docs/api/class-websocketroute) for more details and examples.
*
* ```js
* await page.routeWebSocket('/ws', async ws => {
@@ -3869,7 +4038,7 @@ export interface Page {
* ```
*
* @param url Only WebSockets with the url matching this pattern will be routed. A string pattern can be relative to the
- * `baseURL` context option.
+ * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) context option.
* @param handler Handler function to route the WebSocket.
*/
routeWebSocket(url: string|RegExp|((url: URL) => boolean), handler: ((websocketroute: WebSocketRoute) => Promise<any>|any)): Promise<void>;
@@ -3885,8 +4054,10 @@ export interface Page {
* [locator.selectOption(values[, options])](https://playwright.dev/docs/api/class-locator#locator-select-option)
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method waits for an element matching `selector`, waits for [actionability](https://playwright.dev/docs/actionability) checks, waits
- * until all specified options are present in the `<select>` element and selects these options.
+ * This method waits for an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-select-option-option-selector), waits for
+ * [actionability](https://playwright.dev/docs/actionability) checks, waits until all specified options are present in the `<select>`
+ * element and selects these options.
*
* If the target element is not a `<select>` element, this method throws an error. However, if the element is inside
* the `<label>` element that has an associated
@@ -3980,19 +4151,25 @@ export interface Page {
* [locator.setChecked(checked[, options])](https://playwright.dev/docs/api/class-locator#locator-set-checked)
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method checks or unchecks an element matching `selector` by performing the following steps:
- * 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
+ * This method checks or unchecks an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-set-checked-option-selector) by performing the
+ * following steps:
+ * 1. Find an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-set-checked-option-selector). If there is none,
+ * wait until a matching element is attached to the DOM.
* 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws.
* 1. If the element already has the right checked state, this method returns immediately.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
- * the element is detached during the checks, the whole action is retried.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-page#page-set-checked-option-force) option is set. If the
+ * element is detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
* element.
* 1. Ensure that the element is now checked or unchecked. If not, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-page#page-set-checked-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param checked Whether to check or uncheck the checkbox.
@@ -4092,7 +4269,8 @@ export interface Page {
setDefaultNavigationTimeout(timeout: number): void;
/**
- * This setting will change the default maximum time for all the methods accepting `timeout` option.
+ * This setting will change the default maximum time for all the methods accepting
+ * [`timeout`](https://playwright.dev/docs/api/class-page#page-set-default-timeout-option-timeout) option.
*
* **NOTE**
* [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout)
@@ -4121,9 +4299,9 @@ export interface Page {
* they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs
* with a `[webkitdirectory]` attribute, only a single directory path is supported.
*
- * This method expects `selector` to point to an
- * [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside
- * the `<label>` element that has an associated
+ * This method expects [`selector`](https://playwright.dev/docs/api/class-page#page-set-input-files-option-selector)
+ * to point to an [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the
+ * element is inside the `<label>` element that has an associated
* [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
@@ -4224,19 +4402,25 @@ export interface Page {
* **NOTE** Use locator-based [locator.tap([options])](https://playwright.dev/docs/api/class-locator#locator-tap) instead. Read
* more about [locators](https://playwright.dev/docs/locators).
*
- * This method taps an element matching `selector` by performing the following steps:
- * 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
- * the element is detached during the checks, the whole action is retried.
+ * This method taps an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-tap-option-selector) by performing the following
+ * steps:
+ * 1. Find an element matching [`selector`](https://playwright.dev/docs/api/class-page#page-tap-option-selector).
+ * If there is none, wait until a matching element is attached to the DOM.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-page#page-tap-option-force) option is set. If the element is
+ * detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the
- * element, or the specified `position`.
+ * element, or the specified [`position`](https://playwright.dev/docs/api/class-page#page-tap-option-position).
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-page#page-tap-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
*
* **NOTE** [page.tap(selector[, options])](https://playwright.dev/docs/api/class-page#page-tap) the method will throw
- * if `hasTouch` option of the browser context is false.
+ * if [`hasTouch`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-has-touch) option of the
+ * browser context is false.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param options
@@ -4373,19 +4557,25 @@ export interface Page {
* **NOTE** Use locator-based [locator.uncheck([options])](https://playwright.dev/docs/api/class-locator#locator-uncheck)
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method unchecks an element matching `selector` by performing the following steps:
- * 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
+ * This method unchecks an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-uncheck-option-selector) by performing the following
+ * steps:
+ * 1. Find an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-page#page-uncheck-option-selector). If there is none, wait
+ * until a matching element is attached to the DOM.
* 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
* already unchecked, this method returns immediately.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
- * the element is detached during the checks, the whole action is retried.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-page#page-uncheck-option-force) option is set. If the element
+ * is detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
* element.
* 1. Ensure that the element is now unchecked. If not, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-page#page-uncheck-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param options
@@ -4435,8 +4625,9 @@ export interface Page {
/**
* Removes a route created with
- * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route). When `handler` is not
- * specified, removes all routes for the `url`.
+ * [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route). When
+ * [`handler`](https://playwright.dev/docs/api/class-page#page-unroute-option-handler) is not specified, removes all
+ * routes for the [`url`](https://playwright.dev/docs/api/class-page#page-unroute-option-url).
* @param url A glob pattern, regex pattern or predicate receiving [URL] to match while routing.
* @param handler Optional handler function to route the request.
*/
@@ -4487,7 +4678,8 @@ export interface Page {
/**
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
*
- * The arguments passed into `console.log` are available on the {@link ConsoleMessage} event handler argument.
+ * The arguments passed into `console.log` are available on the
+ * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
*
* **Usage**
*
@@ -4551,7 +4743,7 @@ export interface Page {
/**
* Emitted when attachment download started. User can access basic file operations on downloaded content via the
- * passed {@link Download} instance.
+ * passed [Download](https://playwright.dev/docs/api/class-download) instance.
*/
waitForEvent(event: 'download', optionsOrPredicate?: { predicate?: (download: Download) => boolean | Promise<boolean>, timeout?: number } | ((download: Download) => boolean | Promise<boolean>)): Promise<Download>;
@@ -4618,7 +4810,7 @@ export interface Page {
* [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
* and
* [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
- * respectively instead of similar methods on the {@link Page}.
+ * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
*
* ```js
* // Start waiting for popup before clicking. Note no await.
@@ -4672,7 +4864,7 @@ export interface Page {
waitForEvent(event: 'response', optionsOrPredicate?: { predicate?: (response: Response) => boolean | Promise<boolean>, timeout?: number } | ((response: Response) => boolean | Promise<boolean>)): Promise<Response>;
/**
- * Emitted when {@link WebSocket} request is sent.
+ * Emitted when [WebSocket](https://playwright.dev/docs/api/class-websocket) request is sent.
*/
waitForEvent(event: 'websocket', optionsOrPredicate?: { predicate?: (webSocket: WebSocket) => boolean | Promise<boolean>, timeout?: number } | ((webSocket: WebSocket) => boolean | Promise<boolean>)): Promise<WebSocket>;
@@ -4802,7 +4994,7 @@ export interface Page {
* const request = await requestPromise;
* ```
*
- * @param urlOrPredicate Request URL string, regex or predicate receiving {@link Request} object.
+ * @param urlOrPredicate Request URL string, regex or predicate receiving [Request](https://playwright.dev/docs/api/class-request) object.
* @param options
*/
waitForRequest(urlOrPredicate: string|RegExp|((request: Request) => boolean|Promise<boolean>), options?: {
@@ -4835,8 +5027,9 @@ export interface Page {
* const response = await responsePromise;
* ```
*
- * @param urlOrPredicate Request URL string, regex or predicate receiving {@link Response} object. When a `baseURL` via the context options
- * was provided and the passed URL is a path, it gets merged via the
+ * @param urlOrPredicate Request URL string, regex or predicate receiving [Response](https://playwright.dev/docs/api/class-response) object.
+ * When a [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the
+ * context options was provided and the passed URL is a path, it gets merged via the
* [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
* @param options
*/
@@ -4851,10 +5044,11 @@ export interface Page {
}): Promise<Response>;
/**
- * **NOTE** Never wait for timeout in production. Tests that wait for time are inherently flaky. Use {@link Locator} actions
- * and web assertions that wait automatically.
+ * **NOTE** Never wait for timeout in production. Tests that wait for time are inherently flaky. Use
+ * [Locator](https://playwright.dev/docs/api/class-locator) actions and web assertions that wait automatically.
*
- * Waits for the given `timeout` in milliseconds.
+ * Waits for the given [`timeout`](https://playwright.dev/docs/api/class-page#page-wait-for-timeout-option-timeout) in
+ * milliseconds.
*
* Note that `page.waitForTimeout()` should only be used for debugging. Tests using the timer in production are going
* to be flaky. Use signals such as network events, selectors becoming visible and others instead.
@@ -4931,7 +5125,8 @@ export interface Page {
/**
* **NOTE** Only available for Chromium atm.
*
- * Browser-specific Coverage implementation. See {@link Coverage} for more details.
+ * Browser-specific Coverage implementation. See [Coverage](https://playwright.dev/docs/api/class-coverage) for more
+ * details.
*/
coverage: Coverage;
@@ -4958,7 +5153,8 @@ export interface Page {
* [page.mainFrame()](https://playwright.dev/docs/api/class-page#page-main-frame) and
* [frame.childFrames()](https://playwright.dev/docs/api/class-frame#frame-child-frames) methods.
*
- * {@link Frame} object's lifecycle is controlled by three events, dispatched on the page object:
+ * [Frame](https://playwright.dev/docs/api/class-frame) object's lifecycle is controlled by three events, dispatched
+ * on the page object:
* - [page.on('frameattached')](https://playwright.dev/docs/api/class-page#page-event-frame-attached) - fired when
* the frame gets attached to the page. A Frame can be attached to the page only once.
* - [page.on('framenavigated')](https://playwright.dev/docs/api/class-page#page-event-frame-navigated) - fired when
@@ -4989,7 +5185,8 @@ export interface Page {
*/
export interface Frame {
/**
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
*
* If the function passed to the
* [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns a
@@ -5018,7 +5215,7 @@ export interface Frame {
* console.log(await frame.evaluate('1 + 2')); // prints "3"
* ```
*
- * {@link ElementHandle} instances can be passed as an argument to the
+ * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
* [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate):
*
* ```js
@@ -5030,11 +5227,13 @@ export interface Frame {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
*/
evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<R>;
/**
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
*
* If the function passed to the
* [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns a
@@ -5063,7 +5262,7 @@ export interface Frame {
* console.log(await frame.evaluate('1 + 2')); // prints "3"
* ```
*
- * {@link ElementHandle} instances can be passed as an argument to the
+ * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
* [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate):
*
* ```js
@@ -5075,18 +5274,21 @@ export interface Frame {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
*/
evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
/**
- * Returns the return value of `pageFunction` as a {@link JSHandle}.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression) as a
+ * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* The only difference between
* [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) and
* [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle) is
* that [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
- * returns {@link JSHandle}.
+ * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* If the function, passed to the
* [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle),
@@ -5107,7 +5309,7 @@ export interface Frame {
* const aHandle = await frame.evaluateHandle('document'); // Handle for the 'document'.
* ```
*
- * {@link JSHandle} instances can be passed as an argument to the
+ * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
* [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle):
*
* ```js
@@ -5120,17 +5322,20 @@ export interface Frame {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression).
*/
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
/**
- * Returns the return value of `pageFunction` as a {@link JSHandle}.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression) as a
+ * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* The only difference between
* [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) and
* [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle) is
* that [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
- * returns {@link JSHandle}.
+ * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* If the function, passed to the
* [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle),
@@ -5151,7 +5356,7 @@ export interface Frame {
* const aHandle = await frame.evaluateHandle('document'); // Handle for the 'document'.
* ```
*
- * {@link JSHandle} instances can be passed as an argument to the
+ * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
* [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle):
*
* ```js
@@ -5164,7 +5369,8 @@ export interface Frame {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression).
*/
evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<SmartHandle<R>>;
@@ -5174,8 +5380,8 @@ export interface Frame {
*
* Returns the ElementHandle pointing to the frame element.
*
- * **NOTE** The use of {@link ElementHandle} is discouraged, use {@link Locator} objects and web-first assertions
- * instead.
+ * **NOTE** The use of [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) is discouraged, use
+ * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions instead.
*
* The method finds an element matching the specified selector within the frame. If no elements match the selector,
* returns `null`.
@@ -5189,8 +5395,8 @@ export interface Frame {
*
* Returns the ElementHandle pointing to the frame element.
*
- * **NOTE** The use of {@link ElementHandle} is discouraged, use {@link Locator} objects and web-first assertions
- * instead.
+ * **NOTE** The use of [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) is discouraged, use
+ * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions instead.
*
* The method finds an element matching the specified selector within the frame. If no elements match the selector,
* returns `null`.
@@ -5205,7 +5411,8 @@ export interface Frame {
*
* Returns the ElementHandles pointing to the frame elements.
*
- * **NOTE** The use of {@link ElementHandle} is discouraged, use {@link Locator} objects instead.
+ * **NOTE** The use of [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) is discouraged, use
+ * [Locator](https://playwright.dev/docs/api/class-locator) objects instead.
*
* The method finds all elements matching the specified selector within the frame. If no elements match the selector,
* returns empty array.
@@ -5218,7 +5425,8 @@ export interface Frame {
*
* Returns the ElementHandles pointing to the frame elements.
*
- * **NOTE** The use of {@link ElementHandle} is discouraged, use {@link Locator} objects instead.
+ * **NOTE** The use of [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) is discouraged, use
+ * [Locator](https://playwright.dev/docs/api/class-locator) objects instead.
*
* The method finds all elements matching the specified selector within the frame. If no elements match the selector,
* returns empty array.
@@ -5230,14 +5438,17 @@ export interface Frame {
* **NOTE** This method does not wait for the element to pass the actionability checks and therefore can lead to the flaky
* tests. Use
* [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
- * other {@link Locator} helper methods or web-first assertions instead.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
*
* The method finds an element matching the specified selector within the frame and passes it as a first argument to
- * `pageFunction`. If no elements match the selector, the method throws an error.
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression). If no
+ * elements match the selector, the method throws an error.
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression) returns a
+ * [Promise], then
* [frame.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector)
* would wait for the promise to resolve and return its value.
*
@@ -5251,7 +5462,8 @@ export interface Frame {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
* @param options
*/
$eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], Arg, R>, arg: Arg): Promise<R>;
@@ -5259,14 +5471,17 @@ export interface Frame {
* **NOTE** This method does not wait for the element to pass the actionability checks and therefore can lead to the flaky
* tests. Use
* [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
- * other {@link Locator} helper methods or web-first assertions instead.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
*
* The method finds an element matching the specified selector within the frame and passes it as a first argument to
- * `pageFunction`. If no elements match the selector, the method throws an error.
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression). If no
+ * elements match the selector, the method throws an error.
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression) returns a
+ * [Promise], then
* [frame.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector)
* would wait for the promise to resolve and return its value.
*
@@ -5280,7 +5495,8 @@ export interface Frame {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
* @param options
*/
$eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg): Promise<R>;
@@ -5288,14 +5504,17 @@ export interface Frame {
* **NOTE** This method does not wait for the element to pass the actionability checks and therefore can lead to the flaky
* tests. Use
* [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
- * other {@link Locator} helper methods or web-first assertions instead.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
*
* The method finds an element matching the specified selector within the frame and passes it as a first argument to
- * `pageFunction`. If no elements match the selector, the method throws an error.
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression). If no
+ * elements match the selector, the method throws an error.
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression) returns a
+ * [Promise], then
* [frame.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector)
* would wait for the promise to resolve and return its value.
*
@@ -5309,7 +5528,8 @@ export interface Frame {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
* @param options
*/
$eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], void, R>, arg?: any): Promise<R>;
@@ -5317,14 +5537,17 @@ export interface Frame {
* **NOTE** This method does not wait for the element to pass the actionability checks and therefore can lead to the flaky
* tests. Use
* [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
- * other {@link Locator} helper methods or web-first assertions instead.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
*
* The method finds an element matching the specified selector within the frame and passes it as a first argument to
- * `pageFunction`. If no elements match the selector, the method throws an error.
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression). If no
+ * elements match the selector, the method throws an error.
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression) returns a
+ * [Promise], then
* [frame.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector)
* would wait for the promise to resolve and return its value.
*
@@ -5338,7 +5561,8 @@ export interface Frame {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-option-expression).
* @param options
*/
$eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, void, R>, arg?: any): Promise<R>;
@@ -5346,14 +5570,18 @@ export interface Frame {
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other {@link Locator} helper methods and web-first assertions do a better job.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
+ * job.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
*
* The method finds all elements matching the specified selector within the frame and passes an array of matched
- * elements as a first argument to `pageFunction`.
+ * elements as a first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression)
+ * returns a [Promise], then
* [frame.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all)
* would wait for the promise to resolve and return its value.
*
@@ -5365,20 +5593,25 @@ export interface Frame {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
*/
$$eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], Arg, R>, arg: Arg): Promise<R>;
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other {@link Locator} helper methods and web-first assertions do a better job.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
+ * job.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
*
* The method finds all elements matching the specified selector within the frame and passes an array of matched
- * elements as a first argument to `pageFunction`.
+ * elements as a first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression)
+ * returns a [Promise], then
* [frame.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all)
* would wait for the promise to resolve and return its value.
*
@@ -5390,20 +5623,25 @@ export interface Frame {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
*/
$$eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], Arg, R>, arg: Arg): Promise<R>;
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other {@link Locator} helper methods and web-first assertions do a better job.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
+ * job.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
*
* The method finds all elements matching the specified selector within the frame and passes an array of matched
- * elements as a first argument to `pageFunction`.
+ * elements as a first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression)
+ * returns a [Promise], then
* [frame.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all)
* would wait for the promise to resolve and return its value.
*
@@ -5415,20 +5653,25 @@ export interface Frame {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
*/
$$eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], void, R>, arg?: any): Promise<R>;
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other {@link Locator} helper methods and web-first assertions do a better job.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
+ * job.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
*
* The method finds all elements matching the specified selector within the frame and passes an array of matched
- * elements as a first argument to `pageFunction`.
+ * elements as a first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
*
- * If `pageFunction` returns a [Promise], then
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression)
+ * returns a [Promise], then
* [frame.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all)
* would wait for the promise to resolve and return its value.
*
@@ -5440,12 +5683,15 @@ export interface Frame {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-eval-on-selector-all-option-expression).
*/
$$eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], void, R>, arg?: any): Promise<R>;
/**
- * Returns when the `pageFunction` returns a truthy value, returns that value.
+ * Returns when the
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-wait-for-function-option-expression) returns a
+ * truthy value, returns that value.
*
* **Usage**
*
@@ -5474,12 +5720,15 @@ export interface Frame {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-wait-for-function-option-expression).
* @param options
*/
waitForFunction<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, options?: PageWaitForFunctionOptions): Promise<SmartHandle<R>>;
/**
- * Returns when the `pageFunction` returns a truthy value, returns that value.
+ * Returns when the
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-wait-for-function-option-expression) returns a
+ * truthy value, returns that value.
*
* **Usage**
*
@@ -5508,7 +5757,8 @@ export interface Frame {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-wait-for-function-option-expression).
* @param options
*/
waitForFunction<R>(pageFunction: PageFunction<void, R>, arg?: any, options?: PageWaitForFunctionOptions): Promise<SmartHandle<R>>;
@@ -5518,15 +5768,21 @@ export interface Frame {
* [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
* about [locators](https://playwright.dev/docs/locators).
*
- * Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
- * `detached`.
+ * Returns when element specified by selector satisfies
+ * [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option. Returns `null`
+ * if waiting for `hidden` or `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using {@link Locator}
- * objects and web-first assertions make the code wait-for-selector-free.
+ * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
+ * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions make the code
+ * wait-for-selector-free.
*
- * Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
- * at the moment of calling the method `selector` already satisfies the condition, the method will return immediately.
- * If the selector doesn't satisfy the condition for the `timeout` milliseconds, the function will throw.
+ * Wait for the [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) to
+ * satisfy [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option (either
+ * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) already satisfies
+ * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
+ * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-timeout) milliseconds, the
+ * function will throw.
*
* **Usage**
*
@@ -5556,15 +5812,21 @@ export interface Frame {
* [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
* about [locators](https://playwright.dev/docs/locators).
*
- * Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
- * `detached`.
+ * Returns when element specified by selector satisfies
+ * [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option. Returns `null`
+ * if waiting for `hidden` or `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using {@link Locator}
- * objects and web-first assertions make the code wait-for-selector-free.
+ * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
+ * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions make the code
+ * wait-for-selector-free.
*
- * Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
- * at the moment of calling the method `selector` already satisfies the condition, the method will return immediately.
- * If the selector doesn't satisfy the condition for the `timeout` milliseconds, the function will throw.
+ * Wait for the [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) to
+ * satisfy [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option (either
+ * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) already satisfies
+ * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
+ * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-timeout) milliseconds, the
+ * function will throw.
*
* **Usage**
*
@@ -5594,15 +5856,21 @@ export interface Frame {
* [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
* about [locators](https://playwright.dev/docs/locators).
*
- * Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
- * `detached`.
+ * Returns when element specified by selector satisfies
+ * [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option. Returns `null`
+ * if waiting for `hidden` or `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using {@link Locator}
- * objects and web-first assertions make the code wait-for-selector-free.
+ * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
+ * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions make the code
+ * wait-for-selector-free.
*
- * Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
- * at the moment of calling the method `selector` already satisfies the condition, the method will return immediately.
- * If the selector doesn't satisfy the condition for the `timeout` milliseconds, the function will throw.
+ * Wait for the [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) to
+ * satisfy [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option (either
+ * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) already satisfies
+ * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
+ * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-timeout) milliseconds, the
+ * function will throw.
*
* **Usage**
*
@@ -5632,15 +5900,21 @@ export interface Frame {
* [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead. Read more
* about [locators](https://playwright.dev/docs/locators).
*
- * Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
- * `detached`.
+ * Returns when element specified by selector satisfies
+ * [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option. Returns `null`
+ * if waiting for `hidden` or `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using {@link Locator}
- * objects and web-first assertions make the code wait-for-selector-free.
+ * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using
+ * [Locator](https://playwright.dev/docs/api/class-locator) objects and web-first assertions make the code
+ * wait-for-selector-free.
*
- * Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
- * at the moment of calling the method `selector` already satisfies the condition, the method will return immediately.
- * If the selector doesn't satisfy the condition for the `timeout` milliseconds, the function will throw.
+ * Wait for the [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) to
+ * satisfy [`state`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-state) option (either
+ * appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-selector) already satisfies
+ * the condition, the method will return immediately. If the selector doesn't satisfy the condition for the
+ * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-wait-for-selector-option-timeout) milliseconds, the
+ * function will throw.
*
* **Usage**
*
@@ -5724,19 +5998,25 @@ export interface Frame {
* **NOTE** Use locator-based [locator.check([options])](https://playwright.dev/docs/api/class-locator#locator-check) instead.
* Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method checks an element matching `selector` by performing the following steps:
- * 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
+ * This method checks an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-check-option-selector) by performing the following
+ * steps:
+ * 1. Find an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-check-option-selector). If there is none, wait
+ * until a matching element is attached to the DOM.
* 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
* already checked, this method returns immediately.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
- * the element is detached during the checks, the whole action is retried.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-frame#frame-check-option-force) option is set. If the element
+ * is detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
* element.
* 1. Ensure that the element is now checked. If not, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-check-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param options
@@ -5790,17 +6070,25 @@ export interface Frame {
* **NOTE** Use locator-based [locator.click([options])](https://playwright.dev/docs/api/class-locator#locator-click) instead.
* Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method clicks an element matching `selector` by performing the following steps:
- * 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
- * the element is detached during the checks, the whole action is retried.
+ * This method clicks an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-click-option-selector) by performing the following
+ * steps:
+ * 1. Find an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-click-option-selector). If there is none, wait
+ * until a matching element is attached to the DOM.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-frame#frame-click-option-force) option is set. If the element
+ * is detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
- * element, or the specified `position`.
- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.
- *
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * element, or the specified
+ * [`position`](https://playwright.dev/docs/api/class-frame#frame-click-option-position).
+ * 1. Wait for initiated navigations to either succeed or fail, unless
+ * [`noWaitAfter`](https://playwright.dev/docs/api/class-frame#frame-click-option-no-wait-after) option is set.
+ *
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-click-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param options
@@ -5883,17 +6171,24 @@ export interface Frame {
* **NOTE** Use locator-based [locator.dblclick([options])](https://playwright.dev/docs/api/class-locator#locator-dblclick)
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method double clicks an element matching `selector` by performing the following steps:
- * 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
- * the element is detached during the checks, the whole action is retried.
+ * This method double clicks an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-dblclick-option-selector) by performing the
+ * following steps:
+ * 1. Find an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-dblclick-option-selector). If there is none,
+ * wait until a matching element is attached to the DOM.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-frame#frame-dblclick-option-force) option is set. If the
+ * element is detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the
- * element, or the specified `position`. if the first click of the `dblclick()` triggers a navigation event,
- * this method will throw.
+ * element, or the specified
+ * [`position`](https://playwright.dev/docs/api/class-frame#frame-dblclick-option-position). if the first click
+ * of the `dblclick()` triggers a navigation event, this method will throw.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-dblclick-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
*
* **NOTE** `frame.dblclick()` dispatches two `click` events and a single `dblclick` event.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
@@ -5977,10 +6272,13 @@ export interface Frame {
* await frame.dispatchEvent('button#submit', 'click');
* ```
*
- * Under the hood, it creates an instance of an event based on the given `type`, initializes it with `eventInit`
- * properties and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.
+ * Under the hood, it creates an instance of an event based on the given
+ * [`type`](https://playwright.dev/docs/api/class-frame#frame-dispatch-event-option-type), initializes it with
+ * [`eventInit`](https://playwright.dev/docs/api/class-frame#frame-dispatch-event-option-event-init) properties and
+ * dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.
*
- * Since `eventInit` is event-specific, please refer to the events documentation for the lists of initial properties:
+ * Since [`eventInit`](https://playwright.dev/docs/api/class-frame#frame-dispatch-event-option-event-init) is
+ * event-specific, please refer to the events documentation for the lists of initial properties:
* - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
* - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
* - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
@@ -6086,9 +6384,10 @@ export interface Frame {
* **NOTE** Use locator-based [locator.fill(value[, options])](https://playwright.dev/docs/api/class-locator#locator-fill)
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method waits for an element matching `selector`, waits for [actionability](https://playwright.dev/docs/actionability) checks,
- * focuses the element, fills it and triggers an `input` event after filling. Note that you can pass an empty string
- * to clear the input field.
+ * This method waits for an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-fill-option-selector), waits for
+ * [actionability](https://playwright.dev/docs/actionability) checks, focuses the element, fills it and triggers an `input` event after
+ * filling. Note that you can pass an empty string to clear the input field.
*
* If the target element is not an `<input>`, `<textarea>` or `[contenteditable]` element, this method throws an
* error. However, if the element is inside the `<label>` element that has an associated
@@ -6133,8 +6432,10 @@ export interface Frame {
* **NOTE** Use locator-based [locator.focus([options])](https://playwright.dev/docs/api/class-locator#locator-focus) instead.
* Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method fetches an element with `selector` and focuses it. If there's no element matching `selector`, the
- * method waits until a matching element appears in the DOM.
+ * This method fetches an element with
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-focus-option-selector) and focuses it. If there's no
+ * element matching [`selector`](https://playwright.dev/docs/api/class-frame#frame-focus-option-selector), the method
+ * waits until a matching element appears in the DOM.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param options
@@ -6363,8 +6664,10 @@ export interface Frame {
disabled?: boolean;
/**
- * Whether `name` is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when `name` is a
- * regular expression. Note that exact match still trims whitespace.
+ * Whether [`name`](https://playwright.dev/docs/api/class-frame#frame-get-by-role-option-name) is matched exactly:
+ * case-sensitive and whole-string. Defaults to false. Ignored when
+ * [`name`](https://playwright.dev/docs/api/class-frame#frame-get-by-role-option-name) is a regular expression. Note
+ * that exact match still trims whitespace.
*/
exact?: boolean;
@@ -6393,7 +6696,8 @@ export interface Frame {
/**
* Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
- * case-insensitive and searches for a substring, use `exact` to control this behavior.
+ * case-insensitive and searches for a substring, use
+ * [`exact`](https://playwright.dev/docs/api/class-frame#frame-get-by-role-option-exact) to control this behavior.
*
* Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
*/
@@ -6539,7 +6843,8 @@ export interface Frame {
* The method will throw an error if:
* - there's an SSL error (e.g. in case of self-signed certificates).
* - target URL is invalid.
- * - the `timeout` is exceeded during navigation.
+ * - the [`timeout`](https://playwright.dev/docs/api/class-frame#frame-goto-option-timeout) is exceeded during
+ * navigation.
* - the remote server does not respond or is unreachable.
* - the main resource failed to load.
*
@@ -6588,16 +6893,23 @@ export interface Frame {
* **NOTE** Use locator-based [locator.hover([options])](https://playwright.dev/docs/api/class-locator#locator-hover) instead.
* Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method hovers over an element matching `selector` by performing the following steps:
- * 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
- * the element is detached during the checks, the whole action is retried.
+ * This method hovers over an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-hover-option-selector) by performing the following
+ * steps:
+ * 1. Find an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-hover-option-selector). If there is none, wait
+ * until a matching element is attached to the DOM.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-frame#frame-hover-option-force) option is set. If the element
+ * is detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the
- * element, or the specified `position`.
+ * element, or the specified
+ * [`position`](https://playwright.dev/docs/api/class-frame#frame-hover-option-position).
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-hover-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param options
@@ -6842,8 +7154,9 @@ export interface Frame {
* **NOTE** Use locator-based [locator.isHidden([options])](https://playwright.dev/docs/api/class-locator#locator-is-hidden)
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
- * Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/docs/actionability#visible). `selector` that
- * does not match any elements is considered hidden.
+ * Returns whether the element is hidden, the opposite of [visible](https://playwright.dev/docs/actionability#visible).
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-is-hidden-option-selector) that does not match any
+ * elements is considered hidden.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param options
@@ -6867,8 +7180,9 @@ export interface Frame {
* **NOTE** Use locator-based [locator.isVisible([options])](https://playwright.dev/docs/api/class-locator#locator-is-visible)
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
- * Returns whether the element is [visible](https://playwright.dev/docs/actionability#visible). `selector` that does not match any elements
- * is considered not visible.
+ * Returns whether the element is [visible](https://playwright.dev/docs/actionability#visible).
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-is-visible-option-selector) that does not match any
+ * elements is considered not visible.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param options
@@ -6909,8 +7223,8 @@ export interface Frame {
* `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
* div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.
*
- * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
- * FrameLocator}s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
+ * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
*/
has?: Locator;
@@ -6918,8 +7232,8 @@ export interface Frame {
* Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
* outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.
*
- * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
- * FrameLocator}s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
+ * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
*/
hasNot?: Locator;
@@ -6961,9 +7275,10 @@ export interface Frame {
* **NOTE** Use locator-based [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press)
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
- * `key` can specify the intended
+ * [`key`](https://playwright.dev/docs/api/class-frame#frame-press-option-key) can specify the intended
* [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
- * to generate the text for. A superset of the `key` values can be found
+ * to generate the text for. A superset of the
+ * [`key`](https://playwright.dev/docs/api/class-frame#frame-press-option-key) values can be found
* [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
*
* `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
@@ -6973,10 +7288,11 @@ export interface Frame {
* Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
* `ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.
*
- * Holding down `Shift` will type the text that corresponds to the `key` in the upper case.
+ * Holding down `Shift` will type the text that corresponds to the
+ * [`key`](https://playwright.dev/docs/api/class-frame#frame-press-option-key) in the upper case.
*
- * If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
- * texts.
+ * If [`key`](https://playwright.dev/docs/api/class-frame#frame-press-option-key) is a single character, it is
+ * case-sensitive, so the values `a` and `A` will generate different respective texts.
*
* Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
* specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.
@@ -7019,8 +7335,10 @@ export interface Frame {
* [locator.selectOption(values[, options])](https://playwright.dev/docs/api/class-locator#locator-select-option)
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method waits for an element matching `selector`, waits for [actionability](https://playwright.dev/docs/actionability) checks, waits
- * until all specified options are present in the `<select>` element and selects these options.
+ * This method waits for an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-select-option-option-selector), waits for
+ * [actionability](https://playwright.dev/docs/actionability) checks, waits until all specified options are present in the `<select>`
+ * element and selects these options.
*
* If the target element is not a `<select>` element, this method throws an error. However, if the element is inside
* the `<label>` element that has an associated
@@ -7112,19 +7430,25 @@ export interface Frame {
* [locator.setChecked(checked[, options])](https://playwright.dev/docs/api/class-locator#locator-set-checked)
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method checks or unchecks an element matching `selector` by performing the following steps:
- * 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
+ * This method checks or unchecks an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-set-checked-option-selector) by performing the
+ * following steps:
+ * 1. Find an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-set-checked-option-selector). If there is
+ * none, wait until a matching element is attached to the DOM.
* 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws.
* 1. If the element already has the right checked state, this method returns immediately.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
- * the element is detached during the checks, the whole action is retried.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-frame#frame-set-checked-option-force) option is set. If the
+ * element is detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
* element.
* 1. Ensure that the element is now checked or unchecked. If not, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-set-checked-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param checked Whether to check or uncheck the checkbox.
@@ -7210,9 +7534,9 @@ export interface Frame {
* Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
* they are resolved relative to the current working directory. For empty array, clears the selected files.
*
- * This method expects `selector` to point to an
- * [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside
- * the `<label>` element that has an associated
+ * This method expects [`selector`](https://playwright.dev/docs/api/class-frame#frame-set-input-files-option-selector)
+ * to point to an [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the
+ * element is inside the `<label>` element that has an associated
* [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
@@ -7275,16 +7599,22 @@ export interface Frame {
* **NOTE** Use locator-based [locator.tap([options])](https://playwright.dev/docs/api/class-locator#locator-tap) instead. Read
* more about [locators](https://playwright.dev/docs/locators).
*
- * This method taps an element matching `selector` by performing the following steps:
- * 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
- * the element is detached during the checks, the whole action is retried.
+ * This method taps an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-tap-option-selector) by performing the following
+ * steps:
+ * 1. Find an element matching [`selector`](https://playwright.dev/docs/api/class-frame#frame-tap-option-selector).
+ * If there is none, wait until a matching element is attached to the DOM.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-frame#frame-tap-option-force) option is set. If the element
+ * is detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the
- * element, or the specified `position`.
+ * element, or the specified
+ * [`position`](https://playwright.dev/docs/api/class-frame#frame-tap-option-position).
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-tap-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
*
* **NOTE** `frame.tap()` requires that the `hasTouch` option of the browser context be set to true.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
@@ -7423,19 +7753,25 @@ export interface Frame {
* **NOTE** Use locator-based [locator.uncheck([options])](https://playwright.dev/docs/api/class-locator#locator-uncheck)
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
- * This method checks an element matching `selector` by performing the following steps:
- * 1. Find an element matching `selector`. If there is none, wait until a matching element is attached to the DOM.
+ * This method checks an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-uncheck-option-selector) by performing the following
+ * steps:
+ * 1. Find an element matching
+ * [`selector`](https://playwright.dev/docs/api/class-frame#frame-uncheck-option-selector). If there is none,
+ * wait until a matching element is attached to the DOM.
* 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is
* already unchecked, this method returns immediately.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
- * the element is detached during the checks, the whole action is retried.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-frame#frame-uncheck-option-force) option is set. If the
+ * element is detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
* element.
* 1. Ensure that the element is now unchecked. If not, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-frame#frame-uncheck-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param selector A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
* used.
* @param options
@@ -7579,10 +7915,11 @@ export interface Frame {
}): Promise<null|Response>;
/**
- * **NOTE** Never wait for timeout in production. Tests that wait for time are inherently flaky. Use {@link Locator} actions
- * and web assertions that wait automatically.
+ * **NOTE** Never wait for timeout in production. Tests that wait for time are inherently flaky. Use
+ * [Locator](https://playwright.dev/docs/api/class-locator) actions and web assertions that wait automatically.
*
- * Waits for the given `timeout` in milliseconds.
+ * Waits for the given [`timeout`](https://playwright.dev/docs/api/class-frame#frame-wait-for-timeout-option-timeout)
+ * in milliseconds.
*
* Note that `frame.waitForTimeout()` should only be used for debugging. Tests using the timer in production are going
* to be flaky. Use signals such as network events, selectors becoming visible and others instead.
@@ -7652,12 +7989,19 @@ export interface Frame {
*/
export interface BrowserContext {
/**
- * 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.
+ * The method adds a function called
+ * [`name`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-name) on the
+ * `window` object of every frame in every page in the context. When called, the function executes
+ * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
+ * and returns a [Promise] which resolves to the return value of
+ * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback).
+ * If the
+ * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
+ * returns a [Promise], it will be awaited.
*
- * The first argument of the `callback` function contains information about the caller: `{ browserContext:
- * BrowserContext, page: Page, frame: Frame }`.
+ * The first argument of the
+ * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
+ * function contains information about the caller: `{ browserContext: BrowserContext, page: Page, frame: Frame }`.
*
* See [page.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-page#page-expose-binding)
* for page-only version.
@@ -7693,12 +8037,19 @@ export interface BrowserContext {
*/
exposeBinding(name: string, playwrightBinding: (source: BindingSource, arg: JSHandle) => any, options: { handle: true }): Promise<void>;
/**
- * 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.
+ * The method adds a function called
+ * [`name`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-name) on the
+ * `window` object of every frame in every page in the context. When called, the function executes
+ * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
+ * and returns a [Promise] which resolves to the return value of
+ * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback).
+ * If the
+ * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
+ * returns a [Promise], it will be awaited.
*
- * The first argument of the `callback` function contains information about the caller: `{ browserContext:
- * BrowserContext, page: Page, frame: Frame }`.
+ * The first argument of the
+ * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-binding-option-callback)
+ * function contains information about the caller: `{ browserContext: BrowserContext, page: Page, frame: Frame }`.
*
* See [page.exposeBinding(name, callback[, options])](https://playwright.dev/docs/api/class-page#page-expose-binding)
* for page-only version.
@@ -7764,7 +8115,9 @@ export interface BrowserContext {
* and [page.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-page#page-add-init-script) is not
* defined.
* @param script Script to be evaluated in all pages in the browser context.
- * @param arg Optional argument to pass to `script` (only supported when passing a function).
+ * @param arg Optional argument to pass to
+ * [`script`](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-init-script-option-script)
+ * (only supported when passing a function).
*/
addInitScript<Arg>(script: PageFunction<Arg, any> | { path?: string, content?: string }, arg?: Arg): Promise<void>;
@@ -7813,8 +8166,8 @@ export interface BrowserContext {
/**
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
*
- * The arguments passed into `console.log` and the page are available on the {@link ConsoleMessage} event handler
- * argument.
+ * The arguments passed into `console.log` and the page are available on the
+ * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
*
* **Usage**
*
@@ -7865,7 +8218,7 @@ export interface BrowserContext {
* [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
* and
* [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
- * respectively instead of similar methods on the {@link Page}.
+ * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
*
* ```js
* const newPagePromise = context.waitForEvent('page');
@@ -8009,8 +8362,8 @@ export interface BrowserContext {
/**
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
*
- * The arguments passed into `console.log` and the page are available on the {@link ConsoleMessage} event handler
- * argument.
+ * The arguments passed into `console.log` and the page are available on the
+ * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
*
* **Usage**
*
@@ -8061,7 +8414,7 @@ export interface BrowserContext {
* [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
* and
* [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
- * respectively instead of similar methods on the {@link Page}.
+ * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
*
* ```js
* const newPagePromise = context.waitForEvent('page');
@@ -8260,8 +8613,8 @@ export interface BrowserContext {
/**
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
*
- * The arguments passed into `console.log` and the page are available on the {@link ConsoleMessage} event handler
- * argument.
+ * The arguments passed into `console.log` and the page are available on the
+ * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
*
* **Usage**
*
@@ -8312,7 +8665,7 @@ export interface BrowserContext {
* [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
* and
* [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
- * respectively instead of similar methods on the {@link Page}.
+ * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
*
* ```js
* const newPagePromise = context.waitForEvent('page');
@@ -8514,10 +8867,16 @@ export interface BrowserContext {
cookies(urls?: string|ReadonlyArray<string>): Promise<Array<Cookie>>;
/**
- * 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`.
+ * The method adds a function called
+ * [`name`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function-option-name) on the
+ * `window` object of every frame in every page in the context. When called, the function executes
+ * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function-option-callback)
+ * and returns a [Promise] which resolves to the return value of
+ * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function-option-callback).
*
- * If the `callback` returns a [Promise], it will be awaited.
+ * If the
+ * [`callback`](https://playwright.dev/docs/api/class-browsercontext#browser-context-expose-function-option-callback)
+ * returns a [Promise], it will be awaited.
*
* See [page.exposeFunction(name, callback)](https://playwright.dev/docs/api/class-page#page-expose-function) for
* page-only version.
@@ -8611,7 +8970,9 @@ export interface BrowserContext {
* [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
* will not intercept requests intercepted by Service Worker. See
* [this](https://github.com/microsoft/playwright/issues/1090) issue. We recommend disabling Service Workers when
- * using request interception by setting `serviceWorkers` to `'block'`.
+ * using request interception by setting
+ * [`serviceWorkers`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-service-workers) to
+ * `'block'`.
*
* **Usage**
*
@@ -8655,7 +9016,8 @@ export interface BrowserContext {
* [browserContext.unroute(url[, handler])](https://playwright.dev/docs/api/class-browsercontext#browser-context-unroute).
*
* **NOTE** Enabling routing disables http cache.
- * @param url A glob pattern, regex pattern or predicate receiving [URL] to match while routing. When a `baseURL` via the context
+ * @param url A glob pattern, regex pattern or predicate receiving [URL] to match while routing. When a
+ * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
* options was provided and the passed URL is a path, it gets merged via the
* [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
* @param handler handler function to route the request.
@@ -8674,7 +9036,9 @@ export interface BrowserContext {
*
* Playwright will not serve requests intercepted by Service Worker from the HAR file. See
* [this](https://github.com/microsoft/playwright/issues/1090) issue. We recommend disabling Service Workers when
- * using request interception by setting `serviceWorkers` to `'block'`.
+ * using request interception by setting
+ * [`serviceWorkers`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-service-workers) to
+ * `'block'`.
* @param har Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerecorded network data. If `path` is a
* relative path, then it is resolved relative to the current working directory.
* @param options
@@ -8724,8 +9088,8 @@ export interface BrowserContext {
*
* **Usage**
*
- * Below is an example of a simple handler that blocks some websocket messages. See {@link WebSocketRoute} for more
- * details and examples.
+ * Below is an example of a simple handler that blocks some websocket messages. See
+ * [WebSocketRoute](https://playwright.dev/docs/api/class-websocketroute) for more details and examples.
*
* ```js
* await context.routeWebSocket('/ws', async ws => {
@@ -8739,7 +9103,7 @@ export interface BrowserContext {
* ```
*
* @param url Only WebSockets with the url matching this pattern will be routed. A string pattern can be relative to the
- * `baseURL` context option.
+ * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) context option.
* @param handler Handler function to route the WebSocket.
*/
routeWebSocket(url: string|RegExp|((url: URL) => boolean), handler: ((websocketroute: WebSocketRoute) => Promise<any>|any)): Promise<void>;
@@ -8770,7 +9134,9 @@ export interface BrowserContext {
setDefaultNavigationTimeout(timeout: number): void;
/**
- * This setting will change the default maximum time for all the methods accepting `timeout` option.
+ * This setting will change the default maximum time for all the methods accepting
+ * [`timeout`](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout-option-timeout)
+ * option.
*
* **NOTE**
* [page.setDefaultNavigationTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout),
@@ -8848,8 +9214,10 @@ export interface BrowserContext {
*/
storageState(options?: {
/**
- * The file path to save the storage state to. If `path` is a relative path, then it is resolved relative to current
- * working directory. If no path is provided, storage state is still returned, but won't be saved to the disk.
+ * The file path to save the storage state to. If
+ * [`path`](https://playwright.dev/docs/api/class-browsercontext#browser-context-storage-state-option-path) is a
+ * relative path, then it is resolved relative to current working directory. If no path is provided, storage state is
+ * still returned, but won't be saved to the disk.
*/
path?: string;
}): Promise<{
@@ -8888,7 +9256,9 @@ export interface BrowserContext {
/**
* Removes a route created with
* [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
- * When `handler` is not specified, removes all routes for the `url`.
+ * When [`handler`](https://playwright.dev/docs/api/class-browsercontext#browser-context-unroute-option-handler) is
+ * not specified, removes all routes for the
+ * [`url`](https://playwright.dev/docs/api/class-browsercontext#browser-context-unroute-option-url).
* @param url A glob pattern, regex pattern or predicate receiving [URL] used to register a routing with
* [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
* @param handler Optional handler function used to register a routing with
@@ -8938,8 +9308,8 @@ export interface BrowserContext {
/**
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
*
- * The arguments passed into `console.log` and the page are available on the {@link ConsoleMessage} event handler
- * argument.
+ * The arguments passed into `console.log` and the page are available on the
+ * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
*
* **Usage**
*
@@ -8990,7 +9360,7 @@ export interface BrowserContext {
* [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
* and
* [browserContext.on('request')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request)
- * respectively instead of similar methods on the {@link Page}.
+ * respectively instead of similar methods on the [Page](https://playwright.dev/docs/api/class-page).
*
* ```js
* const newPagePromise = context.waitForEvent('page');
@@ -9075,7 +9445,8 @@ export interface BrowserContext {
/**
* A Browser is created via
* [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch). An example
- * of using a {@link Browser} to create a {@link Page}:
+ * of using a [Browser](https://playwright.dev/docs/api/class-browser) to create a
+ * [Page](https://playwright.dev/docs/api/class-page):
*
* ```js
* const { firefox } = require('playwright'); // Or 'chromium' or 'webkit'.
@@ -9166,11 +9537,12 @@ export interface Browser {
*
* **NOTE** This is similar to force quitting the browser. Therefore, you should call
* [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) on
- * any {@link BrowserContext}'s you explicitly created earlier with
+ * any [BrowserContext](https://playwright.dev/docs/api/class-browsercontext)'s you explicitly created earlier with
* [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) **before**
* calling [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close).
*
- * The {@link Browser} object itself is considered to be disposed and cannot be used anymore.
+ * The [Browser](https://playwright.dev/docs/api/class-browser) object itself is considered to be disposed and cannot
+ * be used anymore.
* @param options
*/
close(options?: {
@@ -9211,12 +9583,13 @@ export interface Browser {
/**
* Creates a new browser context. It won't share cookies/cache with other browser contexts.
*
- * **NOTE** If directly using this method to create {@link BrowserContext}s, it is best practice to explicitly close
+ * **NOTE** If directly using this method to create
+ * [BrowserContext](https://playwright.dev/docs/api/class-browsercontext)s, it is best practice to explicitly close
* the returned context via
* [browserContext.close([options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) when
- * your code is done with the {@link BrowserContext}, and before calling
- * [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close). This will ensure the
- * `context` is closed gracefully and any artifacts—like HARs and videos—are fully flushed and saved.
+ * your code is done with the [BrowserContext](https://playwright.dev/docs/api/class-browsercontext), and before
+ * calling [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close). This will ensure
+ * the `context` is closed gracefully and any artifacts—like HARs and videos—are fully flushed and saved.
*
* **Usage**
*
@@ -9396,10 +9769,11 @@ export interface Browser {
origin?: string;
/**
- * This option only applies to the requests sent from corresponding {@link APIRequestContext} and does not affect
- * requests sent from the browser. `'always'` - `Authorization` header with basic authentication credentials will be
- * sent with the each API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response
- * with `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
+ * This option only applies to the requests sent from corresponding
+ * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
+ * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
+ * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
+ * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
*/
send?: "unauthorized"|"always";
};
@@ -9507,8 +9881,9 @@ export interface Browser {
mode?: "full"|"minimal";
/**
- * A glob or regex pattern to filter requests that are stored in the HAR. When a `baseURL` via the context options was
- * provided and the passed URL is a path, it gets merged via the
+ * A glob or regex pattern to filter requests that are stored in the HAR. When a
+ * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
+ * options was provided and the passed URL is a path, it gets merged via the
* [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
*/
urlFilter?: string|RegExp;
@@ -9553,7 +9928,7 @@ export interface Browser {
/**
* Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the
- * `viewport` is set.
+ * [`viewport`](https://playwright.dev/docs/api/class-browser#browser-new-page-option-viewport) is set.
*/
screen?: {
/**
@@ -9634,8 +10009,8 @@ export interface Browser {
/**
* If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on
* selectors that imply single target DOM element will throw when more than one element matches the selector. This
- * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See {@link Locator} to
- * learn more about the strict mode.
+ * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See
+ * [Locator](https://playwright.dev/docs/api/class-locator) to learn more about the strict mode.
*/
strictSelectors?: boolean;
@@ -9652,7 +10027,7 @@ export interface Browser {
userAgent?: string;
/**
- * @deprecated Use `recordVideo` instead.
+ * @deprecated Use [`recordVideo`](https://playwright.dev/docs/api/class-browser#browser-new-page-option-record-video) instead.
*/
videoSize?: {
/**
@@ -9667,7 +10042,7 @@ export interface Browser {
};
/**
- * @deprecated Use `recordVideo` instead.
+ * @deprecated Use [`recordVideo`](https://playwright.dev/docs/api/class-browser#browser-new-page-option-record-video) instead.
*/
videosPath?: string;
@@ -9767,7 +10142,8 @@ export interface Browser {
*/
export interface Worker {
/**
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-option-expression).
*
* If the function passed to the
* [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) returns a
@@ -9782,11 +10158,13 @@ export interface Worker {
* `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
* `-0`, `NaN`, `Infinity`, `-Infinity`.
* @param pageFunction Function to be evaluated in the worker context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-option-expression).
*/
evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<R>;
/**
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-option-expression).
*
* If the function passed to the
* [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) returns a
@@ -9801,19 +10179,22 @@ export interface Worker {
* `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
* `-0`, `NaN`, `Infinity`, `-Infinity`.
* @param pageFunction Function to be evaluated in the worker context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-option-expression).
*/
evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
/**
- * Returns the return value of `pageFunction` as a {@link JSHandle}.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle-option-expression) as a
+ * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* The only difference between
* [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) and
* [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
* is that
* [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
- * returns {@link JSHandle}.
+ * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* If the function passed to the
* [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
@@ -9821,18 +10202,21 @@ export interface Worker {
* [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
* would wait for the promise to resolve and return its value.
* @param pageFunction Function to be evaluated in the worker context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle-option-expression).
*/
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
/**
- * Returns the return value of `pageFunction` as a {@link JSHandle}.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle-option-expression) as a
+ * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* The only difference between
* [worker.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate) and
* [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
* is that
* [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
- * returns {@link JSHandle}.
+ * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* If the function passed to the
* [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
@@ -9840,7 +10224,8 @@ export interface Worker {
* [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
* would wait for the promise to resolve and return its value.
* @param pageFunction Function to be evaluated in the worker context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle-option-expression).
*/
evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<SmartHandle<R>>;
/**
@@ -9900,12 +10285,14 @@ export interface Worker {
*/
export interface JSHandle<T = any> {
/**
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
*
- * This method passes this handle as the first argument to `pageFunction`.
+ * This method passes this handle as the first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
*
- * If `pageFunction` returns a [Promise], then `handle.evaluate` would wait for the promise to resolve and return its
- * value.
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression)
+ * returns a [Promise], then `handle.evaluate` would wait for the promise to resolve and return its value.
*
* **Usage**
*
@@ -9915,16 +10302,19 @@ export interface JSHandle<T = any> {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
*/
evaluate<R, Arg, O extends T = T>(pageFunction: PageFunctionOn<O, Arg, R>, arg: Arg): Promise<R>;
/**
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
*
- * This method passes this handle as the first argument to `pageFunction`.
+ * This method passes this handle as the first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
*
- * If `pageFunction` returns a [Promise], then `handle.evaluate` would wait for the promise to resolve and return its
- * value.
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression)
+ * returns a [Promise], then `handle.evaluate` would wait for the promise to resolve and return its value.
*
* **Usage**
*
@@ -9934,17 +10324,21 @@ export interface JSHandle<T = any> {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
*/
evaluate<R, O extends T = T>(pageFunction: PageFunctionOn<O, void, R>, arg?: any): Promise<R>;
/**
- * Returns the return value of `pageFunction` as a {@link JSHandle}.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression)
+ * as a [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
- * This method passes this handle as the first argument to `pageFunction`.
+ * This method passes this handle as the first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
*
* The only difference between `jsHandle.evaluate` and `jsHandle.evaluateHandle` is that `jsHandle.evaluateHandle`
- * returns {@link JSHandle}.
+ * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* If the function passed to the `jsHandle.evaluateHandle` returns a [Promise], then `jsHandle.evaluateHandle` would
* wait for the promise to resolve and return its value.
@@ -9952,16 +10346,20 @@ export interface JSHandle<T = any> {
* See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
* more details.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
*/
evaluateHandle<R, Arg, O extends T = T>(pageFunction: PageFunctionOn<O, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
/**
- * Returns the return value of `pageFunction` as a {@link JSHandle}.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression)
+ * as a [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
- * This method passes this handle as the first argument to `pageFunction`.
+ * This method passes this handle as the first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
*
* The only difference between `jsHandle.evaluate` and `jsHandle.evaluateHandle` is that `jsHandle.evaluateHandle`
- * returns {@link JSHandle}.
+ * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* If the function passed to the `jsHandle.evaluateHandle` returns a [Promise], then `jsHandle.evaluateHandle` would
* wait for the promise to resolve and return its value.
@@ -9969,7 +10367,8 @@ export interface JSHandle<T = any> {
* See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
* more details.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
*/
evaluateHandle<R, O extends T = T>(pageFunction: PageFunctionOn<O, void, R>, arg?: any): Promise<SmartHandle<R>>;
@@ -9981,7 +10380,8 @@ export interface JSHandle<T = any> {
*/
jsonValue(): Promise<T>;
/**
- * Returns either `null` or the object handle itself, if the object handle is an instance of {@link ElementHandle}.
+ * Returns either `null` or the object handle itself, if the object handle is an instance of
+ * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle).
*/
asElement(): T extends Node ? ElementHandle<T> : null;
/**
@@ -10015,12 +10415,13 @@ export interface JSHandle<T = any> {
}
/**
- * - extends: {@link JSHandle}
+ * - extends: [JSHandle](https://playwright.dev/docs/api/class-jshandle)
*
* ElementHandle represents an in-page DOM element. ElementHandles can be created with the
* [page.$(selector[, options])](https://playwright.dev/docs/api/class-page#page-query-selector) method.
*
- * **NOTE** The use of ElementHandle is discouraged, use {@link Locator} objects and web-first assertions instead.
+ * **NOTE** The use of ElementHandle is discouraged, use [Locator](https://playwright.dev/docs/api/class-locator)
+ * objects and web-first assertions instead.
*
* ```js
* const hrefElement = await page.$('a');
@@ -10035,8 +10436,9 @@ export interface JSHandle<T = any> {
* [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
* and [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) methods.
*
- * The difference between the {@link Locator} and ElementHandle is that the ElementHandle points to a particular
- * element, while {@link Locator} captures the logic of how to retrieve an element.
+ * The difference between the [Locator](https://playwright.dev/docs/api/class-locator) and ElementHandle is that the
+ * ElementHandle points to a particular element, while [Locator](https://playwright.dev/docs/api/class-locator)
+ * captures the logic of how to retrieve an element.
*
* In the example below, handle points to a particular DOM element on page. If that element changes text or is used by
* React to render an entirely different component, handle is still pointing to that very DOM element. This can lead
@@ -10103,14 +10505,19 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
* Use
* [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
- * other {@link Locator} helper methods or web-first assertions instead.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
*
* The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a
- * first argument to `pageFunction`. If no elements match the selector, the method throws an error.
+ * first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
+ * If no elements match the selector, the method throws an error.
*
- * If `pageFunction` returns a [Promise], then
+ * If
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression)
+ * returns a [Promise], then
* [elementHandle.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector)
* would wait for the promise to resolve and return its value.
*
@@ -10124,21 +10531,27 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
*/
$eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], Arg, R>, arg: Arg): Promise<R>;
/**
* **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
* Use
* [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
- * other {@link Locator} helper methods or web-first assertions instead.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
*
* The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a
- * first argument to `pageFunction`. If no elements match the selector, the method throws an error.
+ * first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
+ * If no elements match the selector, the method throws an error.
*
- * If `pageFunction` returns a [Promise], then
+ * If
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression)
+ * returns a [Promise], then
* [elementHandle.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector)
* would wait for the promise to resolve and return its value.
*
@@ -10152,21 +10565,27 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
*/
$eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg): Promise<R>;
/**
* **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
* Use
* [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
- * other {@link Locator} helper methods or web-first assertions instead.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
*
* The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a
- * first argument to `pageFunction`. If no elements match the selector, the method throws an error.
+ * first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
+ * If no elements match the selector, the method throws an error.
*
- * If `pageFunction` returns a [Promise], then
+ * If
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression)
+ * returns a [Promise], then
* [elementHandle.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector)
* would wait for the promise to resolve and return its value.
*
@@ -10180,21 +10599,27 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
*/
$eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K], void, R>, arg?: any): Promise<R>;
/**
* **NOTE** This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests.
* Use
* [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate),
- * other {@link Locator} helper methods or web-first assertions instead.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods or web-first assertions instead.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
*
* The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a
- * first argument to `pageFunction`. If no elements match the selector, the method throws an error.
+ * first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
+ * If no elements match the selector, the method throws an error.
*
- * If `pageFunction` returns a [Promise], then
+ * If
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression)
+ * returns a [Promise], then
* [elementHandle.$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector)
* would wait for the promise to resolve and return its value.
*
@@ -10208,21 +10633,27 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-option-expression).
*/
$eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E, void, R>, arg?: any): Promise<R>;
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other {@link Locator} helper methods and web-first assertions do a better job.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
+ * job.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
*
* The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array
- * of matched elements as a first argument to `pageFunction`.
+ * of matched elements as a first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
*
- * If `pageFunction` returns a [Promise], then
+ * If
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression)
+ * returns a [Promise], then
* [elementHandle.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all)
* would wait for the promise to resolve and return its value.
*
@@ -10244,20 +10675,26 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
*/
$$eval<K extends keyof HTMLElementTagNameMap, R, Arg>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], Arg, R>, arg: Arg): Promise<R>;
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other {@link Locator} helper methods and web-first assertions do a better job.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
+ * job.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
*
* The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array
- * of matched elements as a first argument to `pageFunction`.
+ * of matched elements as a first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
*
- * If `pageFunction` returns a [Promise], then
+ * If
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression)
+ * returns a [Promise], then
* [elementHandle.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all)
* would wait for the promise to resolve and return its value.
*
@@ -10279,20 +10716,26 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
*/
$$eval<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], Arg, R>, arg: Arg): Promise<R>;
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other {@link Locator} helper methods and web-first assertions do a better job.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
+ * job.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
*
* The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array
- * of matched elements as a first argument to `pageFunction`.
+ * of matched elements as a first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
*
- * If `pageFunction` returns a [Promise], then
+ * If
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression)
+ * returns a [Promise], then
* [elementHandle.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all)
* would wait for the promise to resolve and return its value.
*
@@ -10314,20 +10757,26 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
*/
$$eval<K extends keyof HTMLElementTagNameMap, R>(selector: K, pageFunction: PageFunctionOn<HTMLElementTagNameMap[K][], void, R>, arg?: any): Promise<R>;
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other {@link Locator} helper methods and web-first assertions do a better job.
+ * other [Locator](https://playwright.dev/docs/api/class-locator) helper methods and web-first assertions do a better
+ * job.
*
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
*
* The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array
- * of matched elements as a first argument to `pageFunction`.
+ * of matched elements as a first argument to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
*
- * If `pageFunction` returns a [Promise], then
+ * If
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression)
+ * returns a [Promise], then
* [elementHandle.$$eval(selector, pageFunction[, arg])](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all)
* would wait for the promise to resolve and return its value.
*
@@ -10349,7 +10798,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
*
* @param selector A selector to query for.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-eval-on-selector-all-option-expression).
*/
$$eval<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(selector: string, pageFunction: PageFunctionOn<E[], void, R>, arg?: any): Promise<R>;
@@ -10357,13 +10807,20 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* **NOTE** Use web assertions that assert visibility or a locator-based
* [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead.
*
- * Returns element specified by selector when it satisfies `state` option. Returns `null` if waiting for `hidden` or
- * `detached`.
- *
- * Wait for the `selector` relative to the element handle to satisfy `state` option (either appear/disappear from dom,
- * or become visible/hidden). If at the moment of calling the method `selector` already satisfies the condition, the
- * method will return immediately. If the selector doesn't satisfy the condition for the `timeout` milliseconds, the
- * function will throw.
+ * Returns element specified by selector when it satisfies
+ * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state)
+ * option. Returns `null` if waiting for `hidden` or `detached`.
+ *
+ * Wait for the
+ * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
+ * relative to the element handle to satisfy
+ * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state) option
+ * (either appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
+ * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
+ * already satisfies the condition, the method will return immediately. If the selector doesn't satisfy the condition
+ * for the
+ * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-timeout)
+ * milliseconds, the function will throw.
*
* **Usage**
*
@@ -10385,13 +10842,20 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* **NOTE** Use web assertions that assert visibility or a locator-based
* [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead.
*
- * Returns element specified by selector when it satisfies `state` option. Returns `null` if waiting for `hidden` or
- * `detached`.
- *
- * Wait for the `selector` relative to the element handle to satisfy `state` option (either appear/disappear from dom,
- * or become visible/hidden). If at the moment of calling the method `selector` already satisfies the condition, the
- * method will return immediately. If the selector doesn't satisfy the condition for the `timeout` milliseconds, the
- * function will throw.
+ * Returns element specified by selector when it satisfies
+ * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state)
+ * option. Returns `null` if waiting for `hidden` or `detached`.
+ *
+ * Wait for the
+ * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
+ * relative to the element handle to satisfy
+ * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state) option
+ * (either appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
+ * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
+ * already satisfies the condition, the method will return immediately. If the selector doesn't satisfy the condition
+ * for the
+ * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-timeout)
+ * milliseconds, the function will throw.
*
* **Usage**
*
@@ -10413,13 +10877,20 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* **NOTE** Use web assertions that assert visibility or a locator-based
* [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead.
*
- * Returns element specified by selector when it satisfies `state` option. Returns `null` if waiting for `hidden` or
- * `detached`.
- *
- * Wait for the `selector` relative to the element handle to satisfy `state` option (either appear/disappear from dom,
- * or become visible/hidden). If at the moment of calling the method `selector` already satisfies the condition, the
- * method will return immediately. If the selector doesn't satisfy the condition for the `timeout` milliseconds, the
- * function will throw.
+ * Returns element specified by selector when it satisfies
+ * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state)
+ * option. Returns `null` if waiting for `hidden` or `detached`.
+ *
+ * Wait for the
+ * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
+ * relative to the element handle to satisfy
+ * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state) option
+ * (either appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
+ * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
+ * already satisfies the condition, the method will return immediately. If the selector doesn't satisfy the condition
+ * for the
+ * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-timeout)
+ * milliseconds, the function will throw.
*
* **Usage**
*
@@ -10441,13 +10912,20 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* **NOTE** Use web assertions that assert visibility or a locator-based
* [locator.waitFor([options])](https://playwright.dev/docs/api/class-locator#locator-wait-for) instead.
*
- * Returns element specified by selector when it satisfies `state` option. Returns `null` if waiting for `hidden` or
- * `detached`.
- *
- * Wait for the `selector` relative to the element handle to satisfy `state` option (either appear/disappear from dom,
- * or become visible/hidden). If at the moment of calling the method `selector` already satisfies the condition, the
- * method will return immediately. If the selector doesn't satisfy the condition for the `timeout` milliseconds, the
- * function will throw.
+ * Returns element specified by selector when it satisfies
+ * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state)
+ * option. Returns `null` if waiting for `hidden` or `detached`.
+ *
+ * Wait for the
+ * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
+ * relative to the element handle to satisfy
+ * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-state) option
+ * (either appear/disappear from dom, or become visible/hidden). If at the moment of calling the method
+ * [`selector`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-selector)
+ * already satisfies the condition, the method will return immediately. If the selector doesn't satisfy the condition
+ * for the
+ * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-selector-option-timeout)
+ * milliseconds, the function will throw.
*
* **Usage**
*
@@ -10516,7 +10994,9 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* This method checks the element by performing the following steps:
* 1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
* checked, this method returns immediately.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless `force` option is set.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
+ * [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-check-option-force) option is
+ * set.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
* element.
@@ -10524,8 +11004,9 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
*
* If the element is detached from the DOM at any moment during the action, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-check-option-timeout), this method
+ * throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param options
*/
check(options?: {
@@ -10570,16 +11051,22 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* Read more about [locators](https://playwright.dev/docs/locators).
*
* This method clicks the element by performing the following steps:
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless `force` option is set.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
+ * [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-click-option-force) option is
+ * set.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
- * element, or the specified `position`.
- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.
+ * element, or the specified
+ * [`position`](https://playwright.dev/docs/api/class-elementhandle#element-handle-click-option-position).
+ * 1. Wait for initiated navigations to either succeed or fail, unless
+ * [`noWaitAfter`](https://playwright.dev/docs/api/class-elementhandle#element-handle-click-option-no-wait-after)
+ * option is set.
*
* If the element is detached from the DOM at any moment during the action, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-click-option-timeout), this method
+ * throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param options
*/
click(options?: {
@@ -10653,15 +11140,20 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* instead. Read more about [locators](https://playwright.dev/docs/locators).
*
* This method double clicks the element by performing the following steps:
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless `force` option is set.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
+ * [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dblclick-option-force) option is
+ * set.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the
- * element, or the specified `position`.
+ * element, or the specified
+ * [`position`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dblclick-option-position).
*
* If the element is detached from the DOM at any moment during the action, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dblclick-option-timeout), this
+ * method throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables
+ * this.
*
* **NOTE** `elementHandle.dblclick()` dispatches two `click` events and a single `dblclick` event.
* @param options
@@ -10735,10 +11227,15 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* await elementHandle.dispatchEvent('click');
* ```
*
- * Under the hood, it creates an instance of an event based on the given `type`, initializes it with `eventInit`
+ * Under the hood, it creates an instance of an event based on the given
+ * [`type`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dispatch-event-option-type),
+ * initializes it with
+ * [`eventInit`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dispatch-event-option-event-init)
* properties and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.
*
- * Since `eventInit` is event-specific, please refer to the events documentation for the lists of initial properties:
+ * Since
+ * [`eventInit`](https://playwright.dev/docs/api/class-elementhandle#element-handle-dispatch-event-option-event-init)
+ * is event-specific, please refer to the events documentation for the lists of initial properties:
* - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
* - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
* - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
@@ -10824,15 +11321,19 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* Read more about [locators](https://playwright.dev/docs/locators).
*
* This method hovers over the element by performing the following steps:
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless `force` option is set.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
+ * [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-hover-option-force) option is
+ * set.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the
- * element, or the specified `position`.
+ * element, or the specified
+ * [`position`](https://playwright.dev/docs/api/class-elementhandle#element-handle-hover-option-position).
*
* If the element is detached from the DOM at any moment during the action, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-hover-option-timeout), this method
+ * throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param options
*/
hover(options?: {
@@ -10980,9 +11481,10 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down) and
* [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
*
- * `key` can specify the intended
- * [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
- * to generate the text for. A superset of the `key` values can be found
+ * [`key`](https://playwright.dev/docs/api/class-elementhandle#element-handle-press-option-key) can specify the
+ * intended [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single
+ * character to generate the text for. A superset of the
+ * [`key`](https://playwright.dev/docs/api/class-elementhandle#element-handle-press-option-key) values can be found
* [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
*
* `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
@@ -10992,10 +11494,11 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
* `ControlOrMeta`.
*
- * Holding down `Shift` will type the text that corresponds to the `key` in the upper case.
+ * Holding down `Shift` will type the text that corresponds to the
+ * [`key`](https://playwright.dev/docs/api/class-elementhandle#element-handle-press-option-key) in the upper case.
*
- * If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
- * texts.
+ * If [`key`](https://playwright.dev/docs/api/class-elementhandle#element-handle-press-option-key) is a single
+ * character, it is case-sensitive, so the values `a` and `A` will generate different respective texts.
*
* Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
* specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.
@@ -11058,7 +11561,9 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
/**
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
- * box `#FF00FF` (customized by `maskColor`) that completely covers its bounding box.
+ * box `#FF00FF` (customized by
+ * [`maskColor`](https://playwright.dev/docs/api/class-elementhandle#element-handle-screenshot-option-mask-color))
+ * that completely covers its bounding box.
*/
mask?: Array<Locator>;
@@ -11075,9 +11580,10 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
omitBackground?: boolean;
/**
- * The file path to save the image to. The screenshot type will be inferred from file extension. If `path` is a
- * relative path, then it is resolved relative to the current working directory. If no path is provided, the image
- * won't be saved to the disk.
+ * The file path to save the image to. The screenshot type will be inferred from file extension. If
+ * [`path`](https://playwright.dev/docs/api/class-elementhandle#element-handle-screenshot-option-path) is a relative
+ * path, then it is resolved relative to the current working directory. If no path is provided, the image won't be
+ * saved to the disk.
*/
path?: string;
@@ -11263,15 +11769,18 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* This method checks or unchecks an element by performing the following steps:
* 1. Ensure that element is a checkbox or a radio input. If not, this method throws.
* 1. If the element already has the right checked state, this method returns immediately.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
- * the element is detached during the checks, the whole action is retried.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-set-checked-option-force) option
+ * is set. If the element is detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
* element.
* 1. Ensure that the element is now checked or unchecked. If not, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-set-checked-option-timeout), this
+ * method throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables
+ * this.
* @param checked Whether to check or uncheck the checkbox.
* @param options
*/
@@ -11321,7 +11830,7 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs
* with a `[webkitdirectory]` attribute, only a single directory path is supported.
*
- * This method expects {@link ElementHandle} to point to an
+ * This method expects [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) to point to an
* [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside
* the `<label>` element that has an associated
* [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.
@@ -11379,15 +11888,18 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* more about [locators](https://playwright.dev/docs/locators).
*
* This method taps the element by performing the following steps:
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless `force` option is set.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
+ * [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-tap-option-force) option is set.
* 1. Scroll the element into view if needed.
* 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the
- * element, or the specified `position`.
+ * element, or the specified
+ * [`position`](https://playwright.dev/docs/api/class-elementhandle#element-handle-tap-option-position).
*
* If the element is detached from the DOM at any moment during the action, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-tap-option-timeout), this method
+ * throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
*
* **NOTE** `elementHandle.tap()` requires that the `hasTouch` option of the browser context be set to true.
* @param options
@@ -11488,7 +12000,9 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* This method checks the element by performing the following steps:
* 1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
* unchecked, this method returns immediately.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless `force` option is set.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
+ * [`force`](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck-option-force) option is
+ * set.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
* element.
@@ -11496,8 +12010,9 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
*
* If the element is detached from the DOM at any moment during the action, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-uncheck-option-timeout), this method
+ * throws a [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param options
*/
uncheck(options?: {
@@ -11538,10 +12053,13 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
}): Promise<void>;
/**
- * Returns when the element satisfies the `state`.
+ * Returns when the element satisfies the
+ * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-element-state-option-state).
*
- * Depending on the `state` parameter, this method waits for one of the [actionability](https://playwright.dev/docs/actionability) checks to
- * pass. This method throws when the element is detached while waiting, unless waiting for the `"hidden"` state.
+ * Depending on the
+ * [`state`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-element-state-option-state)
+ * parameter, this method waits for one of the [actionability](https://playwright.dev/docs/actionability) checks to pass. This method throws
+ * when the element is detached while waiting, unless waiting for the `"hidden"` state.
* - `"visible"` Wait until the element is [visible](https://playwright.dev/docs/actionability#visible).
* - `"hidden"` Wait until the element is [not visible](https://playwright.dev/docs/actionability#visible) or not attached. Note that
* waiting for hidden does not throw when the element detaches.
@@ -11551,7 +12069,9 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* - `"disabled"` Wait until the element is [not enabled](https://playwright.dev/docs/actionability#enabled).
* - `"editable"` Wait until the element is [editable](https://playwright.dev/docs/actionability#editable).
*
- * If the element does not satisfy the condition for the `timeout` milliseconds, this method will throw.
+ * If the element does not satisfy the condition for the
+ * [`timeout`](https://playwright.dev/docs/api/class-elementhandle#element-handle-wait-for-element-state-option-timeout)
+ * milliseconds, this method will throw.
* @param state A state to wait for, see below for more details.
* @param options
*/
@@ -11579,12 +12099,16 @@ export interface Locator {
*
* **Details**
*
- * Returns the return value of `pageFunction`, called with the matching element as a first argument, and `arg` as a
- * second argument.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression), called with the
+ * matching element as a first argument, and
+ * [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-arg) as a second argument.
*
- * If `pageFunction` returns a [Promise], this method will wait for the promise to resolve and return its value.
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression) returns a
+ * [Promise], this method will wait for the promise to resolve and return its value.
*
- * If `pageFunction` throws or rejects, this method throws.
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression) throws or
+ * rejects, this method throws.
*
* **Usage**
*
@@ -11594,7 +12118,8 @@ export interface Locator {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression).
* @param options
*/
evaluate<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg, options?: {
@@ -11605,12 +12130,16 @@ export interface Locator {
*
* **Details**
*
- * Returns the return value of `pageFunction`, called with the matching element as a first argument, and `arg` as a
- * second argument.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression), called with the
+ * matching element as a first argument, and
+ * [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-arg) as a second argument.
*
- * If `pageFunction` returns a [Promise], this method will wait for the promise to resolve and return its value.
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression) returns a
+ * [Promise], this method will wait for the promise to resolve and return its value.
*
- * If `pageFunction` throws or rejects, this method throws.
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression) throws or
+ * rejects, this method throws.
*
* **Usage**
*
@@ -11620,20 +12149,23 @@ export interface Locator {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression).
* @param options
*/
evaluate<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, void, R>, options?: {
timeout?: number;
}): Promise<R>;
/**
- * Execute JavaScript code in the page, taking the matching element as an argument, and return a {@link JSHandle} with
- * the result.
+ * Execute JavaScript code in the page, taking the matching element as an argument, and return a
+ * [JSHandle](https://playwright.dev/docs/api/class-jshandle) with the result.
*
* **Details**
*
- * Returns the return value of `pageFunction` as a{@link JSHandle}, called with the matching element as a first
- * argument, and `arg` as a second argument.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression) as
+ * a[JSHandle](https://playwright.dev/docs/api/class-jshandle), called with the matching element as a first argument,
+ * and [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-arg) as a second argument.
*
* The only difference between
* [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate)
@@ -11641,27 +12173,32 @@ export interface Locator {
* [locator.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle)
* is that
* [locator.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle)
- * returns {@link JSHandle}.
+ * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
- * If `pageFunction` returns a [Promise], this method will wait for the promise to resolve and return its value.
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression)
+ * returns a [Promise], this method will wait for the promise to resolve and return its value.
*
- * If `pageFunction` throws or rejects, this method throws.
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression) throws
+ * or rejects, this method throws.
*
* See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
* more details.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression).
* @param options
*/
evaluateHandle<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
/**
- * Execute JavaScript code in the page, taking the matching element as an argument, and return a {@link JSHandle} with
- * the result.
+ * Execute JavaScript code in the page, taking the matching element as an argument, and return a
+ * [JSHandle](https://playwright.dev/docs/api/class-jshandle) with the result.
*
* **Details**
*
- * Returns the return value of `pageFunction` as a{@link JSHandle}, called with the matching element as a first
- * argument, and `arg` as a second argument.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression) as
+ * a[JSHandle](https://playwright.dev/docs/api/class-jshandle), called with the matching element as a first argument,
+ * and [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-arg) as a second argument.
*
* The only difference between
* [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate)
@@ -11669,16 +12206,19 @@ export interface Locator {
* [locator.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle)
* is that
* [locator.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle)
- * returns {@link JSHandle}.
+ * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
- * If `pageFunction` returns a [Promise], this method will wait for the promise to resolve and return its value.
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression)
+ * returns a [Promise], this method will wait for the promise to resolve and return its value.
*
- * If `pageFunction` throws or rejects, this method throws.
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression) throws
+ * or rejects, this method throws.
*
* See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
* more details.
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression).
* @param options
*/
evaluateHandle<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, void, R>): Promise<SmartHandle<R>>;
@@ -11687,12 +12227,16 @@ export interface Locator {
*
* **Details**
*
- * Returns the return value of `pageFunction`, called with an array of all matching elements as a first argument, and
- * `arg` as a second argument.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression), called with
+ * an array of all matching elements as a first argument, and
+ * [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-arg) as a second argument.
*
- * If `pageFunction` returns a [Promise], this method will wait for the promise to resolve and return its value.
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression) returns a
+ * [Promise], this method will wait for the promise to resolve and return its value.
*
- * If `pageFunction` throws or rejects, this method throws.
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression) throws or
+ * rejects, this method throws.
*
* **Usage**
*
@@ -11702,7 +12246,8 @@ export interface Locator {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression).
*/
evaluateAll<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E[], Arg, R>, arg: Arg): Promise<R>;
/**
@@ -11710,12 +12255,16 @@ export interface Locator {
*
* **Details**
*
- * Returns the return value of `pageFunction`, called with an array of all matching elements as a first argument, and
- * `arg` as a second argument.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression), called with
+ * an array of all matching elements as a first argument, and
+ * [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-arg) as a second argument.
*
- * If `pageFunction` returns a [Promise], this method will wait for the promise to resolve and return its value.
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression) returns a
+ * [Promise], this method will wait for the promise to resolve and return its value.
*
- * If `pageFunction` throws or rejects, this method throws.
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression) throws or
+ * rejects, this method throws.
*
* **Usage**
*
@@ -11725,12 +12274,13 @@ export interface Locator {
* ```
*
* @param pageFunction Function to be evaluated in the page context.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression).
*/
evaluateAll<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E[], void, R>): Promise<R>;
/**
- * **NOTE** Always prefer using {@link Locator}s and web assertions over {@link ElementHandle}s because latter are inherently
- * racy.
+ * **NOTE** Always prefer using [Locator](https://playwright.dev/docs/api/class-locator)s and web assertions over
+ * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle)s because latter are inherently racy.
*
* Resolves given locator to the first matching DOM element. If there are no matching elements, waits for one. If
* multiple elements match the locator, throws.
@@ -11764,7 +12314,9 @@ export interface Locator {
*
* **NOTE** If you need to assert text on the page, prefer
* [expect(locator).toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text)
- * with `useInnerText` option to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
+ * with
+ * [`useInnerText`](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text-option-use-inner-text)
+ * option to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
*
* **Usage**
*
@@ -11884,7 +12436,8 @@ export interface Locator {
* Performs the following steps:
* 1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
* checked, this method returns immediately.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless `force` option is set.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
+ * [`force`](https://playwright.dev/docs/api/class-locator#locator-check-option-force) option is set.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
* element.
@@ -11892,8 +12445,9 @@ export interface Locator {
*
* If the element is detached from the DOM at any moment during the action, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-check-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
*
* **Usage**
*
@@ -11988,16 +12542,21 @@ export interface Locator {
* **Details**
*
* This method clicks the element by performing the following steps:
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless `force` option is set.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
+ * [`force`](https://playwright.dev/docs/api/class-locator#locator-click-option-force) option is set.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
- * element, or the specified `position`.
- * 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.
+ * element, or the specified
+ * [`position`](https://playwright.dev/docs/api/class-locator#locator-click-option-position).
+ * 1. Wait for initiated navigations to either succeed or fail, unless
+ * [`noWaitAfter`](https://playwright.dev/docs/api/class-locator#locator-click-option-no-wait-after) option is
+ * set.
*
* If the element is detached from the DOM at any moment during the action, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-click-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
*
* **Usage**
*
@@ -12083,10 +12642,11 @@ export interface Locator {
}): Promise<void>;
/**
- * Returns a {@link FrameLocator} object pointing to the same `iframe` as this locator.
+ * Returns a [FrameLocator](https://playwright.dev/docs/api/class-framelocator) object pointing to the same `iframe`
+ * as this locator.
*
- * Useful when you have a {@link Locator} object obtained somewhere, and later on would like to interact with the
- * content inside the frame.
+ * Useful when you have a [Locator](https://playwright.dev/docs/api/class-locator) object obtained somewhere, and
+ * later on would like to interact with the content inside the frame.
*
* For a reverse operation, use
* [frameLocator.owner()](https://playwright.dev/docs/api/class-framelocator#frame-locator-owner).
@@ -12125,15 +12685,18 @@ export interface Locator {
* **Details**
*
* This method double clicks the element by performing the following steps:
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless `force` option is set.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
+ * [`force`](https://playwright.dev/docs/api/class-locator#locator-dblclick-option-force) option is set.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to double click in the center of the
- * element, or the specified `position`.
+ * element, or the specified
+ * [`position`](https://playwright.dev/docs/api/class-locator#locator-dblclick-option-position).
*
* If the element is detached from the DOM at any moment during the action, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-dblclick-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
*
* **NOTE** `element.dblclick()` dispatches two `click` events and a single `dblclick` event.
* @param options
@@ -12209,10 +12772,13 @@ export interface Locator {
* `click` is dispatched. This is equivalent to calling
* [element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).
*
- * Under the hood, it creates an instance of an event based on the given `type`, initializes it with `eventInit`
- * properties and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.
+ * Under the hood, it creates an instance of an event based on the given
+ * [`type`](https://playwright.dev/docs/api/class-locator#locator-dispatch-event-option-type), initializes it with
+ * [`eventInit`](https://playwright.dev/docs/api/class-locator#locator-dispatch-event-option-event-init) properties
+ * and dispatches it on the element. Events are `composed`, `cancelable` and bubble by default.
*
- * Since `eventInit` is event-specific, please refer to the events documentation for the lists of initial properties:
+ * Since [`eventInit`](https://playwright.dev/docs/api/class-locator#locator-dispatch-event-option-event-init) is
+ * event-specific, please refer to the events documentation for the lists of initial properties:
* - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent)
* - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent)
* - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent)
@@ -12224,7 +12790,8 @@ export interface Locator {
* - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)
* - [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent)
*
- * You can also specify {@link JSHandle} as the property value if you want live objects to be passed into the event:
+ * You can also specify [JSHandle](https://playwright.dev/docs/api/class-jshandle) as the property value if you want
+ * live objects to be passed into the event:
*
* ```js
* // Note you can only create DataTransfer in Chromium and Firefox
@@ -12319,8 +12886,8 @@ export interface Locator {
}): Promise<void>;
/**
- * **NOTE** Always prefer using {@link Locator}s and web assertions over {@link ElementHandle}s because latter are inherently
- * racy.
+ * **NOTE** Always prefer using [Locator](https://playwright.dev/docs/api/class-locator)s and web assertions over
+ * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle)s because latter are inherently racy.
*
* Resolves given locator to all matching DOM elements. If there are no matching elements, returns an empty list.
*/
@@ -12398,8 +12965,8 @@ export interface Locator {
* `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
* div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.
*
- * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
- * FrameLocator}s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
+ * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
*/
has?: Locator;
@@ -12407,8 +12974,8 @@ export interface Locator {
* Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
* outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.
*
- * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
- * FrameLocator}s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
+ * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
*/
hasNot?: Locator;
@@ -12622,8 +13189,10 @@ export interface Locator {
disabled?: boolean;
/**
- * Whether `name` is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when `name` is a
- * regular expression. Note that exact match still trims whitespace.
+ * Whether [`name`](https://playwright.dev/docs/api/class-locator#locator-get-by-role-option-name) is matched exactly:
+ * case-sensitive and whole-string. Defaults to false. Ignored when
+ * [`name`](https://playwright.dev/docs/api/class-locator#locator-get-by-role-option-name) is a regular expression.
+ * Note that exact match still trims whitespace.
*/
exact?: boolean;
@@ -12652,7 +13221,8 @@ export interface Locator {
/**
* Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
- * case-insensitive and searches for a substring, use `exact` to control this behavior.
+ * case-insensitive and searches for a substring, use
+ * [`exact`](https://playwright.dev/docs/api/class-locator#locator-get-by-role-option-exact) to control this behavior.
*
* Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
*/
@@ -12809,15 +13379,18 @@ export interface Locator {
* **Details**
*
* This method hovers over the element by performing the following steps:
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless `force` option is set.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
+ * [`force`](https://playwright.dev/docs/api/class-locator#locator-hover-option-force) option is set.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to hover over the center of the
- * element, or the specified `position`.
+ * element, or the specified
+ * [`position`](https://playwright.dev/docs/api/class-locator#locator-hover-option-position).
*
* If the element is detached from the DOM at any moment during the action, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-hover-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param options
*/
hover(options?: {
@@ -12885,7 +13458,9 @@ export interface Locator {
*
* **NOTE** If you need to assert text on the page, prefer
* [expect(locator).toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text)
- * with `useInnerText` option to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
+ * with
+ * [`useInnerText`](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text-option-use-inner-text)
+ * option to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details.
* @param options
*/
innerText(options?: {
@@ -13108,8 +13683,8 @@ export interface Locator {
* `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
* div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.
*
- * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
- * FrameLocator}s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
+ * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
*/
has?: Locator;
@@ -13117,8 +13692,8 @@ export interface Locator {
* Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
* outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.
*
- * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
- * FrameLocator}s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
+ * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
*/
hasNot?: Locator;
@@ -13193,9 +13768,10 @@ export interface Locator {
* [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down) and
* [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
*
- * `key` can specify the intended
+ * [`key`](https://playwright.dev/docs/api/class-locator#locator-press-option-key) can specify the intended
* [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
- * to generate the text for. A superset of the `key` values can be found
+ * to generate the text for. A superset of the
+ * [`key`](https://playwright.dev/docs/api/class-locator#locator-press-option-key) values can be found
* [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
*
* `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
@@ -13205,10 +13781,11 @@ export interface Locator {
* Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
* `ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.
*
- * Holding down `Shift` will type the text that corresponds to the `key` in the upper case.
+ * Holding down `Shift` will type the text that corresponds to the
+ * [`key`](https://playwright.dev/docs/api/class-locator#locator-press-option-key) in the upper case.
*
- * If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
- * texts.
+ * If [`key`](https://playwright.dev/docs/api/class-locator#locator-press-option-key) is a single character, it is
+ * case-sensitive, so the values `a` and `A` will generate different respective texts.
*
* Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
* specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.
@@ -13467,15 +14044,17 @@ export interface Locator {
* This method checks or unchecks an element by performing the following steps:
* 1. Ensure that matched element is a checkbox or a radio input. If not, this method throws.
* 1. If the element already has the right checked state, this method returns immediately.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless `force` option is set. If
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the matched element, unless
+ * [`force`](https://playwright.dev/docs/api/class-locator#locator-set-checked-option-force) option is set. If
* the element is detached during the checks, the whole action is retried.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
* element.
* 1. Ensure that the element is now checked or unchecked. If not, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-set-checked-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param checked Whether to check or uncheck the checkbox.
* @param options
*/
@@ -13551,7 +14130,7 @@ export interface Locator {
* Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then
* they are resolved relative to the current working directory. For empty array, clears the selected files.
*
- * This method expects {@link Locator} to point to an
+ * This method expects [Locator](https://playwright.dev/docs/api/class-locator) to point to an
* [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input). However, if the element is inside
* the `<label>` element that has an associated
* [control](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control), targets the control instead.
@@ -13610,15 +14189,18 @@ export interface Locator {
* **Details**
*
* This method taps the element by performing the following steps:
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless `force` option is set.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
+ * [`force`](https://playwright.dev/docs/api/class-locator#locator-tap-option-force) option is set.
* 1. Scroll the element into view if needed.
* 1. Use [page.touchscreen](https://playwright.dev/docs/api/class-page#page-touchscreen) to tap the center of the
- * element, or the specified `position`.
+ * element, or the specified
+ * [`position`](https://playwright.dev/docs/api/class-locator#locator-tap-option-position).
*
* If the element is detached from the DOM at any moment during the action, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-tap-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
*
* **NOTE** `element.tap()` requires that the `hasTouch` option of the browser context be set to true.
* @param options
@@ -13737,7 +14319,8 @@ export interface Locator {
* This method unchecks the element by performing the following steps:
* 1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already
* unchecked, this method returns immediately.
- * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless `force` option is set.
+ * 1. Wait for [actionability](https://playwright.dev/docs/actionability) checks on the element, unless
+ * [`force`](https://playwright.dev/docs/api/class-locator#locator-uncheck-option-force) option is set.
* 1. Scroll the element into view if needed.
* 1. Use [page.mouse](https://playwright.dev/docs/api/class-page#page-mouse) to click in the center of the
* element.
@@ -13745,8 +14328,9 @@ export interface Locator {
*
* If the element is detached from the DOM at any moment during the action, this method throws.
*
- * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
- * TimeoutError}. Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified
+ * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-uncheck-option-timeout), this method throws a
+ * [TimeoutError](https://playwright.dev/docs/api/class-timeouterror). Passing zero timeout disables this.
* @param options
*/
uncheck(options?: {
@@ -13787,10 +14371,12 @@ export interface Locator {
}): Promise<void>;
/**
- * Returns when element specified by locator satisfies the `state` option.
+ * Returns when element specified by locator satisfies the
+ * [`state`](https://playwright.dev/docs/api/class-locator#locator-wait-for-option-state) option.
*
* If target element already satisfies the condition, the method returns immediately. Otherwise, waits for up to
- * `timeout` milliseconds until the condition is met.
+ * [`timeout`](https://playwright.dev/docs/api/class-locator#locator-wait-for-option-timeout) milliseconds until the
+ * condition is met.
*
* **Usage**
*
@@ -13919,7 +14505,9 @@ export interface BrowserType<Unused = {}> {
*
* **Usage**
*
- * You can use `ignoreDefaultArgs` to filter out `--mute-audio` from default arguments:
+ * You can use
+ * [`ignoreDefaultArgs`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-ignore-default-args)
+ * to filter out `--mute-audio` from default arguments:
*
* ```js
* const browser = await chromium.launch({ // Or 'firefox' or 'webkit'.
@@ -13929,7 +14517,9 @@ export interface BrowserType<Unused = {}> {
*
* > **Chromium-only** Playwright can also be used to control the Google Chrome or Microsoft Edge browsers, but it
* works best with the version of Chromium it is bundled with. There is no guarantee it will work with any other
- * version. Use `executablePath` option with extreme caution.
+ * version. Use
+ * [`executablePath`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-executable-path)
+ * option with extreme caution.
* >
* > If Google Chrome (rather than Chromium) is preferred, a
* [Chrome Canary](https://www.google.com/chrome/browser/canary.html) or
@@ -13948,8 +14538,9 @@ export interface BrowserType<Unused = {}> {
/**
* Returns the persistent browser context instance.
*
- * Launches browser that uses persistent storage located at `userDataDir` and returns the only context. Closing this
- * context will automatically close the browser.
+ * Launches browser that uses persistent storage located at
+ * [`userDataDir`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-user-data-dir)
+ * and returns the only context. Closing this context will automatically close the browser.
* @param userDataDir Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for
* [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction) and
* [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile). Note that Chromium's
@@ -14076,7 +14667,8 @@ export interface BrowserType<Unused = {}> {
/**
* **Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the
- * `headless` option will be set `false`.
+ * [`headless`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-headless)
+ * option will be set `false`.
* @deprecated Use [debugging tools](https://playwright.dev/docs/debug) instead.
*/
devtools?: boolean;
@@ -14094,9 +14686,10 @@ export interface BrowserType<Unused = {}> {
env?: { [key: string]: string|number|boolean; };
/**
- * 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.
+ * Path to a browser executable to run instead of the bundled one. If
+ * [`executablePath`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-executable-path)
+ * 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.
*/
executablePath?: string;
@@ -14160,7 +14753,8 @@ export interface BrowserType<Unused = {}> {
* Whether to run browser in headless mode. More details for
* [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
* [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the
- * `devtools` option is `true`.
+ * [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is
+ * `true`.
*/
headless?: boolean;
@@ -14179,17 +14773,20 @@ export interface BrowserType<Unused = {}> {
origin?: string;
/**
- * This option only applies to the requests sent from corresponding {@link APIRequestContext} and does not affect
- * requests sent from the browser. `'always'` - `Authorization` header with basic authentication credentials will be
- * sent with the each API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response
- * with `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
+ * This option only applies to the requests sent from corresponding
+ * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
+ * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
+ * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
+ * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
*/
send?: "unauthorized"|"always";
};
/**
- * If `true`, Playwright does not pass its own configurations args and only uses the ones from `args`. If an array is
- * given, then filters out the given default arguments. Dangerous option; use with care. Defaults to `false`.
+ * If `true`, Playwright does not pass its own configurations args and only uses the ones from
+ * [`args`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-args). If
+ * an array is given, then filters out the given default arguments. Dangerous option; use with care. Defaults to
+ * `false`.
*/
ignoreDefaultArgs?: boolean|Array<string>;
@@ -14296,8 +14893,9 @@ export interface BrowserType<Unused = {}> {
mode?: "full"|"minimal";
/**
- * A glob or regex pattern to filter requests that are stored in the HAR. When a `baseURL` via the context options was
- * provided and the passed URL is a path, it gets merged via the
+ * A glob or regex pattern to filter requests that are stored in the HAR. When a
+ * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
+ * options was provided and the passed URL is a path, it gets merged via the
* [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
*/
urlFilter?: string|RegExp;
@@ -14342,7 +14940,8 @@ export interface BrowserType<Unused = {}> {
/**
* Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the
- * `viewport` is set.
+ * [`viewport`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-viewport)
+ * is set.
*/
screen?: {
/**
@@ -14373,8 +14972,8 @@ export interface BrowserType<Unused = {}> {
/**
* If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on
* selectors that imply single target DOM element will throw when more than one element matches the selector. This
- * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See {@link Locator} to
- * learn more about the strict mode.
+ * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See
+ * [Locator](https://playwright.dev/docs/api/class-locator) to learn more about the strict mode.
*/
strictSelectors?: boolean;
@@ -14402,7 +15001,9 @@ export interface BrowserType<Unused = {}> {
userAgent?: string;
/**
- * @deprecated Use `recordVideo` instead.
+ * @deprecated Use
+ * [`recordVideo`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-record-video)
+ * instead.
*/
videoSize?: {
/**
@@ -14417,7 +15018,9 @@ export interface BrowserType<Unused = {}> {
};
/**
- * @deprecated Use `recordVideo` instead.
+ * @deprecated Use
+ * [`recordVideo`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-persistent-context-option-record-video)
+ * instead.
*/
videosPath?: string;
@@ -14489,7 +15092,8 @@ export interface BrowserType<Unused = {}> {
/**
* **Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the
- * `headless` option will be set `false`.
+ * [`headless`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-server-option-headless) option
+ * will be set `false`.
* @deprecated Use [debugging tools](https://playwright.dev/docs/debug) instead.
*/
devtools?: boolean;
@@ -14507,9 +15111,10 @@ export interface BrowserType<Unused = {}> {
env?: { [key: string]: string|number|boolean; };
/**
- * 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.
+ * Path to a browser executable to run instead of the bundled one. If
+ * [`executablePath`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-server-option-executable-path)
+ * 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.
*/
executablePath?: string;
@@ -14538,7 +15143,8 @@ export interface BrowserType<Unused = {}> {
* Whether to run browser in headless mode. More details for
* [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
* [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the
- * `devtools` option is `true`.
+ * [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is
+ * `true`.
*/
headless?: boolean;
@@ -14550,7 +15156,8 @@ export interface BrowserType<Unused = {}> {
host?: string;
/**
- * If `true`, Playwright does not pass its own configurations args and only uses the ones from `args`. If an array is
+ * If `true`, Playwright does not pass its own configurations args and only uses the ones from
+ * [`args`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-server-option-args). If an array is
* given, then filters out the given default arguments. Dangerous option; use with care. Defaults to `false`.
*/
ignoreDefaultArgs?: boolean|Array<string>;
@@ -14853,8 +15460,9 @@ export interface Accessibility {
* the page.
*
* **NOTE** The Chromium accessibility tree contains nodes that go unused on most platforms and by most screen
- * readers. Playwright will discard them as well for an easier to process tree, unless `interestingOnly` is set to
- * `false`.
+ * readers. Playwright will discard them as well for an easier to process tree, unless
+ * [`interestingOnly`](https://playwright.dev/docs/api/class-accessibility#accessibility-snapshot-option-interesting-only)
+ * is set to `false`.
*
* **Usage**
*
@@ -14965,7 +15573,8 @@ type ElectronType = typeof import('electron');
*/
export interface ElectronApplication {
/**
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-option-expression).
*
* If the function passed to the
* [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
@@ -14980,11 +15589,13 @@ export interface ElectronApplication {
* returns `undefined`. Playwright also supports transferring some additional values that are not serializable by
* `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`.
* @param pageFunction Function to be evaluated in the main Electron process.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-option-expression).
*/
evaluate<R, Arg>(pageFunction: PageFunctionOn<ElectronType, Arg, R>, arg: Arg): Promise<R>;
/**
- * Returns the return value of `pageFunction`.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-option-expression).
*
* If the function passed to the
* [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
@@ -14999,12 +15610,15 @@ export interface ElectronApplication {
* returns `undefined`. Playwright also supports transferring some additional values that are not serializable by
* `JSON`: `-0`, `NaN`, `Infinity`, `-Infinity`.
* @param pageFunction Function to be evaluated in the main Electron process.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-option-expression).
*/
evaluate<R>(pageFunction: PageFunctionOn<ElectronType, void, R>, arg?: any): Promise<R>;
/**
- * Returns the return value of `pageFunction` as a {@link JSHandle}.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle-option-expression)
+ * as a [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* The only difference between
* [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
@@ -15012,7 +15626,7 @@ export interface ElectronApplication {
* [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
* is that
* [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
- * returns {@link JSHandle}.
+ * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* If the function passed to the
* [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
@@ -15020,11 +15634,14 @@ export interface ElectronApplication {
* [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
* would wait for the promise to resolve and return its value.
* @param pageFunction Function to be evaluated in the main Electron process.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle-option-expression).
*/
evaluateHandle<R, Arg>(pageFunction: PageFunctionOn<ElectronType, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
/**
- * Returns the return value of `pageFunction` as a {@link JSHandle}.
+ * Returns the return value of
+ * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle-option-expression)
+ * as a [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* The only difference between
* [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
@@ -15032,7 +15649,7 @@ export interface ElectronApplication {
* [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
* is that
* [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
- * returns {@link JSHandle}.
+ * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
*
* If the function passed to the
* [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
@@ -15040,7 +15657,8 @@ export interface ElectronApplication {
* [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
* would wait for the promise to resolve and return its value.
* @param pageFunction Function to be evaluated in the main Electron process.
- * @param arg Optional argument to pass to `pageFunction`.
+ * @param arg Optional argument to pass to
+ * [`pageFunction`](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle-option-expression).
*/
evaluateHandle<R>(pageFunction: PageFunctionOn<ElectronType, void, R>, arg?: any): Promise<SmartHandle<R>>;
/**
@@ -15052,7 +15670,8 @@ export interface ElectronApplication {
* Emitted when JavaScript within the Electron main process calls one of console API methods, e.g. `console.log` or
* `console.dir`.
*
- * The arguments passed into `console.log` are available on the {@link ConsoleMessage} event handler argument.
+ * The arguments passed into `console.log` are available on the
+ * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
*
* **Usage**
*
@@ -15070,8 +15689,8 @@ export interface ElectronApplication {
on(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
/**
- * This event is issued for every window that is created **and loaded** in Electron. It contains a {@link Page} that
- * can be used for Playwright automation.
+ * This event is issued for every window that is created **and loaded** in Electron. It contains a
+ * [Page](https://playwright.dev/docs/api/class-page) that can be used for Playwright automation.
*/
on(event: 'window', listener: (page: Page) => any): this;
@@ -15099,7 +15718,8 @@ export interface ElectronApplication {
* Emitted when JavaScript within the Electron main process calls one of console API methods, e.g. `console.log` or
* `console.dir`.
*
- * The arguments passed into `console.log` are available on the {@link ConsoleMessage} event handler argument.
+ * The arguments passed into `console.log` are available on the
+ * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
*
* **Usage**
*
@@ -15117,8 +15737,8 @@ export interface ElectronApplication {
addListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
/**
- * This event is issued for every window that is created **and loaded** in Electron. It contains a {@link Page} that
- * can be used for Playwright automation.
+ * This event is issued for every window that is created **and loaded** in Electron. It contains a
+ * [Page](https://playwright.dev/docs/api/class-page) that can be used for Playwright automation.
*/
addListener(event: 'window', listener: (page: Page) => any): this;
@@ -15161,7 +15781,8 @@ export interface ElectronApplication {
* Emitted when JavaScript within the Electron main process calls one of console API methods, e.g. `console.log` or
* `console.dir`.
*
- * The arguments passed into `console.log` are available on the {@link ConsoleMessage} event handler argument.
+ * The arguments passed into `console.log` are available on the
+ * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
*
* **Usage**
*
@@ -15179,8 +15800,8 @@ export interface ElectronApplication {
prependListener(event: 'console', listener: (consoleMessage: ConsoleMessage) => any): this;
/**
- * This event is issued for every window that is created **and loaded** in Electron. It contains a {@link Page} that
- * can be used for Playwright automation.
+ * This event is issued for every window that is created **and loaded** in Electron. It contains a
+ * [Page](https://playwright.dev/docs/api/class-page) that can be used for Playwright automation.
*/
prependListener(event: 'window', listener: (page: Page) => any): this;
@@ -15238,7 +15859,8 @@ export interface ElectronApplication {
* Emitted when JavaScript within the Electron main process calls one of console API methods, e.g. `console.log` or
* `console.dir`.
*
- * The arguments passed into `console.log` are available on the {@link ConsoleMessage} event handler argument.
+ * The arguments passed into `console.log` are available on the
+ * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) event handler argument.
*
* **Usage**
*
@@ -15256,8 +15878,8 @@ export interface ElectronApplication {
waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
/**
- * This event is issued for every window that is created **and loaded** in Electron. It contains a {@link Page} that
- * can be used for Playwright automation.
+ * This event is issued for every window that is created **and loaded** in Electron. It contains a
+ * [Page](https://playwright.dev/docs/api/class-page) that can be used for Playwright automation.
*/
waitForEvent(event: 'window', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
@@ -15581,15 +16203,17 @@ export interface Android {
}): Promise<BrowserServer>;
/**
- * This setting will change the default maximum time for all the methods accepting `timeout` option.
+ * This setting will change the default maximum time for all the methods accepting
+ * [`timeout`](https://playwright.dev/docs/api/class-android#android-set-default-timeout-option-timeout) option.
* @param timeout Maximum time in milliseconds
*/
setDefaultTimeout(timeout: number): void;
}
/**
- * {@link AndroidDevice} represents a connected device, either real hardware or emulated. Devices can be obtained
- * using [android.devices([options])](https://playwright.dev/docs/api/class-android#android-devices).
+ * [AndroidDevice](https://playwright.dev/docs/api/class-androiddevice) represents a connected device, either real
+ * hardware or emulated. Devices can be obtained using
+ * [android.devices([options])](https://playwright.dev/docs/api/class-android#android-devices).
*/
export interface AndroidDevice {
/**
@@ -15658,7 +16282,9 @@ export interface AndroidDevice {
close(): Promise<void>;
/**
- * Drags the widget defined by `selector` towards `dest` point.
+ * Drags the widget defined by
+ * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-drag-option-selector) towards
+ * [`dest`](https://playwright.dev/docs/api/class-androiddevice#android-device-drag-option-dest) point.
* @param selector Selector to drag.
* @param dest Point to drag to.
* @param options
@@ -15683,7 +16309,9 @@ export interface AndroidDevice {
}): Promise<void>;
/**
- * Fills the specific `selector` input box with `text`.
+ * Fills the specific
+ * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-fill-option-selector) input box
+ * with [`text`](https://playwright.dev/docs/api/class-androiddevice#android-device-fill-option-text).
* @param selector Selector to fill.
* @param text Text to be filled in the input box.
* @param options
@@ -15699,7 +16327,9 @@ export interface AndroidDevice {
}): Promise<void>;
/**
- * Flings the widget defined by `selector` in the specified `direction`.
+ * Flings the widget defined by
+ * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-fling-option-selector) in the
+ * specified [`direction`](https://playwright.dev/docs/api/class-androiddevice#android-device-fling-option-direction).
* @param selector Selector to fling.
* @param direction Fling direction.
* @param options
@@ -15720,7 +16350,8 @@ export interface AndroidDevice {
}): Promise<void>;
/**
- * Returns information about a widget defined by `selector`.
+ * Returns information about a widget defined by
+ * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-info-option-selector).
* @param selector Selector to return information about.
*/
info(selector: AndroidSelector): Promise<AndroidElementInfo>;
@@ -15846,10 +16477,11 @@ export interface AndroidDevice {
origin?: string;
/**
- * This option only applies to the requests sent from corresponding {@link APIRequestContext} and does not affect
- * requests sent from the browser. `'always'` - `Authorization` header with basic authentication credentials will be
- * sent with the each API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response
- * with `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
+ * This option only applies to the requests sent from corresponding
+ * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
+ * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
+ * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
+ * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
*/
send?: "unauthorized"|"always";
};
@@ -15957,8 +16589,9 @@ export interface AndroidDevice {
mode?: "full"|"minimal";
/**
- * A glob or regex pattern to filter requests that are stored in the HAR. When a `baseURL` via the context options was
- * provided and the passed URL is a path, it gets merged via the
+ * A glob or regex pattern to filter requests that are stored in the HAR. When a
+ * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
+ * options was provided and the passed URL is a path, it gets merged via the
* [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
*/
urlFilter?: string|RegExp;
@@ -16003,7 +16636,8 @@ export interface AndroidDevice {
/**
* Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the
- * `viewport` is set.
+ * [`viewport`](https://playwright.dev/docs/api/class-androiddevice#android-device-launch-browser-option-viewport) is
+ * set.
*/
screen?: {
/**
@@ -16028,8 +16662,8 @@ export interface AndroidDevice {
/**
* If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on
* selectors that imply single target DOM element will throw when more than one element matches the selector. This
- * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See {@link Locator} to
- * learn more about the strict mode.
+ * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See
+ * [Locator](https://playwright.dev/docs/api/class-locator) to learn more about the strict mode.
*/
strictSelectors?: boolean;
@@ -16046,7 +16680,9 @@ export interface AndroidDevice {
userAgent?: string;
/**
- * @deprecated Use `recordVideo` instead.
+ * @deprecated Use
+ * [`recordVideo`](https://playwright.dev/docs/api/class-androiddevice#android-device-launch-browser-option-record-video)
+ * instead.
*/
videoSize?: {
/**
@@ -16061,7 +16697,9 @@ export interface AndroidDevice {
};
/**
- * @deprecated Use `recordVideo` instead.
+ * @deprecated Use
+ * [`recordVideo`](https://playwright.dev/docs/api/class-androiddevice#android-device-launch-browser-option-record-video)
+ * instead.
*/
videosPath?: string;
@@ -16086,7 +16724,8 @@ export interface AndroidDevice {
}): Promise<BrowserContext>;
/**
- * Performs a long tap on the widget defined by `selector`.
+ * Performs a long tap on the widget defined by
+ * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-long-tap-option-selector).
* @param selector Selector to tap on.
* @param options
*/
@@ -16112,7 +16751,9 @@ export interface AndroidDevice {
open(command: string): Promise<AndroidSocket>;
/**
- * Pinches the widget defined by `selector` in the closing direction.
+ * Pinches the widget defined by
+ * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-pinch-close-option-selector) in the
+ * closing direction.
* @param selector Selector to pinch close.
* @param percent The size of the pinch as a percentage of the widget's size.
* @param options
@@ -16133,7 +16774,9 @@ export interface AndroidDevice {
}): Promise<void>;
/**
- * Pinches the widget defined by `selector` in the open direction.
+ * Pinches the widget defined by
+ * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-pinch-open-option-selector) in the
+ * open direction.
* @param selector Selector to pinch open.
* @param percent The size of the pinch as a percentage of the widget's size.
* @param options
@@ -16154,7 +16797,9 @@ export interface AndroidDevice {
}): Promise<void>;
/**
- * Presses the specific `key` in the widget defined by `selector`.
+ * Presses the specific [`key`](https://playwright.dev/docs/api/class-androiddevice#android-device-press-option-key)
+ * in the widget defined by
+ * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-press-option-selector).
* @param selector Selector to press the key in.
* @param key The key to press.
* @param options
@@ -16188,14 +16833,19 @@ export interface AndroidDevice {
*/
screenshot(options?: {
/**
- * The file path to save the image to. If `path` is a relative path, then it is resolved relative to the current
- * working directory. If no path is provided, the image won't be saved to the disk.
+ * The file path to save the image to. If
+ * [`path`](https://playwright.dev/docs/api/class-androiddevice#android-device-screenshot-option-path) is a relative
+ * path, then it is resolved relative to the current working directory. If no path is provided, the image won't be
+ * saved to the disk.
*/
path?: string;
}): Promise<Buffer>;
/**
- * Scrolls the widget defined by `selector` in the specified `direction`.
+ * Scrolls the widget defined by
+ * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-scroll-option-selector) in the
+ * specified
+ * [`direction`](https://playwright.dev/docs/api/class-androiddevice#android-device-scroll-option-direction).
* @param selector Selector to scroll.
* @param direction Scroll direction.
* @param percent Distance to scroll as a percentage of the widget's size.
@@ -16222,7 +16872,9 @@ export interface AndroidDevice {
serial(): string;
/**
- * This setting will change the default maximum time for all the methods accepting `timeout` option.
+ * This setting will change the default maximum time for all the methods accepting
+ * [`timeout`](https://playwright.dev/docs/api/class-androiddevice#android-device-set-default-timeout-option-timeout)
+ * option.
* @param timeout Maximum time in milliseconds
*/
setDefaultTimeout(timeout: number): void;
@@ -16234,7 +16886,9 @@ export interface AndroidDevice {
shell(command: string): Promise<Buffer>;
/**
- * Swipes the widget defined by `selector` in the specified `direction`.
+ * Swipes the widget defined by
+ * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-swipe-option-selector) in the
+ * specified [`direction`](https://playwright.dev/docs/api/class-androiddevice#android-device-swipe-option-direction).
* @param selector Selector to swipe.
* @param direction Swipe direction.
* @param percent Distance to swipe as a percentage of the widget's size.
@@ -16256,7 +16910,8 @@ export interface AndroidDevice {
}): Promise<void>;
/**
- * Taps on the widget defined by `selector`.
+ * Taps on the widget defined by
+ * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-tap-option-selector).
* @param selector Selector to tap on.
* @param options
*/
@@ -16276,7 +16931,10 @@ export interface AndroidDevice {
}): Promise<void>;
/**
- * Waits for the specific `selector` to either appear or disappear, depending on the `state`.
+ * Waits for the specific
+ * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-wait-option-selector) to either
+ * appear or disappear, depending on the
+ * [`state`](https://playwright.dev/docs/api/class-androiddevice#android-device-wait-option-state).
* @param selector Selector to wait for.
* @param options
*/
@@ -16309,8 +16967,12 @@ export interface AndroidDevice {
/**
- * This method waits until {@link AndroidWebView} matching the `selector` is opened and returns it. If there is
- * already an open {@link AndroidWebView} matching the `selector`, returns immediately.
+ * This method waits until [AndroidWebView](https://playwright.dev/docs/api/class-androidwebview) matching the
+ * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-web-view-option-selector) is opened
+ * and returns it. If there is already an open [AndroidWebView](https://playwright.dev/docs/api/class-androidwebview)
+ * matching the
+ * [`selector`](https://playwright.dev/docs/api/class-androiddevice#android-device-web-view-option-selector), returns
+ * immediately.
* @param selector
* @param options
*/
@@ -16346,7 +17008,8 @@ export interface AndroidDevice {
export interface AndroidInput {
/**
- * Performs a drag between `from` and `to` points.
+ * Performs a drag between [`from`](https://playwright.dev/docs/api/class-androidinput#android-input-drag-option-from)
+ * and [`to`](https://playwright.dev/docs/api/class-androidinput#android-input-drag-option-to) points.
* @param from The start point of the drag.
* @param to The end point of the drag.
* @param steps The number of steps in the drag. Each step takes 5 milliseconds to complete.
@@ -16362,15 +17025,17 @@ export interface AndroidInput {
}, steps: number): Promise<void>;
/**
- * Presses the `key`.
+ * Presses the [`key`](https://playwright.dev/docs/api/class-androidinput#android-input-press-option-key).
* @param key Key to press.
*/
press(key: AndroidKey): Promise<void>;
/**
- * Swipes following the path defined by `segments`.
+ * Swipes following the path defined by
+ * [`segments`](https://playwright.dev/docs/api/class-androidinput#android-input-swipe-option-segments).
* @param from The point to start swiping from.
- * @param segments Points following the `from` point in the swipe gesture.
+ * @param segments Points following the [`from`](https://playwright.dev/docs/api/class-androidinput#android-input-swipe-option-from)
+ * point in the swipe gesture.
* @param steps The number of steps for each segment. Each step takes 5 milliseconds to complete, so 100 steps means half a second
* per each segment.
*/
@@ -16385,7 +17050,7 @@ export interface AndroidInput {
}>, steps: number): Promise<void>;
/**
- * Taps at the specified `point`.
+ * Taps at the specified [`point`](https://playwright.dev/docs/api/class-androidinput#android-input-tap-option-point).
* @param point The point to tap at.
*/
tap(point: {
@@ -16395,14 +17060,16 @@ export interface AndroidInput {
}): Promise<void>;
/**
- * Types `text` into currently focused widget.
+ * Types [`text`](https://playwright.dev/docs/api/class-androidinput#android-input-type-option-text) into currently
+ * focused widget.
* @param text Text to type.
*/
type(text: string): Promise<void>;
}
/**
- * {@link AndroidSocket} is a way to communicate with a process launched on the {@link AndroidDevice}. Use
+ * [AndroidSocket](https://playwright.dev/docs/api/class-androidsocket) is a way to communicate with a process
+ * launched on the [AndroidDevice](https://playwright.dev/docs/api/class-androiddevice). Use
* [androidDevice.open(command)](https://playwright.dev/docs/api/class-androiddevice#android-device-open) to open a
* socket.
*/
@@ -16473,7 +17140,8 @@ export interface AndroidSocket {
close(): Promise<void>;
/**
- * Writes some `data` to the socket.
+ * Writes some [`data`](https://playwright.dev/docs/api/class-androidsocket#android-socket-write-option-data) to the
+ * socket.
* @param data Data to write.
*/
write(data: Buffer): Promise<void>;
@@ -16482,7 +17150,8 @@ export interface AndroidSocket {
}
/**
- * {@link AndroidWebView} represents a WebView open on the {@link AndroidDevice}. WebView is usually obtained using
+ * [AndroidWebView](https://playwright.dev/docs/api/class-androidwebview) represents a WebView open on the
+ * [AndroidDevice](https://playwright.dev/docs/api/class-androiddevice). WebView is usually obtained using
* [androidDevice.webView(selector[, options])](https://playwright.dev/docs/api/class-androiddevice#android-device-web-view).
*/
export interface AndroidWebView {
@@ -16517,7 +17186,8 @@ export interface AndroidWebView {
prependListener(event: 'close', listener: () => any): this;
/**
- * Connects to the WebView and returns a regular Playwright {@link Page} to interact with.
+ * Connects to the WebView and returns a regular Playwright [Page](https://playwright.dev/docs/api/class-page) to
+ * interact with.
*/
page(): Promise<Page>;
@@ -16533,14 +17203,15 @@ export interface AndroidWebView {
}
/**
- * Exposes API that can be used for the Web API testing. This class is used for creating {@link APIRequestContext}
- * instance which in turn can be used for sending web requests. An instance of this class can be obtained via
+ * Exposes API that can be used for the Web API testing. This class is used for creating
+ * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) instance which in turn can be used for
+ * sending web requests. An instance of this class can be obtained via
* [playwright.request](https://playwright.dev/docs/api/class-playwright#playwright-request). For more information see
- * {@link APIRequestContext}.
+ * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext).
*/
export interface APIRequest {
/**
- * Creates new instances of {@link APIRequestContext}.
+ * Creates new instances of [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext).
* @param options
*/
newContext(options?: {
@@ -16633,10 +17304,11 @@ export interface APIRequest {
origin?: string;
/**
- * This option only applies to the requests sent from corresponding {@link APIRequestContext} and does not affect
- * requests sent from the browser. `'always'` - `Authorization` header with basic authentication credentials will be
- * sent with the each API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response
- * with `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
+ * This option only applies to the requests sent from corresponding
+ * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
+ * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
+ * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
+ * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
*/
send?: "unauthorized"|"always";
};
@@ -16734,8 +17406,9 @@ export interface APIRequest {
* This API is used for the Web API testing. You can use it to trigger API endpoints, configure micro-services,
* prepare environment or the service to your e2e test.
*
- * Each Playwright browser context has associated with it {@link APIRequestContext} instance which shares cookie
- * storage with the browser context and can be accessed via
+ * Each Playwright browser context has associated with it
+ * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) instance which shares cookie storage
+ * with the browser context and can be accessed via
* [browserContext.request](https://playwright.dev/docs/api/class-browsercontext#browser-context-request) or
* [page.request](https://playwright.dev/docs/api/class-page#page-request). It is also possible to create a new
* APIRequestContext instance manually by calling
@@ -16743,16 +17416,17 @@ export interface APIRequest {
*
* **Cookie management**
*
- * {@link APIRequestContext} returned by
+ * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) returned by
* [browserContext.request](https://playwright.dev/docs/api/class-browsercontext#browser-context-request) and
* [page.request](https://playwright.dev/docs/api/class-page#page-request) shares cookie storage with the
- * corresponding {@link BrowserContext}. Each API request will have `Cookie` header populated with the values from the
- * browser context. If the API response contains `Set-Cookie` header it will automatically update {@link
- * BrowserContext} cookies and requests made from the page will pick them up. This means that if you log in using this
- * API, your e2e test will be logged in and vice versa.
+ * corresponding [BrowserContext](https://playwright.dev/docs/api/class-browsercontext). Each API request will have
+ * `Cookie` header populated with the values from the browser context. If the API response contains `Set-Cookie`
+ * header it will automatically update [BrowserContext](https://playwright.dev/docs/api/class-browsercontext) cookies
+ * and requests made from the page will pick them up. This means that if you log in using this API, your e2e test will
+ * be logged in and vice versa.
*
- * If you want API requests to not interfere with the browser cookies you should create a new {@link
- * APIRequestContext} by calling
+ * If you want API requests to not interfere with the browser cookies you should create a new
+ * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) by calling
* [apiRequest.newContext([options])](https://playwright.dev/docs/api/class-apirequest#api-request-new-context). Such
* `APIRequestContext` object will have its own isolated cookie storage.
*/
@@ -16848,7 +17522,8 @@ export interface APIRequestContext {
* [apiRequestContext.get(url[, options])](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get)
* and similar methods are stored in the memory, so that you can later call
* [apiResponse.body()](https://playwright.dev/docs/api/class-apiresponse#api-response-body).This method discards all
- * its resources, calling any method on disposed {@link APIRequestContext} will throw an exception.
+ * its resources, calling any method on disposed
+ * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) will throw an exception.
* @param options
*/
dispose(options?: {
@@ -17484,8 +18159,10 @@ export interface APIRequestContext {
*/
storageState(options?: {
/**
- * The file path to save the storage state to. If `path` is a relative path, then it is resolved relative to current
- * working directory. If no path is provided, storage state is still returned, but won't be saved to the disk.
+ * The file path to save the storage state to. If
+ * [`path`](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-storage-state-option-path) is
+ * a relative path, then it is resolved relative to current working directory. If no path is provided, storage state
+ * is still returned, but won't be saved to the disk.
*/
path?: string;
}): Promise<{
@@ -17525,7 +18202,7 @@ export interface APIRequestContext {
}
/**
- * {@link APIResponse} class represents responses returned by
+ * [APIResponse](https://playwright.dev/docs/api/class-apiresponse) class represents responses returned by
* [apiRequestContext.get(url[, options])](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get)
* and similar methods.
*/
@@ -17661,8 +18338,8 @@ export interface BrowserServer {
* Accurately simulating time-dependent behavior is essential for verifying the correctness of applications. Learn
* more about [clock emulation](https://playwright.dev/docs/clock).
*
- * Note that clock is installed for the entire {@link BrowserContext}, so the time in all the pages and iframes is
- * controlled by the same clock.
+ * Note that clock is installed for the entire [BrowserContext](https://playwright.dev/docs/api/class-browsercontext),
+ * so the time in all the pages and iframes is controlled by the same clock.
*/
export interface Clock {
/**
@@ -17780,7 +18457,7 @@ export interface Clock {
}
/**
- * {@link ConsoleMessage} objects are dispatched by page via the
+ * [ConsoleMessage](https://playwright.dev/docs/api/class-consolemessage) objects are dispatched by page via the
* [page.on('console')](https://playwright.dev/docs/api/class-page#page-event-console) event. For each console message
* logged in the page there will be corresponding event in the Playwright context.
*
@@ -17893,8 +18570,9 @@ export interface Coverage {
* Returns coverage is started
*
* **NOTE** Anonymous scripts are ones that don't have an associated url. These are scripts that are dynamically
- * created on the page using `eval` or `new Function`. If `reportAnonymousScripts` is set to `true`, anonymous scripts
- * will have `__playwright_evaluation_script__` as their URL.
+ * created on the page using `eval` or `new Function`. If
+ * [`reportAnonymousScripts`](https://playwright.dev/docs/api/class-coverage#coverage-start-js-coverage-option-report-anonymous-scripts)
+ * is set to `true`, anonymous scripts will have `__playwright_evaluation_script__` as their URL.
* @param options
*/
startJSCoverage(options?: {
@@ -17983,7 +18661,7 @@ export interface Coverage {
}
/**
- * {@link Dialog} objects are dispatched by page via the
+ * [Dialog](https://playwright.dev/docs/api/class-dialog) objects are dispatched by page via the
* [page.on('dialog')](https://playwright.dev/docs/api/class-page#page-event-dialog) event.
*
* An example of using `Dialog` class:
@@ -18045,7 +18723,7 @@ export interface Dialog {
}
/**
- * {@link Download} objects are dispatched by page via the
+ * [Download](https://playwright.dev/docs/api/class-download) objects are dispatched by page via the
* [page.on('download')](https://playwright.dev/docs/api/class-page#page-event-download) event.
*
* All the downloaded files belonging to the browser context are deleted when the browser context is closed.
@@ -18181,7 +18859,8 @@ export interface Download {
*/
export interface Electron {
/**
- * Launches electron application specified with the `executablePath`.
+ * Launches electron application specified with the
+ * [`executablePath`](https://playwright.dev/docs/api/class-electron#electron-launch-option-executable-path).
* @param options
*/
launch(options?: {
@@ -18260,10 +18939,11 @@ export interface Electron {
origin?: string;
/**
- * This option only applies to the requests sent from corresponding {@link APIRequestContext} and does not affect
- * requests sent from the browser. `'always'` - `Authorization` header with basic authentication credentials will be
- * sent with the each API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response
- * with `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
+ * This option only applies to the requests sent from corresponding
+ * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
+ * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
+ * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
+ * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
*/
send?: "unauthorized"|"always";
};
@@ -18320,8 +19000,9 @@ export interface Electron {
mode?: "full"|"minimal";
/**
- * A glob or regex pattern to filter requests that are stored in the HAR. When a `baseURL` via the context options was
- * provided and the passed URL is a path, it gets merged via the
+ * A glob or regex pattern to filter requests that are stored in the HAR. When a
+ * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
+ * options was provided and the passed URL is a path, it gets merged via the
* [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
*/
urlFilter?: string|RegExp;
@@ -18378,7 +19059,7 @@ export interface Electron {
}
/**
- * {@link FileChooser} objects are dispatched by the page in the
+ * [FileChooser](https://playwright.dev/docs/api/class-filechooser) objects are dispatched by the page in the
* [page.on('filechooser')](https://playwright.dev/docs/api/class-page#page-event-file-chooser) event.
*
* ```js
@@ -18486,13 +19167,15 @@ export interface FileChooser {
*
* **Converting Locator to FrameLocator**
*
- * If you have a {@link Locator} object pointing to an `iframe` it can be converted to {@link FrameLocator} using
+ * If you have a [Locator](https://playwright.dev/docs/api/class-locator) object pointing to an `iframe` it can be
+ * converted to [FrameLocator](https://playwright.dev/docs/api/class-framelocator) using
* [locator.contentFrame()](https://playwright.dev/docs/api/class-locator#locator-content-frame).
*
* **Converting FrameLocator to Locator**
*
- * If you have a {@link FrameLocator} object it can be converted to {@link Locator} pointing to the same `iframe`
- * using [frameLocator.owner()](https://playwright.dev/docs/api/class-framelocator#frame-locator-owner).
+ * If you have a [FrameLocator](https://playwright.dev/docs/api/class-framelocator) object it can be converted to
+ * [Locator](https://playwright.dev/docs/api/class-locator) pointing to the same `iframe` using
+ * [frameLocator.owner()](https://playwright.dev/docs/api/class-framelocator#frame-locator-owner).
*/
export interface FrameLocator {
/**
@@ -18652,8 +19335,10 @@ export interface FrameLocator {
disabled?: boolean;
/**
- * Whether `name` is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when `name` is a
- * regular expression. Note that exact match still trims whitespace.
+ * Whether [`name`](https://playwright.dev/docs/api/class-framelocator#frame-locator-get-by-role-option-name) is
+ * matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when
+ * [`name`](https://playwright.dev/docs/api/class-framelocator#frame-locator-get-by-role-option-name) is a regular
+ * expression. Note that exact match still trims whitespace.
*/
exact?: boolean;
@@ -18682,7 +19367,9 @@ export interface FrameLocator {
/**
* Option to match the [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). By default, matching is
- * case-insensitive and searches for a substring, use `exact` to control this behavior.
+ * case-insensitive and searches for a substring, use
+ * [`exact`](https://playwright.dev/docs/api/class-framelocator#frame-locator-get-by-role-option-exact) to control
+ * this behavior.
*
* Learn more about [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
*/
@@ -18847,8 +19534,8 @@ export interface FrameLocator {
* `<article><content><div>Playwright</div></content></article>`. However, looking for `content` that has `article
* div` will fail, because the inner locator must be relative and should not use any elements outside the `content`.
*
- * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
- * FrameLocator}s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
+ * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
*/
has?: Locator;
@@ -18856,8 +19543,8 @@ export interface FrameLocator {
* Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the
* outer one. For example, `article` that does not have `div` matches `<article><span>Playwright</span></article>`.
*
- * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
- * FrameLocator}s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain
+ * [FrameLocator](https://playwright.dev/docs/api/class-framelocator)s.
*/
hasNot?: Locator;
@@ -18884,10 +19571,11 @@ export interface FrameLocator {
nth(index: number): FrameLocator;
/**
- * Returns a {@link Locator} object pointing to the same `iframe` as this frame locator.
+ * Returns a [Locator](https://playwright.dev/docs/api/class-locator) object pointing to the same `iframe` as this
+ * frame locator.
*
- * Useful when you have a {@link FrameLocator} object obtained somewhere, and later on would like to interact with the
- * `iframe` element.
+ * Useful when you have a [FrameLocator](https://playwright.dev/docs/api/class-framelocator) object obtained
+ * somewhere, and later on would like to interact with the `iframe` element.
*
* For a reverse operation, use
* [locator.contentFrame()](https://playwright.dev/docs/api/class-locator#locator-content-frame).
@@ -18952,9 +19640,10 @@ export interface Keyboard {
/**
* Dispatches a `keydown` event.
*
- * `key` can specify the intended
+ * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-down-option-key) can specify the intended
* [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
- * to generate the text for. A superset of the `key` values can be found
+ * to generate the text for. A superset of the
+ * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-down-option-key) values can be found
* [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
*
* `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
@@ -18964,14 +19653,15 @@ export interface Keyboard {
* Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
* `ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.
*
- * Holding down `Shift` will type the text that corresponds to the `key` in the upper case.
+ * Holding down `Shift` will type the text that corresponds to the
+ * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-down-option-key) in the upper case.
*
- * If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
- * texts.
+ * If [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-down-option-key) is a single character, it is
+ * case-sensitive, so the values `a` and `A` will generate different respective texts.
*
- * If `key` is a modifier key, `Shift`, `Meta`, `Control`, or `Alt`, subsequent key presses will be sent with that
- * modifier active. To release the modifier key, use
- * [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
+ * If [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-down-option-key) is a modifier key, `Shift`,
+ * `Meta`, `Control`, or `Alt`, subsequent key presses will be sent with that modifier active. To release the modifier
+ * key, use [keyboard.up(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-up).
*
* After the key is pressed once, subsequent calls to
* [keyboard.down(key)](https://playwright.dev/docs/api/class-keyboard#keyboard-down) will have
@@ -19002,9 +19692,10 @@ export interface Keyboard {
* **NOTE** In most cases, you should use
* [locator.press(key[, options])](https://playwright.dev/docs/api/class-locator#locator-press) instead.
*
- * `key` can specify the intended
+ * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-press-option-key) can specify the intended
* [keyboardEvent.key](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value or a single character
- * to generate the text for. A superset of the `key` values can be found
+ * to generate the text for. A superset of the
+ * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-press-option-key) values can be found
* [here](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values). Examples of the keys are:
*
* `F1` - `F12`, `Digit0`- `Digit9`, `KeyA`- `KeyZ`, `Backquote`, `Minus`, `Equal`, `Backslash`, `Backspace`, `Tab`,
@@ -19014,10 +19705,11 @@ export interface Keyboard {
* Following modification shortcuts are also supported: `Shift`, `Control`, `Alt`, `Meta`, `ShiftLeft`,
* `ControlOrMeta`. `ControlOrMeta` resolves to `Control` on Windows and Linux and to `Meta` on macOS.
*
- * Holding down `Shift` will type the text that corresponds to the `key` in the upper case.
+ * Holding down `Shift` will type the text that corresponds to the
+ * [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-press-option-key) in the upper case.
*
- * If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
- * texts.
+ * If [`key`](https://playwright.dev/docs/api/class-keyboard#keyboard-press-option-key) is a single character, it is
+ * case-sensitive, so the values `a` and `A` will generate different respective texts.
*
* Shortcuts such as `key: "Control+o"`, `key: "Control++` or `key: "Control+Shift+T"` are supported as well. When
* specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed.
@@ -19251,12 +19943,14 @@ export interface Mouse {
}
/**
- * This object can be used to launch or connect to Chromium, returning instances of {@link Browser}.
+ * This object can be used to launch or connect to Chromium, returning instances of
+ * [Browser](https://playwright.dev/docs/api/class-browser).
*/
export const chromium: BrowserType;
/**
- * This object can be used to launch or connect to Firefox, returning instances of {@link Browser}.
+ * This object can be used to launch or connect to Firefox, returning instances of
+ * [Browser](https://playwright.dev/docs/api/class-browser).
*/
export const firefox: BrowserType;
@@ -19272,13 +19966,14 @@ export const request: APIRequest;
export const selectors: Selectors;
/**
- * This object can be used to launch or connect to WebKit, returning instances of {@link Browser}.
+ * This object can be used to launch or connect to WebKit, returning instances of
+ * [Browser](https://playwright.dev/docs/api/class-browser).
*/
export const webkit: BrowserType;
/**
- * Whenever the page sends a request for a network resource the following sequence of events are emitted by {@link
- * Page}:
+ * Whenever the page sends a request for a network resource the following sequence of events are emitted by
+ * [Page](https://playwright.dev/docs/api/class-page):
* - [page.on('request')](https://playwright.dev/docs/api/class-page#page-event-request) emitted when the request is
* issued by the page.
* - [page.on('response')](https://playwright.dev/docs/api/class-page#page-event-response) emitted when/if the
@@ -19324,7 +20019,7 @@ export interface Request {
};
/**
- * Returns the {@link Frame} that initiated this request.
+ * Returns the [Frame](https://playwright.dev/docs/api/class-frame) that initiated this request.
*
* **Usage**
*
@@ -19419,9 +20114,10 @@ export interface Request {
/**
* Request that was redirected by the server to this one, if any.
*
- * When the server responds with a redirect, Playwright creates a new {@link Request} object. The two requests are
- * connected by `redirectedFrom()` and `redirectedTo()` methods. When multiple server redirects has happened, it is
- * possible to construct the whole redirect chain by repeatedly calling `redirectedFrom()`.
+ * When the server responds with a redirect, Playwright creates a new
+ * [Request](https://playwright.dev/docs/api/class-request) object. The two requests are connected by
+ * `redirectedFrom()` and `redirectedTo()` methods. When multiple server redirects has happened, it is possible to
+ * construct the whole redirect chain by repeatedly calling `redirectedFrom()`.
*
* **Usage**
*
@@ -19465,12 +20161,13 @@ export interface Request {
resourceType(): string;
/**
- * Returns the matching {@link Response} object, or `null` if the response was not received due to error.
+ * Returns the matching [Response](https://playwright.dev/docs/api/class-response) object, or `null` if the response
+ * was not received due to error.
*/
response(): Promise<null|Response>;
/**
- * The Service {@link Worker} that is performing the request.
+ * The Service [Worker](https://playwright.dev/docs/api/class-worker) that is performing the request.
*
* **Details**
*
@@ -19586,7 +20283,7 @@ export interface Request {
}
/**
- * {@link Response} class represents responses which are received by page.
+ * [Response](https://playwright.dev/docs/api/class-response) class represents responses which are received by page.
*/
export interface Response {
/**
@@ -19605,7 +20302,7 @@ export interface Response {
finished(): Promise<null|Error>;
/**
- * Returns the {@link Frame} that initiated this response.
+ * Returns the [Frame](https://playwright.dev/docs/api/class-frame) that initiated this response.
*/
frame(): Frame;
@@ -19667,7 +20364,7 @@ export interface Response {
ok(): boolean;
/**
- * Returns the matching {@link Request} object.
+ * Returns the matching [Request](https://playwright.dev/docs/api/class-request) object.
*/
request(): Request;
@@ -19786,9 +20483,10 @@ export interface Route {
*
* **Details**
*
- * Note that any overrides such as `url` or `headers` only apply to the request being routed. If this request results
- * in a redirect, overrides will not be applied to the new redirected request. If you want to propagate a header
- * through redirects, use the combination of
+ * Note that any overrides such as [`url`](https://playwright.dev/docs/api/class-route#route-continue-option-url) or
+ * [`headers`](https://playwright.dev/docs/api/class-route#route-continue-option-headers) only apply to the request
+ * being routed. If this request results in a redirect, overrides will not be applied to the new redirected request.
+ * If you want to propagate a header through redirects, use the combination of
* [route.fetch([options])](https://playwright.dev/docs/api/class-route#route-fetch) and
* [route.fulfill([options])](https://playwright.dev/docs/api/class-route#route-fulfill) instead.
*
@@ -19931,9 +20629,11 @@ export interface Route {
*
* **Details**
*
- * Note that `headers` option will apply to the fetched request as well as any redirects initiated by it. If you want
- * to only apply `headers` to the original request, but not to redirects, look into
- * [route.continue([options])](https://playwright.dev/docs/api/class-route#route-continue) instead.
+ * Note that [`headers`](https://playwright.dev/docs/api/class-route#route-fetch-option-headers) option will apply to
+ * the fetched request as well as any redirects initiated by it. If you want to only apply
+ * [`headers`](https://playwright.dev/docs/api/class-route#route-fetch-option-headers) to the original request, but
+ * not to redirects, look into [route.continue([options])](https://playwright.dev/docs/api/class-route#route-continue)
+ * instead.
* @param options
*/
fetch(options?: {
@@ -20030,8 +20730,8 @@ export interface Route {
path?: string;
/**
- * {@link APIResponse} to fulfill route's request with. Individual fields of the response (such as headers) can be
- * overridden using fulfill options.
+ * [APIResponse](https://playwright.dev/docs/api/class-apiresponse) to fulfill route's request with. Individual fields
+ * of the response (such as headers) can be overridden using fulfill options.
*/
response?: APIResponse;
@@ -20134,10 +20834,12 @@ export interface Selectors {
*/
export interface Touchscreen {
/**
- * Dispatches a `touchstart` and `touchend` event with a single touch at the position (`x`,`y`).
+ * Dispatches a `touchstart` and `touchend` event with a single touch at the position
+ * ([`x`](https://playwright.dev/docs/api/class-touchscreen#touchscreen-tap-option-x),[`y`](https://playwright.dev/docs/api/class-touchscreen#touchscreen-tap-option-y)).
*
* **NOTE** [page.tap(selector[, options])](https://playwright.dev/docs/api/class-page#page-tap) the method will throw
- * if `hasTouch` option of the browser context is false.
+ * if [`hasTouch`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-has-touch) option of the
+ * browser context is false.
* @param x X coordinate relative to the main frame's viewport in CSS pixels.
* @param y Y coordinate relative to the main frame's viewport in CSS pixels.
*/
@@ -20178,7 +20880,8 @@ export interface Tracing {
start(options?: {
/**
* If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the
- * `tracesDir` directory specified in
+ * [`tracesDir`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-traces-dir) directory
+ * specified in
* [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch). To specify
* the final trace zip file name, you need to pass `path` option to
* [tracing.stop([options])](https://playwright.dev/docs/api/class-tracing#tracing-stop) instead.
@@ -20209,7 +20912,8 @@ export interface Tracing {
}): Promise<void>;
/**
- * Start a new trace chunk. If you'd like to record multiple traces on the same {@link BrowserContext}, use
+ * Start a new trace chunk. If you'd like to record multiple traces on the same
+ * [BrowserContext](https://playwright.dev/docs/api/class-browsercontext), use
* [tracing.start([options])](https://playwright.dev/docs/api/class-tracing#tracing-start) once, and then create
* multiple trace chunks with
* [tracing.startChunk([options])](https://playwright.dev/docs/api/class-tracing#tracing-start-chunk) and
@@ -20238,7 +20942,8 @@ export interface Tracing {
startChunk(options?: {
/**
* If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the
- * `tracesDir` directory specified in
+ * [`tracesDir`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-traces-dir) directory
+ * specified in
* [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch). To specify
* the final trace zip file name, you need to pass `path` option to
* [tracing.stopChunk([options])](https://playwright.dev/docs/api/class-tracing#tracing-stop-chunk) instead.
@@ -20307,7 +21012,8 @@ export interface Video {
}
/**
- * {@link WebError} class represents an unhandled exception thrown in the page. It is dispatched via the
+ * [WebError](https://playwright.dev/docs/api/class-weberror) class represents an unhandled exception thrown in the
+ * page. It is dispatched via the
* [browserContext.on('weberror')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-web-error)
* event.
*
@@ -20335,7 +21041,8 @@ export interface WebError {
}
/**
- * The {@link WebSocket} class represents websocket connections in the page.
+ * The [WebSocket](https://playwright.dev/docs/api/class-websocket) class represents websocket connections in the
+ * page.
*/
export interface WebSocket {
/**
@@ -20615,7 +21322,8 @@ export interface LaunchOptions {
/**
* **Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the
- * `headless` option will be set `false`.
+ * [`headless`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-headless) option will be
+ * set `false`.
* @deprecated Use [debugging tools](https://playwright.dev/docs/debug) instead.
*/
devtools?: boolean;
@@ -20633,9 +21341,10 @@ export interface LaunchOptions {
env?: { [key: string]: string|number|boolean; };
/**
- * 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.
+ * Path to a browser executable to run instead of the bundled one. If
+ * [`executablePath`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-executable-path) 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.
*/
executablePath?: string;
@@ -20664,13 +21373,15 @@ export interface LaunchOptions {
* Whether to run browser in headless mode. More details for
* [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
* [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the
- * `devtools` option is `true`.
+ * [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is
+ * `true`.
*/
headless?: boolean;
/**
- * If `true`, Playwright does not pass its own configurations args and only uses the ones from `args`. If an array is
- * given, then filters out the given default arguments. Dangerous option; use with care. Defaults to `false`.
+ * If `true`, Playwright does not pass its own configurations args and only uses the ones from
+ * [`args`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-args). If an array is given,
+ * then filters out the given default arguments. Dangerous option; use with care. Defaults to `false`.
*/
ignoreDefaultArgs?: boolean|Array<string>;
@@ -20811,7 +21522,9 @@ export interface LocatorScreenshotOptions {
/**
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
- * box `#FF00FF` (customized by `maskColor`) that completely covers its bounding box.
+ * box `#FF00FF` (customized by
+ * [`maskColor`](https://playwright.dev/docs/api/class-locator#locator-screenshot-option-mask-color)) that completely
+ * covers its bounding box.
*/
mask?: Array<Locator>;
@@ -20828,9 +21541,10 @@ export interface LocatorScreenshotOptions {
omitBackground?: boolean;
/**
- * The file path to save the image to. The screenshot type will be inferred from file extension. If `path` is a
- * relative path, then it is resolved relative to the current working directory. If no path is provided, the image
- * won't be saved to the disk.
+ * The file path to save the image to. The screenshot type will be inferred from file extension. If
+ * [`path`](https://playwright.dev/docs/api/class-locator#locator-screenshot-option-path) is a relative path, then it
+ * is resolved relative to the current working directory. If no path is provided, the image won't be saved to the
+ * disk.
*/
path?: string;
@@ -21122,8 +21836,9 @@ export interface BrowserContextOptions {
mode?: "full"|"minimal";
/**
- * A glob or regex pattern to filter requests that are stored in the HAR. When a `baseURL` via the context options was
- * provided and the passed URL is a path, it gets merged via the
+ * A glob or regex pattern to filter requests that are stored in the HAR. When a
+ * [`baseURL`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-base-url) via the context
+ * options was provided and the passed URL is a path, it gets merged via the
* [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
*/
urlFilter?: string|RegExp;
@@ -21168,7 +21883,7 @@ export interface BrowserContextOptions {
/**
* Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the
- * `viewport` is set.
+ * [`viewport`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-viewport) is set.
*/
screen?: {
/**
@@ -21249,8 +21964,8 @@ export interface BrowserContextOptions {
/**
* If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on
* selectors that imply single target DOM element will throw when more than one element matches the selector. This
- * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See {@link Locator} to
- * learn more about the strict mode.
+ * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See
+ * [Locator](https://playwright.dev/docs/api/class-locator) to learn more about the strict mode.
*/
strictSelectors?: boolean;
@@ -21267,7 +21982,7 @@ export interface BrowserContextOptions {
userAgent?: string;
/**
- * @deprecated Use `recordVideo` instead.
+ * @deprecated Use [`recordVideo`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-video) instead.
*/
videoSize?: {
/**
@@ -21282,7 +21997,7 @@ export interface BrowserContextOptions {
};
/**
- * @deprecated Use `recordVideo` instead.
+ * @deprecated Use [`recordVideo`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-record-video) instead.
*/
videosPath?: string;
@@ -21319,10 +22034,11 @@ export interface HTTPCredentials {
origin?: string;
/**
- * This option only applies to the requests sent from corresponding {@link APIRequestContext} and does not affect
- * requests sent from the browser. `'always'` - `Authorization` header with basic authentication credentials will be
- * sent with the each API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response
- * with `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
+ * This option only applies to the requests sent from corresponding
+ * [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) and does not affect requests sent from
+ * the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each
+ * API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with
+ * `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
*/
send?: "unauthorized"|"always";
}
@@ -21394,9 +22110,11 @@ interface PageWaitForSelectorOptions {
interface PageWaitForFunctionOptions {
/**
- * If `polling` is `'raf'`, then `pageFunction` is constantly executed in `requestAnimationFrame` callback. If
- * `polling` is a number, then it is treated as an interval in milliseconds at which the function would be executed.
- * Defaults to `raf`.
+ * If [`polling`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-polling) is `'raf'`, then
+ * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-expression) is constantly
+ * executed in `requestAnimationFrame` callback. If
+ * [`polling`](https://playwright.dev/docs/api/class-page#page-wait-for-function-option-polling) is a number, then it
+ * is treated as an interval in milliseconds at which the function would be executed. Defaults to `raf`.
*/
polling?: number|"raf";
@@ -21459,7 +22177,9 @@ export interface PageScreenshotOptions {
/**
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
- * box `#FF00FF` (customized by `maskColor`) that completely covers its bounding box.
+ * box `#FF00FF` (customized by
+ * [`maskColor`](https://playwright.dev/docs/api/class-page#page-screenshot-option-mask-color)) that completely covers
+ * its bounding box.
*/
mask?: Array<Locator>;
@@ -21476,9 +22196,9 @@ export interface PageScreenshotOptions {
omitBackground?: boolean;
/**
- * The file path to save the image to. The screenshot type will be inferred from file extension. If `path` is a
- * relative path, then it is resolved relative to the current working directory. If no path is provided, the image
- * won't be saved to the disk.
+ * The file path to save the image to. The screenshot type will be inferred from file extension. If
+ * [`path`](https://playwright.dev/docs/api/class-page#page-screenshot-option-path) is a relative path, then it is
+ * resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk.
*/
path?: string;
diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.ts
index f158baac36..20acf25421 100644
--- a/packages/playwright/types/test.d.ts
+++ b/packages/playwright/types/test.d.ts
@@ -36,13 +36,14 @@ type UseOptions<TestArgs, WorkerArgs> = Partial<WorkerArgs> & Partial<TestArgs>;
/**
* Playwright Test supports running multiple test projects at the same time. This is useful for running tests in
* multiple configurations. For example, consider running tests against multiple browsers. This type describes format
- * of a project in the configuration file, to access resolved configuration parameters at run time use {@link
- * FullProject}.
+ * of a project in the configuration file, to access resolved configuration parameters at run time use
+ * [FullProject](https://playwright.dev/docs/api/class-fullproject).
*
* `TestProject` encapsulates configuration specific to a single project. Projects are configured in
* [testConfig.projects](https://playwright.dev/docs/api/class-testconfig#test-config-projects) specified in the
- * [configuration file](https://playwright.dev/docs/test-configuration). Note that all properties of {@link TestProject} are available in
- * the top-level {@link TestConfig}, in which case they are shared between all projects.
+ * [configuration file](https://playwright.dev/docs/test-configuration). Note that all properties of
+ * [TestProject](https://playwright.dev/docs/api/class-testproject) are available in the top-level
+ * [TestConfig](https://playwright.dev/docs/api/class-testconfig), in which case they are shared between all projects.
*
* Here is an example configuration that runs every test in Chromium, Firefox and WebKit, both Desktop and Mobile
* versions.
@@ -89,7 +90,8 @@ interface TestProject<TestArgs = {}, WorkerArgs = {}> {
/**
* Options for all tests in this project, for example
* [testOptions.browserName](https://playwright.dev/docs/api/class-testoptions#test-options-browser-name). Learn more
- * about [configuration](https://playwright.dev/docs/test-configuration) and see [available options]{@link TestOptions}.
+ * about [configuration](https://playwright.dev/docs/test-configuration) and see
+ * [available options][TestOptions](https://playwright.dev/docs/api/class-testoptions).
*
* ```js
* // playwright.config.ts
@@ -190,25 +192,26 @@ interface TestProject<TestArgs = {}, WorkerArgs = {}> {
maxDiffPixelRatio?: number;
/**
- * See `animations` in [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot).
- * Defaults to `"disabled"`.
+ * See [`animations`](https://playwright.dev/docs/api/class-page#page-screenshot-option-animations) in
+ * [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot). Defaults to `"disabled"`.
*/
animations?: "allow"|"disabled";
/**
- * See `caret` in [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot). Defaults
- * to `"hide"`.
+ * See [`caret`](https://playwright.dev/docs/api/class-page#page-screenshot-option-caret) in
+ * [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot). Defaults to `"hide"`.
*/
caret?: "hide"|"initial";
/**
- * See `scale` in [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot). Defaults
- * to `"css"`.
+ * See [`scale`](https://playwright.dev/docs/api/class-page#page-screenshot-option-scale) in
+ * [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot). Defaults to `"css"`.
*/
scale?: "css"|"device";
/**
- * See `style` in [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot).
+ * See [`style`](https://playwright.dev/docs/api/class-page#page-screenshot-option-style) in
+ * [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot).
*/
stylePath?: string|Array<string>;
};
@@ -641,8 +644,8 @@ export interface Project<TestArgs = {}, WorkerArgs = {}> extends TestProject<Tes
* Runtime representation of the test project configuration. It is accessible in the tests via
* [testInfo.project](https://playwright.dev/docs/api/class-testinfo#test-info-project) and
* [workerInfo.project](https://playwright.dev/docs/api/class-workerinfo#worker-info-project) and is passed to the
- * test reporters. To see the format of the project in the Playwright configuration file please see {@link
- * TestProject} instead.
+ * test reporters. To see the format of the project in the Playwright configuration file please see
+ * [TestProject](https://playwright.dev/docs/api/class-testproject) instead.
*/
export interface FullProject<TestArgs = {}, WorkerArgs = {}> {
/**
@@ -724,13 +727,15 @@ type LiteralUnion<T extends U, U = string> = T | (U & { zz_IGNORE_ME?: never });
/**
* Playwright Test provides many options to configure how your tests are collected and executed, for example `timeout`
- * or `testDir`. These options are described in the {@link TestConfig} object in the
- * [configuration file](https://playwright.dev/docs/test-configuration). This type describes format of the configuration file, to access
- * resolved configuration parameters at run time use {@link FullConfig}.
+ * or `testDir`. These options are described in the [TestConfig](https://playwright.dev/docs/api/class-testconfig)
+ * object in the [configuration file](https://playwright.dev/docs/test-configuration). This type describes format of the configuration file,
+ * to access resolved configuration parameters at run time use
+ * [FullConfig](https://playwright.dev/docs/api/class-fullconfig).
*
* Playwright Test supports running multiple test projects at the same time. Project-specific options should be put to
- * [testConfig.projects](https://playwright.dev/docs/api/class-testconfig#test-config-projects), but top-level {@link
- * TestConfig} can also define base options shared between all projects.
+ * [testConfig.projects](https://playwright.dev/docs/api/class-testconfig#test-config-projects), but top-level
+ * [TestConfig](https://playwright.dev/docs/api/class-testconfig) can also define base options shared between all
+ * projects.
*
* ```js
* // playwright.config.ts
@@ -747,8 +752,8 @@ type LiteralUnion<T extends U, U = string> = T | (U & { zz_IGNORE_ME?: never });
*/
interface TestConfig<TestArgs = {}, WorkerArgs = {}> {
/**
- * Playwright Test supports running multiple test projects at the same time. See {@link TestProject} for more
- * information.
+ * Playwright Test supports running multiple test projects at the same time. See
+ * [TestProject](https://playwright.dev/docs/api/class-testproject) for more information.
*
* **Usage**
*
@@ -791,7 +796,8 @@ interface TestConfig<TestArgs = {}, WorkerArgs = {}> {
/**
* Global options for all tests, for example
* [testOptions.browserName](https://playwright.dev/docs/api/class-testoptions#test-options-browser-name). Learn more
- * about [configuration](https://playwright.dev/docs/test-configuration) and see [available options]{@link TestOptions}.
+ * about [configuration](https://playwright.dev/docs/test-configuration) and see
+ * [available options][TestOptions](https://playwright.dev/docs/api/class-testoptions).
*
* **Usage**
*
@@ -945,14 +951,14 @@ interface TestConfig<TestArgs = {}, WorkerArgs = {}> {
*/
toHaveScreenshot?: {
/**
- * See `animations` in [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot).
- * Defaults to `"disabled"`.
+ * See [`animations`](https://playwright.dev/docs/api/class-page#page-screenshot-option-animations) in
+ * [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot). Defaults to `"disabled"`.
*/
animations?: "allow"|"disabled";
/**
- * See `caret` in [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot). Defaults
- * to `"hide"`.
+ * See [`caret`](https://playwright.dev/docs/api/class-page#page-screenshot-option-caret) in
+ * [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot). Defaults to `"hide"`.
*/
caret?: "hide"|"initial";
@@ -968,13 +974,14 @@ interface TestConfig<TestArgs = {}, WorkerArgs = {}> {
maxDiffPixelRatio?: number;
/**
- * See `scale` in [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot). Defaults
- * to `"css"`.
+ * See [`scale`](https://playwright.dev/docs/api/class-page#page-screenshot-option-scale) in
+ * [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot). Defaults to `"css"`.
*/
scale?: "css"|"device";
/**
- * See `style` in [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot).
+ * See [`style`](https://playwright.dev/docs/api/class-page#page-screenshot-option-style) in
+ * [page.screenshot([options])](https://playwright.dev/docs/api/class-page#page-screenshot).
*/
stylePath?: string|Array<string>;
@@ -1070,7 +1077,7 @@ interface TestConfig<TestArgs = {}, WorkerArgs = {}> {
/**
* Path to the global setup file. This file will be required and run before all the tests. It must export a single
- * function that takes a {@link FullConfig} argument.
+ * function that takes a [FullConfig](https://playwright.dev/docs/api/class-fullconfig) argument.
*
* Learn more about [global setup and teardown](https://playwright.dev/docs/test-global-setup-teardown).
*
@@ -1692,7 +1699,8 @@ export type Metadata = { [key: string]: any };
/**
* Resolved configuration which is accessible via
* [testInfo.config](https://playwright.dev/docs/api/class-testinfo#test-info-config) and is passed to the test
- * reporters. To see the format of Playwright configuration file, please see {@link TestConfig} instead.
+ * reporters. To see the format of Playwright configuration file, please see
+ * [TestConfig](https://playwright.dev/docs/api/class-testconfig) instead.
*/
export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
/**
@@ -2192,7 +2200,8 @@ interface TestFunction<TestArgs> {
* Learn more about [test annotations](https://playwright.dev/docs/test-annotations).
* @param title Test title.
* @param details Additional test details.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
*/
(title: string, body: (args: TestArgs, testInfo: TestInfo) => Promise<void> | void): void;
/**
@@ -2268,7 +2277,8 @@ interface TestFunction<TestArgs> {
* Learn more about [test annotations](https://playwright.dev/docs/test-annotations).
* @param title Test title.
* @param details Additional test details.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
*/
(title: string, details: TestDetails, body: (args: TestArgs, testInfo: TestInfo) => Promise<void> | void): void;
}
@@ -2304,7 +2314,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
*/
only: TestFunction<TestArgs & WorkerArgs>;
/**
@@ -2795,7 +2806,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
* @param condition Test is marked as "should fail" when the condition is `true`.
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
* "should fail" when the return value is `true`.
@@ -2875,7 +2887,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
* @param condition Test is marked as "should fail" when the condition is `true`.
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
* "should fail" when the return value is `true`.
@@ -2955,7 +2968,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
* @param condition Test is marked as "should fail" when the condition is `true`.
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
* "should fail" when the return value is `true`.
@@ -3035,7 +3049,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
* @param condition Test is marked as "should fail" when the condition is `true`.
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
* "should fail" when the return value is `true`.
@@ -3115,7 +3130,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
* @param condition Test is marked as "should fail" when the condition is `true`.
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
* "should fail" when the return value is `true`.
@@ -3192,7 +3208,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
* @param condition Test is marked as "should fail" when the condition is `true`.
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
* "should fail" when the return value is `true`.
@@ -3269,7 +3286,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
* @param condition Test is marked as "should fail" when the condition is `true`.
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
* "should fail" when the return value is `true`.
@@ -3346,7 +3364,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
* @param condition Test is marked as "should fail" when the condition is `true`.
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
* "should fail" when the return value is `true`.
@@ -3423,7 +3442,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
* @param condition Test is marked as "should fail" when the condition is `true`.
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
* "should fail" when the return value is `true`.
@@ -3500,7 +3520,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
* @param condition Test is marked as "should fail" when the condition is `true`.
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
* "should fail" when the return value is `true`.
@@ -3576,7 +3597,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
* @param condition Test is marked as "should fail" when the condition is `true`.
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
* "should fail" when the return value is `true`.
@@ -3652,7 +3674,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
* @param condition Test is marked as "should fail" when the condition is `true`.
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
* "should fail" when the return value is `true`.
@@ -3728,7 +3751,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
* @param condition Test is marked as "should fail" when the condition is `true`.
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
* "should fail" when the return value is `true`.
@@ -3804,7 +3828,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
* @param condition Test is marked as "should fail" when the condition is `true`.
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
* "should fail" when the return value is `true`.
@@ -3880,7 +3905,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* @param title Test title.
* @param details See [test.(call)(title[, details, body])](https://playwright.dev/docs/api/class-test#test-call) for test details
* description.
- * @param body Test body that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param body Test body that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
* @param condition Test is marked as "should fail" when the condition is `true`.
* @param callback A function that returns whether to mark as "should fail", based on test fixtures. Test or tests are marked as
* "should fail" when the return value is `true`.
@@ -4121,8 +4147,9 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe) group, runs
* before each test in the group.
*
- * You can access all the same {@link Fixtures} as the test body itself, and also the {@link TestInfo} object that
- * gives a lot of useful information. For example, you can navigate the page before starting the test.
+ * You can access all the same [Fixtures](https://playwright.dev/docs/api/class-fixtures) as the test body itself, and
+ * also the [TestInfo](https://playwright.dev/docs/api/class-testinfo) object that gives a lot of useful information.
+ * For example, you can navigate the page before starting the test.
*
* You can use [test.afterEach([title, hookFunction])](https://playwright.dev/docs/api/class-test#test-after-each) to
* teardown any resources set up in `beforeEach`.
@@ -4162,7 +4189,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* ```
*
* @param title Hook title.
- * @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
*/
beforeEach(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@@ -4172,8 +4200,9 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe) group, runs
* before each test in the group.
*
- * You can access all the same {@link Fixtures} as the test body itself, and also the {@link TestInfo} object that
- * gives a lot of useful information. For example, you can navigate the page before starting the test.
+ * You can access all the same [Fixtures](https://playwright.dev/docs/api/class-fixtures) as the test body itself, and
+ * also the [TestInfo](https://playwright.dev/docs/api/class-testinfo) object that gives a lot of useful information.
+ * For example, you can navigate the page before starting the test.
*
* You can use [test.afterEach([title, hookFunction])](https://playwright.dev/docs/api/class-test#test-after-each) to
* teardown any resources set up in `beforeEach`.
@@ -4213,7 +4242,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* ```
*
* @param title Hook title.
- * @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
*/
beforeEach(title: string, inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@@ -4223,8 +4253,9 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe) group, runs
* after each test in the group.
*
- * You can access all the same {@link Fixtures} as the test body itself, and also the {@link TestInfo} object that
- * gives a lot of useful information. For example, you can check whether the test succeeded or failed.
+ * You can access all the same [Fixtures](https://playwright.dev/docs/api/class-fixtures) as the test body itself, and
+ * also the [TestInfo](https://playwright.dev/docs/api/class-testinfo) object that gives a lot of useful information.
+ * For example, you can check whether the test succeeded or failed.
* - `test.afterEach(hookFunction)`
* - `test.afterEach(title, hookFunction)`
*
@@ -4263,7 +4294,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* ```
*
* @param title Hook title.
- * @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
*/
afterEach(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@@ -4273,8 +4305,9 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe) group, runs
* after each test in the group.
*
- * You can access all the same {@link Fixtures} as the test body itself, and also the {@link TestInfo} object that
- * gives a lot of useful information. For example, you can check whether the test succeeded or failed.
+ * You can access all the same [Fixtures](https://playwright.dev/docs/api/class-fixtures) as the test body itself, and
+ * also the [TestInfo](https://playwright.dev/docs/api/class-testinfo) object that gives a lot of useful information.
+ * For example, you can check whether the test succeeded or failed.
* - `test.afterEach(hookFunction)`
* - `test.afterEach(title, hookFunction)`
*
@@ -4313,7 +4346,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* ```
*
* @param title Hook title.
- * @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
+ * @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
*/
afterEach(title: string, inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@@ -4366,7 +4400,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* ```
*
* @param title Hook title.
- * @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional {@link TestInfo}.
+ * @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
*/
beforeAll(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@@ -4419,7 +4454,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* ```
*
* @param title Hook title.
- * @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional {@link TestInfo}.
+ * @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
*/
beforeAll(title: string, inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@@ -4459,7 +4495,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* ```
*
* @param title Hook title.
- * @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional {@link TestInfo}.
+ * @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
*/
afterAll(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@@ -4499,7 +4536,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* ```
*
* @param title Hook title.
- * @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional {@link TestInfo}.
+ * @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional
+ * [TestInfo](https://playwright.dev/docs/api/class-testinfo).
*/
afterAll(title: string, inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@@ -4862,8 +4900,9 @@ type ConnectOptions = {
};
/**
- * Playwright Test provides many options to configure test environment, {@link Browser}, {@link BrowserContext} and
- * more.
+ * Playwright Test provides many options to configure test environment,
+ * [Browser](https://playwright.dev/docs/api/class-browser),
+ * [BrowserContext](https://playwright.dev/docs/api/class-browsercontext) and more.
*
* These options are usually provided in the [configuration file](https://playwright.dev/docs/test-configuration) through
* [testConfig.use](https://playwright.dev/docs/api/class-testconfig#test-config-use) and
@@ -4901,7 +4940,7 @@ type ConnectOptions = {
export interface PlaywrightWorkerOptions {
/**
* Name of the browser that runs tests. Defaults to `'chromium'`. Most of the time you should set `browserName` in
- * your {@link TestConfig}:
+ * your [TestConfig](https://playwright.dev/docs/api/class-testconfig):
*
* **Usage**
*
@@ -4923,7 +4962,8 @@ export interface PlaywrightWorkerOptions {
* Whether to run browser in headless mode. More details for
* [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and
* [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the
- * `devtools` option is `true`.
+ * [`devtools`](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-option-devtools) option is
+ * `true`.
*
* **Usage**
*
@@ -5108,8 +5148,9 @@ export type TraceMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry' |
export type VideoMode = 'off' | 'on' | 'retain-on-failure' | 'on-first-retry';
/**
- * Playwright Test provides many options to configure test environment, {@link Browser}, {@link BrowserContext} and
- * more.
+ * Playwright Test provides many options to configure test environment,
+ * [Browser](https://playwright.dev/docs/api/class-browser),
+ * [BrowserContext](https://playwright.dev/docs/api/class-browsercontext) and more.
*
* These options are usually provided in the [configuration file](https://playwright.dev/docs/test-configuration) through
* [testConfig.use](https://playwright.dev/docs/api/class-testconfig#test-config-use) and
@@ -5726,10 +5767,11 @@ export interface PlaywrightTestOptions {
* ```
*
* Given the test above, Playwright Test will set up the `page` fixture before running the test, and tear it down
- * after the test has finished. `page` fixture provides a {@link Page} object that is available to the test.
+ * after the test has finished. `page` fixture provides a [Page](https://playwright.dev/docs/api/class-page) object
+ * that is available to the test.
*
* Playwright Test comes with builtin fixtures listed below, and you can add your own fixtures as well. Playwright
- * Test also [provides options]{@link TestOptions} to configure
+ * Test also [provides options][TestOptions](https://playwright.dev/docs/api/class-testoptions) to configure
* [fixtures.browser](https://playwright.dev/docs/api/class-fixtures#fixtures-browser),
* [fixtures.context](https://playwright.dev/docs/api/class-fixtures#fixtures-context) and
* [fixtures.page](https://playwright.dev/docs/api/class-fixtures#fixtures-page).
@@ -5737,10 +5779,12 @@ export interface PlaywrightTestOptions {
export interface PlaywrightWorkerArgs {
playwright: typeof import('playwright-core');
/**
- * {@link Browser} instance is shared between all tests in the [same worker](https://playwright.dev/docs/test-parallel) - this makes testing
- * efficient. However, each test runs in an isolated {@link BrowserContext} and gets a fresh environment.
+ * [Browser](https://playwright.dev/docs/api/class-browser) instance is shared between all tests in the
+ * [same worker](https://playwright.dev/docs/test-parallel) - this makes testing efficient. However, each test runs in an isolated
+ * [BrowserContext](https://playwright.dev/docs/api/class-browsercontext) and gets a fresh environment.
*
- * Learn how to [configure browser](https://playwright.dev/docs/test-configuration) and see [available options]{@link TestOptions}.
+ * Learn how to [configure browser](https://playwright.dev/docs/test-configuration) and see
+ * [available options][TestOptions](https://playwright.dev/docs/api/class-testoptions).
*
* **Usage**
*
@@ -5772,21 +5816,23 @@ export interface PlaywrightWorkerArgs {
* ```
*
* Given the test above, Playwright Test will set up the `page` fixture before running the test, and tear it down
- * after the test has finished. `page` fixture provides a {@link Page} object that is available to the test.
+ * after the test has finished. `page` fixture provides a [Page](https://playwright.dev/docs/api/class-page) object
+ * that is available to the test.
*
* Playwright Test comes with builtin fixtures listed below, and you can add your own fixtures as well. Playwright
- * Test also [provides options]{@link TestOptions} to configure
+ * Test also [provides options][TestOptions](https://playwright.dev/docs/api/class-testoptions) to configure
* [fixtures.browser](https://playwright.dev/docs/api/class-fixtures#fixtures-browser),
* [fixtures.context](https://playwright.dev/docs/api/class-fixtures#fixtures-context) and
* [fixtures.page](https://playwright.dev/docs/api/class-fixtures#fixtures-page).
*/
export interface PlaywrightTestArgs {
/**
- * Isolated {@link BrowserContext} instance, created for each test. Since contexts are isolated between each other,
- * every test gets a fresh environment, even when multiple tests run in a single {@link Browser} for maximum
- * efficiency.
+ * Isolated [BrowserContext](https://playwright.dev/docs/api/class-browsercontext) instance, created for each test.
+ * Since contexts are isolated between each other, every test gets a fresh environment, even when multiple tests run
+ * in a single [Browser](https://playwright.dev/docs/api/class-browser) for maximum efficiency.
*
- * Learn how to [configure context](https://playwright.dev/docs/test-configuration) and see [available options]{@link TestOptions}.
+ * Learn how to [configure context](https://playwright.dev/docs/test-configuration) and see
+ * [available options][TestOptions](https://playwright.dev/docs/api/class-testoptions).
*
* Default [fixtures.page](https://playwright.dev/docs/api/class-fixtures#fixtures-page) belongs to this context.
*
@@ -5802,8 +5848,8 @@ export interface PlaywrightTestArgs {
*/
context: BrowserContext;
/**
- * Isolated {@link Page} instance, created for each test. Pages are isolated between tests due to
- * [fixtures.context](https://playwright.dev/docs/api/class-fixtures#fixtures-context) isolation.
+ * Isolated [Page](https://playwright.dev/docs/api/class-page) instance, created for each test. Pages are isolated
+ * between tests due to [fixtures.context](https://playwright.dev/docs/api/class-fixtures#fixtures-context) isolation.
*
* This is the most common fixture used in a test.
*
@@ -5824,7 +5870,7 @@ export interface PlaywrightTestArgs {
*/
page: Page;
/**
- * Isolated {@link APIRequestContext} instance for each test.
+ * Isolated [APIRequestContext](https://playwright.dev/docs/api/class-apirequestcontext) instance for each test.
*
* **Usage**
*
@@ -5858,8 +5904,9 @@ type AsymmetricMatcher = Record<string, any>;
interface AsymmetricMatchers {
/**
- * `expect.any()` matches any object instance created from the `constructor` or a corresponding primitive type. Use it
- * inside
+ * `expect.any()` matches any object instance created from the
+ * [`constructor`](https://playwright.dev/docs/api/class-genericassertions#generic-assertions-any-option-constructor)
+ * or a corresponding primitive type. Use it inside
* [expect(value).toEqual(expected)](https://playwright.dev/docs/api/class-genericassertions#generic-assertions-to-equal)
* to perform pattern matching.
*
@@ -6002,8 +6049,9 @@ interface AsymmetricMatchers {
}
/**
- * The {@link GenericAssertions} class provides assertion methods that can be used to make assertions about any values
- * in the tests. A new instance of {@link GenericAssertions} is created by calling
+ * The [GenericAssertions](https://playwright.dev/docs/api/class-genericassertions) class provides assertion methods
+ * that can be used to make assertions about any values in the tests. A new instance of
+ * [GenericAssertions](https://playwright.dev/docs/api/class-genericassertions) is created by calling
* [expect(value)](https://playwright.dev/docs/api/class-playwrightassertions#playwright-assertions-expect-generic):
*
* ```js
@@ -6028,8 +6076,10 @@ interface GenericAssertions<R> {
*/
not: GenericAssertions<R>;
/**
- * Compares value with `expected` by calling `Object.is`. This method compares objects by reference instead of their
- * contents, similarly to the strict equality operator `===`.
+ * Compares value with
+ * [`expected`](https://playwright.dev/docs/api/class-genericassertions#generic-assertions-to-be-option-expected) by
+ * calling `Object.is`. This method compares objects by reference instead of their contents, similarly to the strict
+ * equality operator `===`.
*
* **Usage**
*
@@ -6254,7 +6304,9 @@ interface GenericAssertions<R> {
*/
toContainEqual(expected: unknown): R;
/**
- * Compares contents of the value with contents of `expected`, performing "deep equality" check.
+ * Compares contents of the value with contents of
+ * [`expected`](https://playwright.dev/docs/api/class-genericassertions#generic-assertions-to-equal-option-expected),
+ * performing "deep equality" check.
*
* For objects, this method recursively checks equality of all fields, rather than comparing objects by reference as
* performed by
@@ -6313,7 +6365,9 @@ interface GenericAssertions<R> {
*/
toEqual(expected: unknown): R;
/**
- * Ensures that value has a `.length` property equal to `expected`. Useful for arrays and strings.
+ * Ensures that value has a `.length` property equal to
+ * [`expected`](https://playwright.dev/docs/api/class-genericassertions#generic-assertions-to-have-length-option-expected).
+ * Useful for arrays and strings.
*
* **Usage**
*
@@ -6327,7 +6381,9 @@ interface GenericAssertions<R> {
toHaveLength(expected: number): R;
/**
* Ensures that property at provided `keyPath` exists on the object and optionally checks that property is equal to
- * the `expected`. Equality is checked recursively, similarly to
+ * the
+ * [`expected`](https://playwright.dev/docs/api/class-genericassertions#generic-assertions-to-have-property-option-expected).
+ * Equality is checked recursively, similarly to
* [expect(value).toEqual(expected)](https://playwright.dev/docs/api/class-genericassertions#generic-assertions-to-equal).
*
* **Usage**
@@ -6365,8 +6421,9 @@ interface GenericAssertions<R> {
*/
toMatch(expected: RegExp | string): R;
/**
- * Compares contents of the value with contents of `expected`, performing "deep equality" check. Allows extra
- * properties to be present in the value, unlike
+ * Compares contents of the value with contents of
+ * [`expected`](https://playwright.dev/docs/api/class-genericassertions#generic-assertions-to-match-object-option-expected),
+ * performing "deep equality" check. Allows extra properties to be present in the value, unlike
* [expect(value).toEqual(expected)](https://playwright.dev/docs/api/class-genericassertions#generic-assertions-to-equal),
* so you can check just a subset of object properties.
*
@@ -6390,7 +6447,9 @@ interface GenericAssertions<R> {
*/
toMatchObject(expected: Record<string, unknown> | Array<unknown>): R;
/**
- * Compares contents of the value with contents of `expected` **and** their types.
+ * Compares contents of the value with contents of
+ * [`expected`](https://playwright.dev/docs/api/class-genericassertions#generic-assertions-to-strict-equal-option-expected)
+ * **and** their types.
*
* Differences from
* [expect(value).toEqual(expected)](https://playwright.dev/docs/api/class-genericassertions#generic-assertions-to-equal):
@@ -6412,7 +6471,9 @@ interface GenericAssertions<R> {
/**
* Calls the function and ensures it throws an error.
*
- * Optionally compares the error with `expected`. Allowed expected values:
+ * Optionally compares the error with
+ * [`expected`](https://playwright.dev/docs/api/class-genericassertions#generic-assertions-to-throw-option-expected).
+ * Allowed expected values:
* - Regular expression - error message should **match** the pattern.
* - String - error message should **include** the substring.
* - Error object - error message should be **equal to** the message property of the object.
@@ -6637,8 +6698,9 @@ export { };
/**
- * The {@link APIResponseAssertions} class provides assertion methods that can be used to make assertions about the
- * {@link APIResponse} in the tests.
+ * The [APIResponseAssertions](https://playwright.dev/docs/api/class-apiresponseassertions) class provides assertion
+ * methods that can be used to make assertions about the
+ * [APIResponse](https://playwright.dev/docs/api/class-apiresponse) in the tests.
*
* ```js
* import { test, expect } from '@playwright/test';
@@ -6677,8 +6739,9 @@ interface APIResponseAssertions {
}
/**
- * The {@link LocatorAssertions} class provides assertion methods that can be used to make assertions about the {@link
- * Locator} state in the tests.
+ * The [LocatorAssertions](https://playwright.dev/docs/api/class-locatorassertions) class provides assertion methods
+ * that can be used to make assertions about the [Locator](https://playwright.dev/docs/api/class-locator) state in the
+ * tests.
*
* ```js
* import { test, expect } from '@playwright/test';
@@ -6693,7 +6756,7 @@ interface APIResponseAssertions {
*/
interface LocatorAssertions {
/**
- * Ensures that {@link Locator} points to an element that is
+ * Ensures that [Locator](https://playwright.dev/docs/api/class-locator) points to an element that is
* [connected](https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected) to a Document or a ShadowRoot.
*
* **Usage**
@@ -6714,7 +6777,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to a checked input.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to a checked input.
*
* **Usage**
*
@@ -6735,8 +6798,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to a disabled element. Element is disabled if it has "disabled" attribute or is
- * disabled via
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to a disabled element. Element is
+ * disabled if it has "disabled" attribute or is disabled via
* ['aria-disabled'](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled). Note
* that only native control elements such as HTML `button`, `input`, `select`, `textarea`, `option`, `optgroup` can be
* disabled by setting "disabled" attribute. "disabled" attribute on other elements is ignored by the browser.
@@ -6758,7 +6821,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to an editable element.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to an editable element.
*
* **Usage**
*
@@ -6779,7 +6842,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to an empty editable element or to a DOM node that has no text.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to an empty editable element or to a
+ * DOM node that has no text.
*
* **Usage**
*
@@ -6798,7 +6862,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to an enabled element.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to an enabled element.
*
* **Usage**
*
@@ -6819,7 +6883,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to a focused DOM node.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to a focused DOM node.
*
* **Usage**
*
@@ -6838,8 +6902,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures that {@link Locator} either does not resolve to any DOM node, or resolves to a
- * [non-visible](https://playwright.dev/docs/actionability#visible) one.
+ * Ensures that [Locator](https://playwright.dev/docs/api/class-locator) either does not resolve to any DOM node, or
+ * resolves to a [non-visible](https://playwright.dev/docs/actionability#visible) one.
*
* **Usage**
*
@@ -6858,7 +6922,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to an element that intersects viewport, according to the
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to an element that intersects viewport,
+ * according to the
* [intersection observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API).
*
* **Usage**
@@ -6889,7 +6954,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures that {@link Locator} points to an attached and [visible](https://playwright.dev/docs/actionability#visible) DOM node.
+ * Ensures that [Locator](https://playwright.dev/docs/api/class-locator) points to an attached and
+ * [visible](https://playwright.dev/docs/actionability#visible) DOM node.
*
* To check that at least one element from the list is visible, use
* [locator.first()](https://playwright.dev/docs/api/class-locator#locator-first).
@@ -6923,8 +6989,9 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to an element that contains the given text. All nested elements will be
- * considered when computing the text content of the element. You can use regular expressions for the value as well.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to an element that contains the given
+ * text. All nested elements will be considered when computing the text content of the element. You can use regular
+ * expressions for the value as well.
*
* **Details**
*
@@ -6976,8 +7043,9 @@ interface LocatorAssertions {
*/
toContainText(expected: string|RegExp|ReadonlyArray<string|RegExp>, options?: {
/**
- * Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
- * expression flag if specified.
+ * Whether to perform case-insensitive match.
+ * [`ignoreCase`](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-contain-text-option-ignore-case)
+ * option takes precedence over the corresponding regular expression flag if specified.
*/
ignoreCase?: boolean;
@@ -6993,7 +7061,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to an element with a given
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to an element with a given
* [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
*
* **Usage**
@@ -7008,8 +7076,9 @@ interface LocatorAssertions {
*/
toHaveAccessibleDescription(description: string|RegExp, options?: {
/**
- * Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
- * expression flag if specified.
+ * Whether to perform case-insensitive match.
+ * [`ignoreCase`](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-accessible-description-option-ignore-case)
+ * option takes precedence over the corresponding regular expression flag if specified.
*/
ignoreCase?: boolean;
@@ -7020,7 +7089,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to an element with a given
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to an element with a given
* [accessible name](https://w3c.github.io/accname/#dfn-accessible-name).
*
* **Usage**
@@ -7035,8 +7104,9 @@ interface LocatorAssertions {
*/
toHaveAccessibleName(name: string|RegExp, options?: {
/**
- * Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
- * expression flag if specified.
+ * Whether to perform case-insensitive match.
+ * [`ignoreCase`](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-accessible-name-option-ignore-case)
+ * option takes precedence over the corresponding regular expression flag if specified.
*/
ignoreCase?: boolean;
@@ -7047,7 +7117,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to an element with given attribute.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to an element with given attribute.
*
* **Usage**
*
@@ -7062,8 +7132,9 @@ interface LocatorAssertions {
*/
toHaveAttribute(name: string, value: string|RegExp, options?: {
/**
- * Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
- * expression flag if specified.
+ * Whether to perform case-insensitive match.
+ * [`ignoreCase`](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-attribute-option-ignore-case)
+ * option takes precedence over the corresponding regular expression flag if specified.
*/
ignoreCase?: boolean;
@@ -7074,7 +7145,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to an element with given attribute. The method will assert attribute presence.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to an element with given attribute. The
+ * method will assert attribute presence.
*
* ```js
* const locator = page.locator('input');
@@ -7094,8 +7166,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to an element with given CSS classes. This needs to be a full match or using a
- * relaxed regular expression.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to an element with given CSS classes.
+ * This needs to be a full match or using a relaxed regular expression.
*
* **Usage**
*
@@ -7127,7 +7199,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} resolves to an exact number of DOM nodes.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) resolves to an exact number of DOM nodes.
*
* **Usage**
*
@@ -7147,7 +7219,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} resolves to an element with the given computed CSS style.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) resolves to an element with the given computed
+ * CSS style.
*
* **Usage**
*
@@ -7168,7 +7241,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to an element with the given DOM Node ID.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to an element with the given DOM Node
+ * ID.
*
* **Usage**
*
@@ -7188,8 +7262,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to an element with given JavaScript property. Note that this property can be of
- * a primitive type as well as a plain serializable JavaScript object.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to an element with given JavaScript
+ * property. Note that this property can be of a primitive type as well as a plain serializable JavaScript object.
*
* **Usage**
*
@@ -7210,7 +7284,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to an element with a given
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to an element with a given
* [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles).
*
* Note that role is matched as a string, disregarding the ARIA role hierarchy. For example, asserting a superclass
@@ -7267,7 +7341,9 @@ interface LocatorAssertions {
/**
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
- * box `#FF00FF` (customized by `maskColor`) that completely covers its bounding box.
+ * box `#FF00FF` (customized by
+ * [`maskColor`](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-screenshot-1-option-mask-color))
+ * that completely covers its bounding box.
*/
mask?: Array<Locator>;
@@ -7357,7 +7433,9 @@ interface LocatorAssertions {
/**
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
- * box `#FF00FF` (customized by `maskColor`) that completely covers its bounding box.
+ * box `#FF00FF` (customized by
+ * [`maskColor`](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-screenshot-2-option-mask-color))
+ * that completely covers its bounding box.
*/
mask?: Array<Locator>;
@@ -7415,8 +7493,9 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to an element with the given text. All nested elements will be considered when
- * computing the text content of the element. You can use regular expressions for the value as well.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to an element with the given text. All
+ * nested elements will be considered when computing the text content of the element. You can use regular expressions
+ * for the value as well.
*
* **Details**
*
@@ -7467,8 +7546,9 @@ interface LocatorAssertions {
*/
toHaveText(expected: string|RegExp|ReadonlyArray<string|RegExp>, options?: {
/**
- * Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
- * expression flag if specified.
+ * Whether to perform case-insensitive match.
+ * [`ignoreCase`](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text-option-ignore-case)
+ * option takes precedence over the corresponding regular expression flag if specified.
*/
ignoreCase?: boolean;
@@ -7484,8 +7564,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to an element with the given input value. You can use regular expressions for
- * the value as well.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to an element with the given input
+ * value. You can use regular expressions for the value as well.
*
* **Usage**
*
@@ -7505,8 +7585,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the {@link Locator} points to multi-select/combobox (i.e. a `select` with the `multiple` attribute) and the
- * specified values are selected.
+ * Ensures the [Locator](https://playwright.dev/docs/api/class-locator) points to multi-select/combobox (i.e. a
+ * `select` with the `multiple` attribute) and the specified values are selected.
*
* **Usage**
*
@@ -7549,8 +7629,8 @@ interface LocatorAssertions {
}
/**
- * The {@link PageAssertions} class provides assertion methods that can be used to make assertions about the {@link
- * Page} state in the tests.
+ * The [PageAssertions](https://playwright.dev/docs/api/class-pageassertions) class provides assertion methods that
+ * can be used to make assertions about the [Page](https://playwright.dev/docs/api/class-page) state in the tests.
*
* ```js
* import { test, expect } from '@playwright/test';
@@ -7628,8 +7708,9 @@ interface PageAssertions {
*/
toHaveURL(urlOrRegExp: string|RegExp, options?: {
/**
- * Whether to perform case-insensitive match. `ignoreCase` option takes precedence over the corresponding regular
- * expression flag if specified.
+ * Whether to perform case-insensitive match.
+ * [`ignoreCase`](https://playwright.dev/docs/api/class-pageassertions#page-assertions-to-have-url-option-ignore-case)
+ * option takes precedence over the corresponding regular expression flag if specified.
*/
ignoreCase?: boolean;
@@ -7813,8 +7894,10 @@ export interface Location {
*/
export interface TestInfo {
/**
- * Attach a value or a file from disk to the current test. Some reporters show test attachments. Either `path` or
- * `body` must be specified, but not both.
+ * Attach a value or a file from disk to the current test. Some reporters show test attachments. Either
+ * [`path`](https://playwright.dev/docs/api/class-testinfo#test-info-attach-option-path) or
+ * [`body`](https://playwright.dev/docs/api/class-testinfo#test-info-attach-option-body) must be specified, but not
+ * both.
*
* For example, you can attach a screenshot to the test:
*
@@ -7848,19 +7931,22 @@ export interface TestInfo {
*/
attach(name: string, options?: {
/**
- * Attachment body. Mutually exclusive with `path`.
+ * Attachment body. Mutually exclusive with
+ * [`path`](https://playwright.dev/docs/api/class-testinfo#test-info-attach-option-path).
*/
body?: string|Buffer;
/**
* Content type of this attachment to properly present in the report, for example `'application/json'` or
- * `'image/png'`. If omitted, content type is inferred based on the `path`, or defaults to `text/plain` for [string]
- * attachments and `application/octet-stream` for [Buffer] attachments.
+ * `'image/png'`. If omitted, content type is inferred based on the
+ * [`path`](https://playwright.dev/docs/api/class-testinfo#test-info-attach-option-path), or defaults to `text/plain`
+ * for [string] attachments and `application/octet-stream` for [Buffer] attachments.
*/
contentType?: string;
/**
- * Path on the filesystem to the attached file. Mutually exclusive with `body`.
+ * Path on the filesystem to the attached file. Mutually exclusive with
+ * [`body`](https://playwright.dev/docs/api/class-testinfo#test-info-attach-option-body).
*/
path?: string;
}): Promise<void>;
@@ -8262,7 +8348,8 @@ export interface TestInfoError {
/**
* `WorkerInfo` contains information about the worker that is running tests and is available to worker-scoped
- * fixtures. `WorkerInfo` is a subset of {@link TestInfo} that is available in many other places.
+ * fixtures. `WorkerInfo` is a subset of [TestInfo](https://playwright.dev/docs/api/class-testinfo) that is available
+ * in many other places.
*/
export interface WorkerInfo {
/**
@@ -8345,7 +8432,9 @@ export interface PageAssertionsToHaveScreenshotOptions {
/**
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
- * box `#FF00FF` (customized by `maskColor`) that completely covers its bounding box.
+ * box `#FF00FF` (customized by
+ * [`maskColor`](https://playwright.dev/docs/api/class-pageassertions#page-assertions-to-have-screenshot-1-option-mask-color))
+ * that completely covers its bounding box.
*/
mask?: Array<Locator>;
diff --git a/packages/playwright/types/testReporter.d.ts b/packages/playwright/types/testReporter.d.ts
index f2a2d62b0a..a9d1f020ae 100644
--- a/packages/playwright/types/testReporter.d.ts
+++ b/packages/playwright/types/testReporter.d.ts
@@ -94,18 +94,20 @@ export interface FullResult {
*
* Here is a typical order of reporter calls:
* - [reporter.onBegin(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-on-begin) is called
- * once with a root suite that contains all other suites and tests. Learn more about [suites hierarchy]{@link
- * Suite}.
+ * once with a root suite that contains all other suites and tests. Learn more about
+ * [suites hierarchy][Suite](https://playwright.dev/docs/api/class-suite).
* - [reporter.onTestBegin(test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-test-begin) is
- * called for each test run. It is given a {@link TestCase} that is executed, and a {@link TestResult} that is
- * almost empty. Test result will be populated while the test runs (for example, with steps and stdio) and will
- * get final `status` once the test finishes.
+ * called for each test run. It is given a [TestCase](https://playwright.dev/docs/api/class-testcase) that is
+ * executed, and a [TestResult](https://playwright.dev/docs/api/class-testresult) that is almost empty. Test
+ * result will be populated while the test runs (for example, with steps and stdio) and will get final `status`
+ * once the test finishes.
* - [reporter.onStepBegin(test, result, step)](https://playwright.dev/docs/api/class-reporter#reporter-on-step-begin)
* and
* [reporter.onStepEnd(test, result, step)](https://playwright.dev/docs/api/class-reporter#reporter-on-step-end)
* are called for each executed step inside the test. When steps are executed, test run has not finished yet.
* - [reporter.onTestEnd(test, result)](https://playwright.dev/docs/api/class-reporter#reporter-on-test-end) is
- * called when test run has finished. By this time, {@link TestResult} is complete and you can use
+ * called when test run has finished. By this time, [TestResult](https://playwright.dev/docs/api/class-testresult)
+ * is complete and you can use
* [testResult.status](https://playwright.dev/docs/api/class-testresult#test-result-status),
* [testResult.error](https://playwright.dev/docs/api/class-testresult#test-result-error) and more.
* - [reporter.onEnd(result)](https://playwright.dev/docs/api/class-reporter#reporter-on-end) is called once after
@@ -128,12 +130,13 @@ export interface FullResult {
* **Merged report API notes**
*
* When merging multiple [`blob`](https://playwright.dev/docs/test-reporters#blob-reporter) reports via
- * [`merge-reports`](https://playwright.dev/docs/test-sharding#merge-reports-cli) CLI command, the same {@link Reporter} API is called to
- * produce final reports and all existing reporters should work without any changes. There some subtle differences
- * though which might affect some custom reporters.
- * - Projects from different shards are always kept as separate {@link TestProject} objects. E.g. if project
- * 'Desktop Chrome' was sharded across 5 machines then there will be 5 instances of projects with the same name in
- * the config passed to
+ * [`merge-reports`](https://playwright.dev/docs/test-sharding#merge-reports-cli) CLI command, the same
+ * [Reporter](https://playwright.dev/docs/api/class-reporter) API is called to produce final reports and all existing
+ * reporters should work without any changes. There some subtle differences though which might affect some custom
+ * reporters.
+ * - Projects from different shards are always kept as separate
+ * [TestProject](https://playwright.dev/docs/api/class-testproject) objects. E.g. if project 'Desktop Chrome' was
+ * sharded across 5 machines then there will be 5 instances of projects with the same name in the config passed to
* [reporter.onBegin(config, suite)](https://playwright.dev/docs/api/class-reporter#reporter-on-begin).
*/
export interface Reporter {
@@ -151,8 +154,8 @@ export interface Reporter {
*/
onEnd?(result: FullResult): Promise<{ status?: FullResult['status'] } | undefined | void> | void;
/**
- * Called once before running tests. All tests have been already discovered and put into a hierarchy of {@link
- * Suite}s.
+ * Called once before running tests. All tests have been already discovered and put into a hierarchy of
+ * [Suite](https://playwright.dev/docs/api/class-suite)s.
* @param config Resolved configuration.
* @param suite The root suite that contains all projects, files and test cases.
*/
@@ -321,16 +324,16 @@ export {};
/**
* `Suite` is a group of tests. All tests in Playwright Test form the following hierarchy:
- * - Root suite has a child suite for each {@link FullProject}.
+ * - Root suite has a child suite for each [FullProject](https://playwright.dev/docs/api/class-fullproject).
* - Project suite #1. Has a child suite for each test file in the project.
* - File suite #1
- * - {@link TestCase} #1
- * - {@link TestCase} #2
+ * - [TestCase](https://playwright.dev/docs/api/class-testcase) #1
+ * - [TestCase](https://playwright.dev/docs/api/class-testcase) #2
* - Suite corresponding to a
* [test.describe([title, details, callback])](https://playwright.dev/docs/api/class-test#test-describe)
* group
- * - {@link TestCase} #1 in a group
- * - {@link TestCase} #2 in a group
+ * - [TestCase](https://playwright.dev/docs/api/class-testcase) #1 in a group
+ * - [TestCase](https://playwright.dev/docs/api/class-testcase) #2 in a group
* - < more test cases ... >
* - File suite #2
* - < more file suites ... >
@@ -376,7 +379,7 @@ export interface Suite {
parent?: Suite;
/**
- * Child suites. See {@link Suite} for the hierarchy of suites.
+ * Child suites. See [Suite](https://playwright.dev/docs/api/class-suite) for the hierarchy of suites.
*/
suites: Array<Suite>;
@@ -578,7 +581,7 @@ export interface TestError {
}
/**
- * A result of a single {@link TestCase} run.
+ * A result of a single [TestCase](https://playwright.dev/docs/api/class-testcase) run.
*/
export interface TestResult {
/**
diff --git a/utils/doclint/documentation.js b/utils/doclint/documentation.js
index c4ac95ab8c..041f0de253 100644
--- a/utils/doclint/documentation.js
+++ b/utils/doclint/documentation.js
@@ -45,9 +45,8 @@ const md = require('../markdown');
* @typedef {function({
* clazz?: Class,
* member?: Member,
- * param?: string,
- * option?: string,
- * optionFullPath?: string,
+ * param?: { name: string, alias: string },
+ * option?: { name: string, alias: string },
* href?: string,
* }): string|undefined} Renderer
*/
@@ -742,7 +741,7 @@ function patchLinksInText(classOrMember, text, classesMap, membersMap, linkRende
return linkRenderer({ member, href }) || match;
}
if (p1 === 'param' || p1 === 'option') {
- let /** @type {string } */ alias;
+ let /** @type {string } */ name;
let /** @type {Member} */ member;
if (p2.includes('.')) {
// fully-qualified name
@@ -751,7 +750,7 @@ function patchLinksInText(classOrMember, text, classesMap, membersMap, linkRende
if (!maybeMember)
throw new Error(`Undefined reference: ${match}\n=========\n${text}`);
member = maybeMember;
- alias = rest.join('.');
+ name = rest.join('.');
} else {
// non-fully-qualified param/option reference from the same method.
if (!classOrMember || !(classOrMember instanceof Member)) {
@@ -762,23 +761,23 @@ function patchLinksInText(classOrMember, text, classesMap, membersMap, linkRende
if (!maybeMember)
throw new Error(`Undefined reference: ${match}\n=========\n${text}`);
member = maybeMember;
- alias = p2;
+ name = p2;
}
if (p1 === 'param') {
- const param = member.argsArray.find(a => a.name === alias);
+ const param = member.argsArray.find(a => a.name === name);
if (!param)
throw new Error(`Referenced parameter ${match} not found in the parent method ${member.name}\n=========\n${text}`);
- alias = param.alias;
- return linkRenderer({ member, param: alias, href }) || match;
+ return linkRenderer({ member, param: { name, alias: param.alias }, href }) || match;
} else {
// p1 === 'option'
const options = member.argsArray.find(a => a.name === 'options');
- const parts = alias.split('.');
- const option = options?.type?.properties?.find(a => a.name === parts[0]);
+ const parts = name.split('.');
+ const optionName = parts[0];
+ const option = options?.type?.properties?.find(a => a.name === optionName);
if (!option)
throw new Error(`Referenced option ${match} not found in the parent method ${member.name}\n=========\n${text}`);
parts[0] = option.alias;
- return linkRenderer({ member, option: parts[0], optionFullPath: parts.join('.'), href }) || match;
+ return linkRenderer({ member, option: { name: optionName, alias: parts.join('.') }, href }) || match;
}
}
throw new Error(`Undefined link prefix, expected event|method|property|param|option, got: ` + match);
diff --git a/utils/doclint/generateApiJson.js b/utils/doclint/generateApiJson.js
index 028e983d75..20ce604300 100644
--- a/utils/doclint/generateApiJson.js
+++ b/utils/doclint/generateApiJson.js
@@ -25,9 +25,9 @@ const PROJECT_DIR = path.join(__dirname, '..', '..');
documentation.setLinkRenderer(item => {
const { clazz, param, option } = item;
if (param)
- return `\`${param}\``;
+ return `\`${param.alias}\``;
if (option)
- return `\`${option}\``;
+ return `\`${option.alias}\``;
if (clazz)
return `\`${clazz.name}\``;
});
diff --git a/utils/doclint/generateDotnetApi.js b/utils/doclint/generateDotnetApi.js
index aa8210f619..006d6e494c 100644
--- a/utils/doclint/generateDotnetApi.js
+++ b/utils/doclint/generateDotnetApi.js
@@ -61,9 +61,9 @@ documentation.setLinkRenderer(item => {
else if (item.member)
return `<see cref="I${toTitleCase(item.member.clazz.name)}.${toMemberName(item.member)}${asyncSuffix}"/>`;
else if (item.option)
- return `<paramref name="${item.option}"/>`;
+ return `<paramref name="${item.option.name}"/>`;
else if (item.param)
- return `<paramref name="${item.param}"/>`;
+ return `<paramref name="${item.param.name}"/>`;
else
throw new Error('Unknown link format.');
});
diff --git a/utils/doclint/linkUtils.js b/utils/doclint/linkUtils.js
index a6e5433e0d..0c8b919a2d 100644
--- a/utils/doclint/linkUtils.js
+++ b/utils/doclint/linkUtils.js
@@ -20,7 +20,16 @@
const toKebabCase = require('lodash/kebabCase.js')
const Documentation = require('./documentation');
-function createMarkdownLink(languagePath, member, text) {
+/**
+ * @param {string} languagePath
+ * @param {Documentation.Member} member
+ * @param {string} text
+ * @param {string=} paramOrOption
+ * @returns {string}
+ */
+function createMarkdownLink(languagePath, member, text, paramOrOption) {
+ if (!member.clazz)
+ throw new Error('Member without a class!');
const className = toKebabCase(member.clazz.name);
const memberName = toKebabCase(member.name);
let hash = null;
@@ -28,6 +37,8 @@ function createMarkdownLink(languagePath, member, text) {
hash = `${className}-${memberName}`.toLowerCase();
else if (member.kind === 'event')
hash = `${className}-event-${memberName}`.toLowerCase();
+ if (paramOrOption)
+ hash += '-option-' + toKebabCase(paramOrOption).toLowerCase();
return `[${text}](https://playwright.dev${languagePath}/docs/api/class-${member.clazz.name.toLowerCase()}#${hash})`;
};
@@ -41,26 +52,21 @@ function createClassMarkdownLink(languagePath, clazz) {
};
/**
- * @param {string} language
+ * @param {string} language
* @param {OutputType} outputType
* @returns {Documentation.Renderer}
*/
function docsLinkRendererForLanguage(language, outputType) {
const languagePath = languageToRelativeDocsPath(language);
return ({ clazz, member, param, option }) => {
- if (param)
- return `\`${param}\``;
- if (option)
- return `\`${option}\``;
- if (clazz) {
- if (outputType === 'Types')
- return `{@link ${clazz.name}}`;
- if (outputType === 'ReleaseNotesMd')
- return createClassMarkdownLink(languagePath, clazz);
- throw new Error(`Unexpected output type ${outputType}`);
- }
+ if (clazz)
+ return createClassMarkdownLink(languagePath, clazz);
if (!member || !member.clazz)
throw new Error('Internal error');
+ if (param)
+ return createMarkdownLink(languagePath, member, `\`${param.alias}\``, param.name);
+ if (option)
+ return createMarkdownLink(languagePath, member, `\`${option.alias}\``, option.name);
const className = member.clazz.varName === 'playwrightAssertions' ? '' : member.clazz.varName + '.';
if (member.kind === 'method') {
const args = outputType === 'ReleaseNotesMd' ? '' : renderJSSignature(member.argsArray);