Skip to content

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

chore: render plain class links in types (#23508)

Max Schmitt80fe9748eb42
diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts
index b8d4dba399..e577a3ad20 100644
--- a/packages/playwright-core/types/types.d.ts
+++ b/packages/playwright-core/types/types.d.ts
@@ -31,9 +31,9 @@ type ElementHandleWaitForSelectorOptionsNotHidden = ElementHandleWaitForSelector
/**
* - extends: [EventEmitter]
*
- * Page provides methods to interact with a single tab in a [Browser], or an
- * [extension background page](https://developer.chrome.com/extensions/background_pages) in Chromium. One [Browser]
- * instance might have multiple [Page] instances.
+ * 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.
*
* This example creates a page, navigates it to a URL, and then saves a screenshot:
*
@@ -107,7 +107,7 @@ export interface Page {
* console.log(await page.evaluate(`1 + ${x}`)); // prints "11"
* ```
*
- * [ElementHandle] instances can be passed as an argument to the
+ * {@link ElementHandle} instances can be passed as an argument to the
* [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate):
*
* ```js
@@ -154,7 +154,7 @@ export interface Page {
* console.log(await page.evaluate(`1 + ${x}`)); // prints "11"
* ```
*
- * [ElementHandle] instances can be passed as an argument to the
+ * {@link ElementHandle} instances can be passed as an argument to the
* [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate):
*
* ```js
@@ -169,13 +169,13 @@ export interface Page {
evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
/**
- * Returns the value of the `pageFunction` invocation as a [JSHandle].
+ * Returns the value of the `pageFunction` invocation as a {@link 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
- * [JSHandle].
+ * {@link JSHandle}.
*
* If the function passed to the
* [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
@@ -196,7 +196,7 @@ export interface Page {
* const aHandle = await page.evaluateHandle('document'); // Handle for the 'document'
* ```
*
- * [JSHandle] instances can be passed as an argument to the
+ * {@link 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
@@ -211,13 +211,13 @@ export interface Page {
*/
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
/**
- * Returns the value of the `pageFunction` invocation as a [JSHandle].
+ * Returns the value of the `pageFunction` invocation as a {@link 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
- * [JSHandle].
+ * {@link JSHandle}.
*
* If the function passed to the
* [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
@@ -238,7 +238,7 @@ export interface Page {
* const aHandle = await page.evaluateHandle('document'); // Handle for the 'document'
* ```
*
- * [JSHandle] instances can be passed as an argument to the
+ * {@link 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
@@ -337,7 +337,7 @@ 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 [Locator] helper methods or web-first assertions instead.
+ * other {@link 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`.
@@ -366,7 +366,7 @@ 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 [Locator] helper methods or web-first assertions instead.
+ * other {@link 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`.
@@ -395,7 +395,7 @@ 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 [Locator] helper methods or web-first assertions instead.
+ * other {@link 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`.
@@ -424,7 +424,7 @@ 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 [Locator] helper methods or web-first assertions instead.
+ * other {@link 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`.
@@ -453,7 +453,7 @@ export interface Page {
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other [Locator] helper methods and web-first assertions do a better job.
+ * other {@link 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.
@@ -476,7 +476,7 @@ export interface Page {
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other [Locator] helper methods and web-first assertions do a better job.
+ * other {@link 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.
@@ -499,7 +499,7 @@ export interface Page {
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other [Locator] helper methods and web-first assertions do a better job.
+ * other {@link 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.
@@ -522,7 +522,7 @@ export interface Page {
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other [Locator] helper methods and web-first assertions do a better job.
+ * other {@link 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.
@@ -624,7 +624,7 @@ export interface Page {
* Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
* `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using [Locator]
+ * **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.
*
* Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
@@ -662,7 +662,7 @@ export interface Page {
* Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
* `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using [Locator]
+ * **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.
*
* Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
@@ -700,7 +700,7 @@ export interface Page {
* Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
* `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using [Locator]
+ * **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.
*
* Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
@@ -738,7 +738,7 @@ export interface Page {
* Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
* `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using [Locator]
+ * **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.
*
* Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
@@ -900,7 +900,7 @@ export interface Page {
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`. Also
* emitted if the page throws an error or a warning.
*
- * The arguments passed into `console.log` are available on the [ConsoleMessage] event handler argument.
+ * The arguments passed into `console.log` are available on the {@link ConsoleMessage} event handler argument.
*
* **Usage**
*
@@ -966,7 +966,7 @@ export interface Page {
/**
* Emitted when attachment download started. User can access basic file operations on downloaded content via the
- * passed [Download] instance.
+ * passed {@link Download} instance.
*/
on(event: 'download', listener: (download: Download) => void): this;
@@ -1082,7 +1082,7 @@ export interface Page {
on(event: 'response', listener: (response: Response) => void): this;
/**
- * Emitted when [WebSocket] request is sent.
+ * Emitted when {@link WebSocket} request is sent.
*/
on(event: 'websocket', listener: (webSocket: WebSocket) => void): this;
@@ -1196,7 +1196,7 @@ export interface Page {
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`. Also
* emitted if the page throws an error or a warning.
*
- * The arguments passed into `console.log` are available on the [ConsoleMessage] event handler argument.
+ * The arguments passed into `console.log` are available on the {@link ConsoleMessage} event handler argument.
*
* **Usage**
*
@@ -1262,7 +1262,7 @@ export interface Page {
/**
* Emitted when attachment download started. User can access basic file operations on downloaded content via the
- * passed [Download] instance.
+ * passed {@link Download} instance.
*/
addListener(event: 'download', listener: (download: Download) => void): this;
@@ -1378,7 +1378,7 @@ export interface Page {
addListener(event: 'response', listener: (response: Response) => void): this;
/**
- * Emitted when [WebSocket] request is sent.
+ * Emitted when {@link WebSocket} request is sent.
*/
addListener(event: 'websocket', listener: (webSocket: WebSocket) => void): this;
@@ -1587,7 +1587,7 @@ export interface Page {
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`. Also
* emitted if the page throws an error or a warning.
*
- * The arguments passed into `console.log` are available on the [ConsoleMessage] event handler argument.
+ * The arguments passed into `console.log` are available on the {@link ConsoleMessage} event handler argument.
*
* **Usage**
*
@@ -1653,7 +1653,7 @@ export interface Page {
/**
* Emitted when attachment download started. User can access basic file operations on downloaded content via the
- * passed [Download] instance.
+ * passed {@link Download} instance.
*/
prependListener(event: 'download', listener: (download: Download) => void): this;
@@ -1769,7 +1769,7 @@ export interface Page {
prependListener(event: 'response', listener: (response: Response) => void): this;
/**
- * Emitted when [WebSocket] request is sent.
+ * Emitted when {@link WebSocket} request is sent.
*/
prependListener(event: 'websocket', listener: (webSocket: WebSocket) => void): this;
@@ -1852,8 +1852,8 @@ export interface Page {
* 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.
* 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * 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
@@ -1915,8 +1915,8 @@ export interface Page {
* 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * 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
@@ -2028,8 +2028,8 @@ export interface Page {
* 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. Note that 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * 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
@@ -2921,8 +2921,8 @@ export interface Page {
* 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * 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
@@ -3228,7 +3228,8 @@ export interface Page {
* Matches elements containing an element that matches an inner locator. Inner locator is queried against the outer
* one. For example, `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.
*
- * Note that outer and inner locators must belong to the same frame. Inner locator must not contain [FrameLocator]s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
+ * FrameLocator}s.
*/
has?: Locator;
@@ -3236,7 +3237,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 [FrameLocator]s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
+ * FrameLocator}s.
*/
hasNot?: Locator;
@@ -3757,8 +3759,8 @@ export interface Page {
* 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.
* 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * 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.
@@ -3998,8 +4000,8 @@ export interface Page {
* 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * 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.
@@ -4155,8 +4157,8 @@ export interface Page {
* 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.
* 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * 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
@@ -4242,7 +4244,7 @@ export interface Page {
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`. Also
* emitted if the page throws an error or a warning.
*
- * The arguments passed into `console.log` are available on the [ConsoleMessage] event handler argument.
+ * The arguments passed into `console.log` are available on the {@link ConsoleMessage} event handler argument.
*
* **Usage**
*
@@ -4308,7 +4310,7 @@ export interface Page {
/**
* Emitted when attachment download started. User can access basic file operations on downloaded content via the
- * passed [Download] instance.
+ * passed {@link Download} instance.
*/
waitForEvent(event: 'download', optionsOrPredicate?: { predicate?: (download: Download) => boolean | Promise<boolean>, timeout?: number } | ((download: Download) => boolean | Promise<boolean>)): Promise<Download>;
@@ -4424,7 +4426,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 [WebSocket] request is sent.
+ * Emitted when {@link WebSocket} request is sent.
*/
waitForEvent(event: 'websocket', optionsOrPredicate?: { predicate?: (webSocket: WebSocket) => boolean | Promise<boolean>, timeout?: number } | ((webSocket: WebSocket) => boolean | Promise<boolean>)): Promise<WebSocket>;
@@ -4549,7 +4551,7 @@ export interface Page {
* const request = await requestPromise;
* ```
*
- * @param urlOrPredicate Request URL string, regex or predicate receiving [Request] object.
+ * @param urlOrPredicate Request URL string, regex or predicate receiving {@link Request} object.
* @param options
*/
waitForRequest(urlOrPredicate: string|RegExp|((request: Request) => boolean|Promise<boolean>), options?: {
@@ -4579,8 +4581,8 @@ export interface Page {
* const response = await responsePromise;
* ```
*
- * @param urlOrPredicate Request URL string, regex or predicate receiving [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 {@link Response} object. When a `baseURL` 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
*/
@@ -4595,8 +4597,8 @@ export interface Page {
}): Promise<Response>;
/**
- * **NOTE** Never wait for timeout in production. Tests that wait for time are inherently flaky. Use [Locator] actions and web
- * assertions that wait automatically.
+ * **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.
*
* Waits for the given `timeout` in milliseconds.
*
@@ -4670,7 +4672,7 @@ export interface Page {
/**
* **NOTE** Only available for Chromium atm.
*
- * Browser-specific Coverage implementation. See [Coverage] for more details.
+ * Browser-specific Coverage implementation. See {@link Coverage} for more details.
*/
coverage: Coverage;
@@ -4695,7 +4697,7 @@ 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.
*
- * [Frame] object's lifecycle is controlled by three events, dispatched on the page object:
+ * {@link 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
@@ -4756,7 +4758,7 @@ export interface Frame {
* console.log(await frame.evaluate('1 + 2')); // prints "3"
* ```
*
- * [ElementHandle] instances can be passed as an argument to the
+ * {@link ElementHandle} instances can be passed as an argument to the
* [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate):
*
* ```js
@@ -4799,7 +4801,7 @@ export interface Frame {
* console.log(await frame.evaluate('1 + 2')); // prints "3"
* ```
*
- * [ElementHandle] instances can be passed as an argument to the
+ * {@link ElementHandle} instances can be passed as an argument to the
* [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate):
*
* ```js
@@ -4814,13 +4816,13 @@ export interface Frame {
evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
/**
- * Returns the return value of `pageFunction` as a [JSHandle].
+ * Returns the return value of `pageFunction` as a {@link 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 [JSHandle].
+ * returns {@link JSHandle}.
*
* If the function, passed to the
* [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle),
@@ -4841,7 +4843,7 @@ export interface Frame {
* const aHandle = await frame.evaluateHandle('document'); // Handle for the 'document'.
* ```
*
- * [JSHandle] instances can be passed as an argument to the
+ * {@link 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
@@ -4856,13 +4858,13 @@ export interface Frame {
*/
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
/**
- * Returns the return value of `pageFunction` as a [JSHandle].
+ * Returns the return value of `pageFunction` as a {@link 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 [JSHandle].
+ * returns {@link JSHandle}.
*
* If the function, passed to the
* [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle),
@@ -4883,7 +4885,7 @@ export interface Frame {
* const aHandle = await frame.evaluateHandle('document'); // Handle for the 'document'.
* ```
*
- * [JSHandle] instances can be passed as an argument to the
+ * {@link 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
@@ -4904,7 +4906,8 @@ export interface Frame {
*
* Returns the ElementHandle pointing to the frame element.
*
- * **NOTE** The use of [ElementHandle] is discouraged, use [Locator] objects and web-first assertions instead.
+ * **NOTE** The use of {@link ElementHandle} is discouraged, use {@link 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`.
@@ -4918,7 +4921,8 @@ export interface Frame {
*
* Returns the ElementHandle pointing to the frame element.
*
- * **NOTE** The use of [ElementHandle] is discouraged, use [Locator] objects and web-first assertions instead.
+ * **NOTE** The use of {@link ElementHandle} is discouraged, use {@link 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`.
@@ -4933,7 +4937,7 @@ export interface Frame {
*
* Returns the ElementHandles pointing to the frame elements.
*
- * **NOTE** The use of [ElementHandle] is discouraged, use [Locator] objects instead.
+ * **NOTE** The use of {@link ElementHandle} is discouraged, use {@link Locator} objects instead.
*
* The method finds all elements matching the specified selector within the frame. If no elements match the selector,
* returns empty array.
@@ -4946,7 +4950,7 @@ export interface Frame {
*
* Returns the ElementHandles pointing to the frame elements.
*
- * **NOTE** The use of [ElementHandle] is discouraged, use [Locator] objects instead.
+ * **NOTE** The use of {@link ElementHandle} is discouraged, use {@link Locator} objects instead.
*
* The method finds all elements matching the specified selector within the frame. If no elements match the selector,
* returns empty array.
@@ -4958,7 +4962,7 @@ 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 [Locator] helper methods or web-first assertions instead.
+ * other {@link Locator} helper methods or web-first assertions instead.
*
* Returns the return value of `pageFunction`.
*
@@ -4987,7 +4991,7 @@ 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 [Locator] helper methods or web-first assertions instead.
+ * other {@link Locator} helper methods or web-first assertions instead.
*
* Returns the return value of `pageFunction`.
*
@@ -5016,7 +5020,7 @@ 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 [Locator] helper methods or web-first assertions instead.
+ * other {@link Locator} helper methods or web-first assertions instead.
*
* Returns the return value of `pageFunction`.
*
@@ -5045,7 +5049,7 @@ 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 [Locator] helper methods or web-first assertions instead.
+ * other {@link Locator} helper methods or web-first assertions instead.
*
* Returns the return value of `pageFunction`.
*
@@ -5074,7 +5078,7 @@ export interface Frame {
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other [Locator] helper methods and web-first assertions do a better job.
+ * other {@link Locator} helper methods and web-first assertions do a better job.
*
* Returns the return value of `pageFunction`.
*
@@ -5099,7 +5103,7 @@ export interface Frame {
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other [Locator] helper methods and web-first assertions do a better job.
+ * other {@link Locator} helper methods and web-first assertions do a better job.
*
* Returns the return value of `pageFunction`.
*
@@ -5124,7 +5128,7 @@ export interface Frame {
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other [Locator] helper methods and web-first assertions do a better job.
+ * other {@link Locator} helper methods and web-first assertions do a better job.
*
* Returns the return value of `pageFunction`.
*
@@ -5149,7 +5153,7 @@ export interface Frame {
/**
* **NOTE** In most cases,
* [locator.evaluateAll(pageFunction[, arg])](https://playwright.dev/docs/api/class-locator#locator-evaluate-all),
- * other [Locator] helper methods and web-first assertions do a better job.
+ * other {@link Locator} helper methods and web-first assertions do a better job.
*
* Returns the return value of `pageFunction`.
*
@@ -5249,7 +5253,7 @@ export interface Frame {
* Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
* `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using [Locator]
+ * **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.
*
* Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
@@ -5287,7 +5291,7 @@ export interface Frame {
* Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
* `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using [Locator]
+ * **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.
*
* Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
@@ -5325,7 +5329,7 @@ export interface Frame {
* Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
* `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using [Locator]
+ * **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.
*
* Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
@@ -5363,7 +5367,7 @@ export interface Frame {
* Returns when element specified by selector satisfies `state` option. Returns `null` if waiting for `hidden` or
* `detached`.
*
- * **NOTE** Playwright automatically waits for element to be ready before performing an action. Using [Locator]
+ * **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.
*
* Wait for the `selector` to satisfy `state` option (either appear/disappear from dom, or become visible/hidden). If
@@ -5464,8 +5468,8 @@ export interface Frame {
* 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.
* 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * 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
@@ -5529,8 +5533,8 @@ export interface Frame {
* 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * 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
@@ -5619,8 +5623,8 @@ export interface Frame {
* 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. Note that 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * 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
@@ -6317,8 +6321,8 @@ export interface Frame {
* 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * 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
@@ -6623,7 +6627,8 @@ export interface Frame {
* Matches elements containing an element that matches an inner locator. Inner locator is queried against the outer
* one. For example, `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.
*
- * Note that outer and inner locators must belong to the same frame. Inner locator must not contain [FrameLocator]s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
+ * FrameLocator}s.
*/
has?: Locator;
@@ -6631,7 +6636,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 [FrameLocator]s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
+ * FrameLocator}s.
*/
hasNot?: Locator;
@@ -6835,8 +6841,8 @@ export interface Frame {
* 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.
* 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * 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.
@@ -6996,8 +7002,8 @@ export interface Frame {
* 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * 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
@@ -7152,8 +7158,8 @@ export interface Frame {
* 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.
* 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * 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
@@ -7295,8 +7301,8 @@ export interface Frame {
}): Promise<null|Response>;
/**
- * **NOTE** Never wait for timeout in production. Tests that wait for time are inherently flaky. Use [Locator] actions and web
- * assertions that wait automatically.
+ * **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.
*
* Waits for the given `timeout` in milliseconds.
*
@@ -7539,7 +7545,8 @@ export interface BrowserContext {
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`. Also
* emitted if the page throws an error or a warning.
*
- * The arguments passed into `console.log` and the page are available on the [ConsoleMessage] event handler argument.
+ * The arguments passed into `console.log` and the page are available on the {@link ConsoleMessage} event handler
+ * argument.
*
* **Usage**
*
@@ -7719,7 +7726,8 @@ export interface BrowserContext {
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`. Also
* emitted if the page throws an error or a warning.
*
- * The arguments passed into `console.log` and the page are available on the [ConsoleMessage] event handler argument.
+ * The arguments passed into `console.log` and the page are available on the {@link ConsoleMessage} event handler
+ * argument.
*
* **Usage**
*
@@ -7949,7 +7957,8 @@ export interface BrowserContext {
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`. Also
* emitted if the page throws an error or a warning.
*
- * The arguments passed into `console.log` and the page are available on the [ConsoleMessage] event handler argument.
+ * The arguments passed into `console.log` and the page are available on the {@link ConsoleMessage} event handler
+ * argument.
*
* **Usage**
*
@@ -8532,7 +8541,8 @@ export interface BrowserContext {
* Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`. Also
* emitted if the page throws an error or a warning.
*
- * The arguments passed into `console.log` and the page are available on the [ConsoleMessage] event handler argument.
+ * The arguments passed into `console.log` and the page are available on the {@link ConsoleMessage} event handler
+ * argument.
*
* **Usage**
*
@@ -8705,14 +8715,14 @@ export interface Worker {
evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
/**
- * Returns the return value of `pageFunction` as a [JSHandle].
+ * Returns the return value of `pageFunction` as a {@link 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 [JSHandle].
+ * returns {@link JSHandle}.
*
* If the function passed to the
* [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
@@ -8724,14 +8734,14 @@ export interface Worker {
*/
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
/**
- * Returns the return value of `pageFunction` as a [JSHandle].
+ * Returns the return value of `pageFunction` as a {@link 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 [JSHandle].
+ * returns {@link JSHandle}.
*
* If the function passed to the
* [worker.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-worker#worker-evaluate-handle)
@@ -8838,12 +8848,12 @@ export interface JSHandle<T = any> {
evaluate<R, O extends T = T>(pageFunction: PageFunctionOn<O, void, R>, arg?: any): Promise<R>;
/**
- * Returns the return value of `pageFunction` as a [JSHandle].
+ * Returns the return value of `pageFunction` as a {@link JSHandle}.
*
* This method passes this handle as the first argument to `pageFunction`.
*
* The only difference between `jsHandle.evaluate` and `jsHandle.evaluateHandle` is that `jsHandle.evaluateHandle`
- * returns [JSHandle].
+ * returns {@link 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.
@@ -8855,12 +8865,12 @@ export interface JSHandle<T = any> {
*/
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 [JSHandle].
+ * Returns the return value of `pageFunction` as a {@link JSHandle}.
*
* This method passes this handle as the first argument to `pageFunction`.
*
* The only difference between `jsHandle.evaluate` and `jsHandle.evaluateHandle` is that `jsHandle.evaluateHandle`
- * returns [JSHandle].
+ * returns {@link 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.
@@ -8880,7 +8890,7 @@ export interface JSHandle<T = any> {
*/
jsonValue(): Promise<T>;
/**
- * Returns either `null` or the object handle itself, if the object handle is an instance of [ElementHandle].
+ * Returns either `null` or the object handle itself, if the object handle is an instance of {@link ElementHandle}.
*/
asElement(): T extends Node ? ElementHandle<T> : null;
/**
@@ -8912,12 +8922,12 @@ export interface JSHandle<T = any> {
}
/**
- * - extends: [JSHandle]
+ * - extends: {@link 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 [Locator] objects and web-first assertions instead.
+ * **NOTE** The use of ElementHandle is discouraged, use {@link Locator} objects and web-first assertions instead.
*
* ```js
* const hrefElement = await page.$('a');
@@ -8932,8 +8942,8 @@ 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 [Locator] and ElementHandle is that the ElementHandle points to a particular element,
- * while [Locator] captures the logic of how to retrieve an element.
+ * 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.
*
* 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
@@ -9351,8 +9361,8 @@ 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * TimeoutError}. Passing zero timeout disables this.
* @param options
*/
check(options?: {
@@ -9403,8 +9413,8 @@ 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * TimeoutError}. Passing zero timeout disables this.
* @param options
*/
click(options?: {
@@ -9482,8 +9492,8 @@ 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * TimeoutError}. Passing zero timeout disables this.
*
* **NOTE** `elementHandle.dblclick()` dispatches two `click` events and a single `dblclick` event.
* @param options
@@ -9635,8 +9645,8 @@ 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * TimeoutError}. Passing zero timeout disables this.
* @param options
*/
hover(options?: {
@@ -10013,8 +10023,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.
* 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * TimeoutError}. Passing zero timeout disables this.
* @param checked Whether to check or uncheck the checkbox.
* @param options
*/
@@ -10060,7 +10070,7 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* 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 [ElementHandle] to point to an
+ * This method expects {@link 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.
@@ -10124,8 +10134,8 @@ 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * TimeoutError}. Passing zero timeout disables this.
*
* **NOTE** `elementHandle.tap()` requires that the `hasTouch` option of the browser context be set to true.
* @param options
@@ -10239,8 +10249,8 @@ 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * TimeoutError}. Passing zero timeout disables this.
* @param options
*/
uncheck(options?: {
@@ -10418,7 +10428,8 @@ export interface Locator {
*/
evaluateAll<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E[], void, R>): Promise<R>;
/**
- * **NOTE** Always prefer using [Locator]s and web assertions over [ElementHandle]s because latter are inherently racy.
+ * **NOTE** Always prefer using {@link Locator}s and web assertions over {@link 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.
@@ -10572,8 +10583,8 @@ 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * TimeoutError}. Passing zero timeout disables this.
*
* **Usage**
*
@@ -10678,8 +10689,8 @@ 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * TimeoutError}. Passing zero timeout disables this.
*
* **Usage**
*
@@ -10787,8 +10798,8 @@ 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * TimeoutError}. Passing zero timeout disables this.
*
* **NOTE** `element.dblclick()` dispatches two `click` events and a single `dblclick` event.
* @param options
@@ -10874,7 +10885,7 @@ export interface Locator {
* - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)
* - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
*
- * You can also specify [JSHandle] as the property value if you want live objects to be passed into the event:
+ * You can also specify {@link 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
@@ -10970,20 +10981,21 @@ export interface Locator {
}): Promise<void>;
/**
- * **NOTE** Always prefer using [Locator]s and web assertions over [ElementHandle]s because latter are inherently racy.
+ * **NOTE** Always prefer using {@link Locator}s and web assertions over {@link 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.
*/
elementHandles(): Promise<Array<ElementHandle>>;
/**
- * Execute JavaScript code in the page, taking the matching element as an argument, and return a [JSHandle] with the
- * result.
+ * Execute JavaScript code in the page, taking the matching element as an argument, and return a {@link JSHandle} with
+ * the result.
*
* **Details**
*
- * Returns the return value of `pageFunction` as a[JSHandle], called with the matching element as a first argument,
- * and `arg` as a second argument.
+ * 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.
*
* The only difference between
* [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate)
@@ -10991,7 +11003,7 @@ 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 [JSHandle].
+ * returns {@link JSHandle}.
*
* If `pageFunction` returns a [Promise], this method will wait for the promise to resolve and return its value.
*
@@ -11081,7 +11093,8 @@ export interface Locator {
* Matches elements containing an element that matches an inner locator. Inner locator is queried against the outer
* one. For example, `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.
*
- * Note that outer and inner locators must belong to the same frame. Inner locator must not contain [FrameLocator]s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
+ * FrameLocator}s.
*/
has?: Locator;
@@ -11089,7 +11102,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 [FrameLocator]s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
+ * FrameLocator}s.
*/
hasNot?: Locator;
@@ -11490,8 +11504,8 @@ 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * TimeoutError}. Passing zero timeout disables this.
* @param options
*/
hover(options?: {
@@ -11743,7 +11757,8 @@ export interface Locator {
* Matches elements containing an element that matches an inner locator. Inner locator is queried against the outer
* one. For example, `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.
*
- * Note that outer and inner locators must belong to the same frame. Inner locator must not contain [FrameLocator]s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
+ * FrameLocator}s.
*/
has?: Locator;
@@ -11751,7 +11766,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 [FrameLocator]s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
+ * FrameLocator}s.
*/
hasNot?: Locator;
@@ -12052,8 +12068,8 @@ export interface Locator {
* 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set.
* 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * TimeoutError}. Passing zero timeout disables this.
* @param checked Whether to check or uncheck the checkbox.
* @param options
*/
@@ -12123,7 +12139,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 [Locator] to point to an
+ * This method expects {@link 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.
@@ -12191,8 +12207,8 @@ 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * TimeoutError}. Passing zero timeout disables this.
*
* **NOTE** `element.tap()` requires that the `hasTouch` option of the browser context be set to true.
* @param options
@@ -12325,8 +12341,8 @@ 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 [TimeoutError].
- * Passing zero timeout disables this.
+ * When all steps combined have not finished during the specified `timeout`, this method throws a {@link
+ * TimeoutError}. Passing zero timeout disables this.
* @param options
*/
uncheck(options?: {
@@ -12882,8 +12898,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 [Locator] to learn
- * more about the strict mode.
+ * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See {@link Locator} to
+ * learn more about the strict mode.
*/
strictSelectors?: boolean;
@@ -13377,7 +13393,7 @@ export interface ElectronApplication {
evaluate<R>(pageFunction: PageFunctionOn<ElectronType, void, R>, arg?: any): Promise<R>;
/**
- * Returns the return value of `pageFunction` as a [JSHandle].
+ * Returns the return value of `pageFunction` as a {@link JSHandle}.
*
* The only difference between
* [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
@@ -13385,7 +13401,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 [JSHandle].
+ * returns {@link JSHandle}.
*
* If the function passed to the
* [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
@@ -13397,7 +13413,7 @@ export interface ElectronApplication {
*/
evaluateHandle<R, Arg>(pageFunction: PageFunctionOn<ElectronType, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
/**
- * Returns the return value of `pageFunction` as a [JSHandle].
+ * Returns the return value of `pageFunction` as a {@link JSHandle}.
*
* The only difference between
* [electronApplication.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate)
@@ -13405,7 +13421,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 [JSHandle].
+ * returns {@link JSHandle}.
*
* If the function passed to the
* [electronApplication.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-electronapplication#electron-application-evaluate-handle)
@@ -13422,8 +13438,8 @@ export interface ElectronApplication {
on(event: 'close', listener: () => void): this;
/**
- * This event is issued for every window that is created **and loaded** in Electron. It contains a [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 {@link Page} that
+ * can be used for Playwright automation.
*/
on(event: 'window', listener: (page: Page) => void): this;
@@ -13443,8 +13459,8 @@ export interface ElectronApplication {
addListener(event: 'close', listener: () => void): this;
/**
- * This event is issued for every window that is created **and loaded** in Electron. It contains a [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 {@link Page} that
+ * can be used for Playwright automation.
*/
addListener(event: 'window', listener: (page: Page) => void): this;
@@ -13474,8 +13490,8 @@ export interface ElectronApplication {
prependListener(event: 'close', listener: () => void): this;
/**
- * This event is issued for every window that is created **and loaded** in Electron. It contains a [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 {@link Page} that
+ * can be used for Playwright automation.
*/
prependListener(event: 'window', listener: (page: Page) => void): this;
@@ -13530,8 +13546,8 @@ export interface ElectronApplication {
waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: () => boolean | Promise<boolean>, timeout?: number } | (() => boolean | Promise<boolean>)): Promise<void>;
/**
- * This event is issued for every window that is created **and loaded** in Electron. It contains a [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 {@link 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>;
@@ -13853,8 +13869,8 @@ export interface Android {
}
/**
- * [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).
+ * {@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).
*/
export interface AndroidDevice {
/**
@@ -14283,8 +14299,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 [Locator] to learn
- * more about the strict mode.
+ * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See {@link Locator} to
+ * learn more about the strict mode.
*/
strictSelectors?: boolean;
@@ -14564,8 +14580,8 @@ export interface AndroidDevice {
/**
- * This method waits until [AndroidWebView] matching the `selector` is opened and returns it. If there is already an
- * open [AndroidWebView] matching the `selector`, returns immediately.
+ * 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.
* @param selector
* @param options
*/
@@ -14655,7 +14671,7 @@ export interface AndroidInput {
}
/**
- * [AndroidSocket] is a way to communicate with a process launched on the [AndroidDevice]. Use
+ * {@link AndroidSocket} is a way to communicate with a process launched on the {@link AndroidDevice}. Use
* [androidDevice.open(command)](https://playwright.dev/docs/api/class-androiddevice#android-device-open) to open a
* socket.
*/
@@ -14733,7 +14749,7 @@ export interface AndroidSocket {
}
/**
- * [AndroidWebView] represents a WebView open on the [AndroidDevice]. WebView is usually obtained using
+ * {@link AndroidWebView} represents a WebView open on the {@link AndroidDevice}. WebView is usually obtained using
* [androidDevice.webView(selector[, options])](https://playwright.dev/docs/api/class-androiddevice#android-device-web-view).
*/
export interface AndroidWebView {
@@ -14768,7 +14784,7 @@ export interface AndroidWebView {
prependListener(event: 'close', listener: () => void): this;
/**
- * Connects to the WebView and returns a regular Playwright [Page] to interact with.
+ * Connects to the WebView and returns a regular Playwright {@link Page} to interact with.
*/
page(): Promise<Page>;
@@ -14784,14 +14800,14 @@ export interface AndroidWebView {
}
/**
- * Exposes API that can be used for the Web API testing. This class is used for creating [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 {@link 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
- * [APIRequestContext].
+ * {@link APIRequestContext}.
*/
export interface APIRequest {
/**
- * Creates new instances of [APIRequestContext].
+ * Creates new instances of {@link APIRequestContext}.
* @param options
*/
newContext(options?: {
@@ -14922,8 +14938,8 @@ 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 [APIRequestContext] instance which shares cookie storage
- * with the browser context and can be accessed via
+ * Each Playwright browser context has associated with it {@link 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
@@ -14931,16 +14947,16 @@ export interface APIRequest {
*
* **Cookie management**
*
- * [APIRequestContext] returned by
+ * {@link 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 [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]
- * 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 {@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.
*
- * If you want API requests to not interfere with the browser cookies you should create a new [APIRequestContext] by
- * calling
+ * If you want API requests to not interfere with the browser cookies you should create a new {@link
+ * 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.
*/
@@ -15672,7 +15688,7 @@ export interface APIRequestContext {
}
/**
- * [APIResponse] class represents responses returned by
+ * {@link APIResponse} class represents responses returned by
* [apiRequestContext.get(url[, options])](https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get)
* and similar methods.
*/
@@ -15746,7 +15762,7 @@ export interface APIResponse {
*
* A Browser is created via
* [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch). An example
- * of using a [Browser] to create a [Page]:
+ * of using a {@link Browser} to create a {@link Page}:
*
* ```js
* const { firefox } = require('playwright'); // Or 'chromium' or 'webkit'.
@@ -15814,12 +15830,12 @@ export interface Browser extends EventEmitter {
* the browser server.
*
* **NOTE** This is similar to force quitting the browser. Therefore, you should call
- * [browserContext.close()](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) on any
- * [BrowserContext]'s you explicitly created earlier with
+ * [browserContext.close()](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) on any {@link
+ * BrowserContext}'s you explicitly created earlier with
* [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) **before**
* calling [browser.close()](https://playwright.dev/docs/api/class-browser#browser-close).
*
- * The [Browser] object itself is considered to be disposed and cannot be used anymore.
+ * The {@link Browser} object itself is considered to be disposed and cannot be used anymore.
*/
close(): Promise<void>;
@@ -15854,10 +15870,10 @@ export interface Browser extends EventEmitter {
/**
* Creates a new browser context. It won't share cookies/cache with other browser contexts.
*
- * **NOTE** If directly using this method to create [BrowserContext]s, it is best practice to explicitly close the
- * returned context via
+ * **NOTE** If directly using this method to create {@link BrowserContext}s, it is best practice to explicitly close
+ * the returned context via
* [browserContext.close()](https://playwright.dev/docs/api/class-browsercontext#browser-context-close) when your code
- * is done with the [BrowserContext], and before calling
+ * is done with the {@link BrowserContext}, and before calling
* [browser.close()](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.
*
@@ -16218,8 +16234,8 @@ export interface Browser extends EventEmitter {
/**
* 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 [Locator] to learn
- * more about the strict mode.
+ * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See {@link Locator} to
+ * learn more about the strict mode.
*/
strictSelectors?: boolean;
@@ -16387,7 +16403,7 @@ export interface BrowserServer {
}
/**
- * [ConsoleMessage] objects are dispatched by page via the
+ * {@link 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
* messages logged in the page there will be corresponding event in the Playwright context.
*
@@ -16590,7 +16606,7 @@ export interface Coverage {
}
/**
- * [Dialog] objects are dispatched by page via the
+ * {@link 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:
@@ -16652,7 +16668,7 @@ export interface Dialog {
}
/**
- * [Download] objects are dispatched by page via the
+ * {@link 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.
@@ -16972,7 +16988,7 @@ export interface Electron {
}
/**
- * [FileChooser] objects are dispatched by the page in the
+ * {@link 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
@@ -17080,7 +17096,7 @@ export interface FileChooser {
*
* **Converting Locator to FrameLocator**
*
- * If you have a [Locator] object pointing to an `iframe` it can be converted to [FrameLocator] using
+ * If you have a {@link Locator} object pointing to an `iframe` it can be converted to {@link FrameLocator} using
* [`:scope`](https://developer.mozilla.org/en-US/docs/Web/CSS/:scope) CSS selector:
*
* ```js
@@ -17428,7 +17444,8 @@ export interface FrameLocator {
* Matches elements containing an element that matches an inner locator. Inner locator is queried against the outer
* one. For example, `article` that has `text=Playwright` matches `<article><div>Playwright</div></article>`.
*
- * Note that outer and inner locators must belong to the same frame. Inner locator must not contain [FrameLocator]s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
+ * FrameLocator}s.
*/
has?: Locator;
@@ -17436,7 +17453,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 [FrameLocator]s.
+ * Note that outer and inner locators must belong to the same frame. Inner locator must not contain {@link
+ * FrameLocator}s.
*/
hasNot?: Locator;
@@ -17796,12 +17814,12 @@ export interface Mouse {
}
/**
- * This object can be used to launch or connect to Chromium, returning instances of [Browser].
+ * This object can be used to launch or connect to Chromium, returning instances of {@link Browser}.
*/
export const chromium: BrowserType;
/**
- * This object can be used to launch or connect to Firefox, returning instances of [Browser].
+ * This object can be used to launch or connect to Firefox, returning instances of {@link Browser}.
*/
export const firefox: BrowserType;
@@ -17817,12 +17835,13 @@ export const request: APIRequest;
export const selectors: Selectors;
/**
- * This object can be used to launch or connect to WebKit, returning instances of [Browser].
+ * This object can be used to launch or connect to WebKit, returning instances of {@link Browser}.
*/
export const webkit: BrowserType;
/**
- * Whenever the page sends a request for a network resource the following sequence of events are emitted by [Page]:
+ * Whenever the page sends a request for a network resource the following sequence of events are emitted by {@link
+ * 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
@@ -17868,7 +17887,7 @@ export interface Request {
};
/**
- * Returns the [Frame] that initiated this request.
+ * Returns the {@link Frame} that initiated this request.
*/
frame(): Frame;
@@ -17934,9 +17953,9 @@ 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 [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 {@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()`.
*
* **Usage**
*
@@ -17980,14 +17999,14 @@ export interface Request {
resourceType(): string;
/**
- * Returns the matching [Response] object, or `null` if the response was not received due to error.
+ * Returns the matching {@link Response} object, or `null` if the response was not received due to error.
*/
response(): Promise<null|Response>;
/**
* **NOTE** This field is Chromium only. It's safe to call when using other browsers, but it will always be `null`.
*
- * The Service [Worker] that is performing the request.
+ * The Service {@link Worker} that is performing the request.
*/
serviceWorker(): null|Worker;
@@ -18096,7 +18115,7 @@ export interface Request {
}
/**
- * [Response] class represents responses which are received by page.
+ * {@link Response} class represents responses which are received by page.
*/
export interface Response {
/**
@@ -18115,7 +18134,7 @@ export interface Response {
finished(): Promise<null|Error>;
/**
- * Returns the [Frame] that initiated this response.
+ * Returns the {@link Frame} that initiated this response.
*/
frame(): Frame;
@@ -18177,7 +18196,7 @@ export interface Response {
ok(): boolean;
/**
- * Returns the matching [Request] object.
+ * Returns the matching {@link Request} object.
*/
request(): Request;
@@ -18523,7 +18542,7 @@ export interface Route {
path?: string;
/**
- * [APIResponse] to fulfill route's request with. Individual fields of the response (such as headers) can be
+ * {@link APIResponse} to fulfill route's request with. Individual fields of the response (such as headers) can be
* overridden using fulfill options.
*/
response?: APIResponse;
@@ -18700,7 +18719,7 @@ export interface Tracing {
}): Promise<void>;
/**
- * Start a new trace chunk. If you'd like to record multiple traces on the same [BrowserContext], use
+ * Start a new trace chunk. If you'd like to record multiple traces on the same {@link 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
@@ -18796,7 +18815,7 @@ export interface Video {
}
/**
- * The [WebSocket] class represents websocket connections in the page.
+ * The {@link WebSocket} class represents websocket connections in the page.
*/
export interface WebSocket {
/**
@@ -19343,8 +19362,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 [Locator] to learn
- * more about the strict mode.
+ * option does not affect any Locator APIs (Locators are always strict). Defaults to `false`. See {@link Locator} to
+ * learn more about the strict mode.
*/
strictSelectors?: boolean;
diff --git a/packages/playwright-test/types/test.d.ts b/packages/playwright-test/types/test.d.ts
index 193b569c5f..58406fd65c 100644
--- a/packages/playwright-test/types/test.d.ts
+++ b/packages/playwright-test/types/test.d.ts
@@ -37,8 +37,8 @@ type UseOptions<TestArgs, WorkerArgs> = { [K in keyof WorkerArgs]?: WorkerArgs[K
*
* `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 [TestProject] are available in the
- * top-level [TestConfig], in which case they are shared between all projects.
+ * [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.
*
* Here is an example configuration that runs every test in Chromium, Firefox and WebKit, both Desktop and Mobile
* versions.
@@ -85,7 +85,7 @@ export interface Project<TestArgs = {}, WorkerArgs = {}> extends TestProject {
/**
* 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][TestOptions].
+ * about [configuration](https://playwright.dev/docs/test-configuration) and see [available options]{@link TestOptions}.
*
* ```js
* // playwright.config.ts
@@ -115,8 +115,8 @@ export interface Project<TestArgs = {}, WorkerArgs = {}> extends TestProject {
*
* `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 [TestProject] are available in the
- * top-level [TestConfig], in which case they are shared between all projects.
+ * [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.
*
* Here is an example configuration that runs every test in Chromium, Firefox and WebKit, both Desktop and Mobile
* versions.
@@ -418,7 +418,7 @@ export interface FullProject<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][TestOptions].
+ * about [configuration](https://playwright.dev/docs/test-configuration) and see [available options]{@link TestOptions}.
*
* ```js
* // playwright.config.ts
@@ -446,12 +446,12 @@ 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 [TestConfig] object in the
+ * or `testDir`. These options are described in the {@link TestConfig} object in the
* [configuration file](https://playwright.dev/docs/test-configuration).
*
* 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
- * [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 {@link
+ * TestConfig} can also define base options shared between all projects.
*
* ```js
* // playwright.config.ts
@@ -965,7 +965,8 @@ interface TestConfig {
preserveOutput?: "always"|"never"|"failures-only";
/**
- * Playwright Test supports running multiple test projects at the same time. See [TestProject] for more information.
+ * Playwright Test supports running multiple test projects at the same time. See {@link TestProject} for more
+ * information.
*
* **Usage**
*
@@ -1355,12 +1356,12 @@ interface TestConfig {
/**
* 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 [TestConfig] object in the
+ * or `testDir`. These options are described in the {@link TestConfig} object in the
* [configuration file](https://playwright.dev/docs/test-configuration).
*
* 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
- * [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 {@link
+ * TestConfig} can also define base options shared between all projects.
*
* ```js
* // playwright.config.ts
@@ -1377,7 +1378,8 @@ interface TestConfig {
*/
export interface Config<TestArgs = {}, WorkerArgs = {}> extends TestConfig {
/**
- * Playwright Test supports running multiple test projects at the same time. See [TestProject] for more information.
+ * Playwright Test supports running multiple test projects at the same time. See {@link TestProject} for more
+ * information.
*
* **Usage**
*
@@ -1397,7 +1399,7 @@ export interface Config<TestArgs = {}, WorkerArgs = {}> extends TestConfig {
/**
* 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][TestOptions].
+ * about [configuration](https://playwright.dev/docs/test-configuration) and see [available options]{@link TestOptions}.
*
* **Usage**
*
@@ -1420,12 +1422,12 @@ export type Metadata = { [key: string]: any };
/**
* 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 [TestConfig] object in the
+ * or `testDir`. These options are described in the {@link TestConfig} object in the
* [configuration file](https://playwright.dev/docs/test-configuration).
*
* 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
- * [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 {@link
+ * TestConfig} can also define base options shared between all projects.
*
* ```js
* // playwright.config.ts
@@ -1633,7 +1635,8 @@ export interface FullConfig<TestArgs = {}, WorkerArgs = {}> {
*/
preserveOutput: 'always' | 'never' | 'failures-only';
/**
- * Playwright Test supports running multiple test projects at the same time. See [TestProject] for more information.
+ * Playwright Test supports running multiple test projects at the same time. See {@link TestProject} for more
+ * information.
*
* **Usage**
*
@@ -1860,7 +1863,7 @@ export type TestStatus = 'passed' | 'failed' | 'timedOut' | 'skipped' | 'interru
/**
* `WorkerInfo` contains information about the worker that is running tests and is available to worker-scoped
- * fixtures. `WorkerInfo` is a subset of [TestInfo] that is available in many other places.
+ * fixtures. `WorkerInfo` is a subset of {@link TestInfo} that is available in many other places.
*/
export interface WorkerInfo {
/**
@@ -2419,7 +2422,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* ```
*
* @param title Test title.
- * @param testFunction Test function that takes one or two arguments: an object with fixtures and optional [TestInfo].
+ * @param testFunction Test function that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
*/
only: TestFunction<TestArgs & WorkerArgs>;
/**
@@ -2689,7 +2692,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* ```
*
* @param title Test title.
- * @param testFunction Test function that takes one or two arguments: an object with fixtures and optional [TestInfo].
+ * @param testFunction Test function that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
*/
skip(title: string, testFunction: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<void> | void): void;
/**
@@ -2794,7 +2797,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* ```
*
* @param title Test title.
- * @param testFunction Test function that takes one or two arguments: an object with fixtures and optional [TestInfo].
+ * @param testFunction Test function that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
*/
fixme(title: string, testFunction: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<void> | void): void;
/**
@@ -3061,8 +3064,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* each test in the group. If multiple `beforeEach` hooks are added, they will run in the order of their
* registration.
*
- * You can access all the same [Fixtures] as the test function itself, and also the [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 {@link Fixtures} as the test function 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 use [test.afterEach(hookFunction)](https://playwright.dev/docs/api/class-test#test-after-each) to teardown
* any resources set up in `beforeEach`.
@@ -3083,7 +3086,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* });
* ```
*
- * @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional [TestInfo].
+ * @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
*/
beforeEach(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@@ -3095,8 +3098,8 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1) group, runs after each
* test in the group. If multiple `afterEach` hooks are added, they will run in the order of their registration.
*
- * You can access all the same [Fixtures] as the test function itself, and also the [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 {@link Fixtures} as the test function 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.
*
* **Usage**
*
@@ -3116,7 +3119,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* });
* ```
*
- * @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional [TestInfo].
+ * @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional {@link TestInfo}.
*/
afterEach(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@@ -3153,7 +3156,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* });
* ```
*
- * @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional [TestInfo].
+ * @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional {@link TestInfo}.
*/
beforeAll(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@@ -3177,7 +3180,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
* });
* ```
*
- * @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional [TestInfo].
+ * @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional {@link TestInfo}.
*/
afterAll(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
@@ -3396,7 +3399,8 @@ type ConnectOptions = {
};
/**
- * Playwright Test provides many options to configure test environment, [Browser], [BrowserContext] and more.
+ * Playwright Test provides many options to configure test environment, {@link Browser}, {@link 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
@@ -3434,7 +3438,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 [TestConfig]:
+ * your {@link TestConfig}:
*
* **Usage**
*
@@ -3633,7 +3637,8 @@ 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, [Browser], [BrowserContext] and more.
+ * Playwright Test provides many options to configure test environment, {@link Browser}, {@link 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
@@ -4181,10 +4186,10 @@ 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 [Page] object that is available to the test.
+ * after the test has finished. `page` fixture provides a {@link 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][TestOptions] to configure
+ * Test also [provides options]{@link 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).
@@ -4192,10 +4197,10 @@ export interface PlaywrightTestOptions {
export interface PlaywrightWorkerArgs {
playwright: typeof import('playwright-core');
/**
- * [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] and gets a fresh environment.
+ * {@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.
*
- * Learn how to [configure browser](https://playwright.dev/docs/test-configuration) and see [available options][TestOptions].
+ * Learn how to [configure browser](https://playwright.dev/docs/test-configuration) and see [available options]{@link TestOptions}.
*
* **Usage**
*
@@ -4227,20 +4232,21 @@ 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 [Page] object that is available to the test.
+ * after the test has finished. `page` fixture provides a {@link 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][TestOptions] to configure
+ * Test also [provides options]{@link 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 [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] for maximum efficiency.
+ * 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.
*
- * Learn how to [configure context](https://playwright.dev/docs/test-configuration) and see [available options][TestOptions].
+ * Learn how to [configure context](https://playwright.dev/docs/test-configuration) and see [available options]{@link TestOptions}.
*
* Default [fixtures.page](https://playwright.dev/docs/api/class-fixtures#fixtures-page) belongs to this context.
*
@@ -4256,7 +4262,7 @@ export interface PlaywrightTestArgs {
*/
context: BrowserContext;
/**
- * Isolated [Page] instance, created for each test. Pages are isolated between tests due to
+ * 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.
*
* This is the most common fixture used in a test.
@@ -4278,7 +4284,7 @@ export interface PlaywrightTestArgs {
*/
page: Page;
/**
- * Isolated [APIRequestContext] instance for each test.
+ * Isolated {@link APIRequestContext} instance for each test.
*
* **Usage**
*
@@ -4324,8 +4330,8 @@ type IfAny<T, Y, N> = 0 extends (1 & T) ? Y : N;
type ExtraMatchers<T, Type, Matchers> = T extends Type ? Matchers : IfAny<T, Matchers, {}>;
/**
- * The [GenericAssertions] class provides assertion methods that can be used to make assertions about any values in
- * the tests. A new instance of [GenericAssertions] is created by calling
+ * 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
* [expect(value)](https://playwright.dev/docs/api/class-playwrightassertions#playwright-assertions-expect-generic):
*
* ```js
@@ -4824,8 +4830,8 @@ export {};
/**
- * The [APIResponseAssertions] class provides assertion methods that can be used to make assertions about the
- * [APIResponse] in the tests.
+ * The {@link APIResponseAssertions} class provides assertion methods that can be used to make assertions about the
+ * {@link APIResponse} in the tests.
*
* ```js
* import { test, expect } from '@playwright/test';
@@ -4864,8 +4870,8 @@ interface APIResponseAssertions {
}
/**
- * The [LocatorAssertions] class provides assertion methods that can be used to make assertions about the [Locator]
- * state in the tests.
+ * The {@link LocatorAssertions} class provides assertion methods that can be used to make assertions about the {@link
+ * Locator} state in the tests.
*
* ```js
* import { test, expect } from '@playwright/test';
@@ -4880,7 +4886,7 @@ interface APIResponseAssertions {
*/
interface LocatorAssertions {
/**
- * Ensures that [Locator] points to an [attached](https://playwright.dev/docs/actionability#attached) DOM node.
+ * Ensures that {@link Locator} points to an [attached](https://playwright.dev/docs/actionability#attached) DOM node.
*
* **Usage**
*
@@ -4900,7 +4906,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] points to a checked input.
+ * Ensures the {@link Locator} points to a checked input.
*
* **Usage**
*
@@ -4921,7 +4927,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] points to a disabled element. Element is disabled if it has "disabled" attribute or is
+ * Ensures the {@link 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
@@ -4944,7 +4950,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] points to an editable element.
+ * Ensures the {@link Locator} points to an editable element.
*
* **Usage**
*
@@ -4965,7 +4971,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] points to an empty editable element or to a DOM node that has no text.
+ * Ensures the {@link Locator} points to an empty editable element or to a DOM node that has no text.
*
* **Usage**
*
@@ -4984,7 +4990,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] points to an enabled element.
+ * Ensures the {@link Locator} points to an enabled element.
*
* **Usage**
*
@@ -5005,7 +5011,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] points to a focused DOM node.
+ * Ensures the {@link Locator} points to a focused DOM node.
*
* **Usage**
*
@@ -5024,7 +5030,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures that [Locator] either does not resolve to any DOM node, or resolves to a
+ * 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.
*
* **Usage**
@@ -5044,7 +5050,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] points to an element that intersects viewport, according to the
+ * Ensures the {@link 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**
@@ -5075,7 +5081,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures that [Locator] points to an [attached](https://playwright.dev/docs/actionability#attached) and
+ * Ensures that {@link Locator} points to an [attached](https://playwright.dev/docs/actionability#attached) and
* [visible](https://playwright.dev/docs/actionability#visible) DOM node.
*
* **Usage**
@@ -5096,8 +5102,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] points to an element that contains the given text. You can use regular expressions for the
- * value as well.
+ * Ensures the {@link Locator} points to an element that contains the given text. You can use regular expressions for
+ * the value as well.
*
* **Usage**
*
@@ -5161,7 +5167,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] points to an element with given attribute.
+ * Ensures the {@link Locator} points to an element with given attribute.
*
* **Usage**
*
@@ -5182,8 +5188,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] points to an element with given CSS classes. This needs to be a full match or using a relaxed
- * regular expression.
+ * 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.
*
* **Usage**
*
@@ -5215,7 +5221,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] resolves to an exact number of DOM nodes.
+ * Ensures the {@link Locator} resolves to an exact number of DOM nodes.
*
* **Usage**
*
@@ -5235,7 +5241,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] resolves to an element with the given computed CSS style.
+ * Ensures the {@link Locator} resolves to an element with the given computed CSS style.
*
* **Usage**
*
@@ -5256,7 +5262,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] points to an element with the given DOM Node ID.
+ * Ensures the {@link Locator} points to an element with the given DOM Node ID.
*
* **Usage**
*
@@ -5276,8 +5282,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [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 {@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.
*
* **Usage**
*
@@ -5453,8 +5459,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] points to an element with the given text. You can use regular expressions for the value as
- * well.
+ * Ensures the {@link Locator} points to an element with the given text. You can use regular expressions for the value
+ * as well.
*
* **Usage**
*
@@ -5517,8 +5523,8 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] points to an element with the given input value. You can use regular expressions for the
- * value as well.
+ * Ensures the {@link Locator} points to an element with the given input value. You can use regular expressions for
+ * the value as well.
*
* **Usage**
*
@@ -5538,7 +5544,7 @@ interface LocatorAssertions {
}): Promise<void>;
/**
- * Ensures the [Locator] points to multi-select/combobox (i.e. a `select` with the `multiple` attribute) and the
+ * Ensures the {@link Locator} points to multi-select/combobox (i.e. a `select` with the `multiple` attribute) and the
* specified values are selected.
*
* **Usage**
@@ -5582,8 +5588,8 @@ interface LocatorAssertions {
}
/**
- * The [PageAssertions] class provides assertion methods that can be used to make assertions about the [Page] state in
- * the tests.
+ * The {@link PageAssertions} class provides assertion methods that can be used to make assertions about the {@link
+ * Page} state in the tests.
*
* ```js
* import { test, expect } from '@playwright/test';
@@ -6001,8 +6007,8 @@ export interface TestInfoError {
*
* `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 [TestProject] are available in the
- * top-level [TestConfig], in which case they are shared between all projects.
+ * [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.
*
* Here is an example configuration that runs every test in Chromium, Firefox and WebKit, both Desktop and Mobile
* versions.
diff --git a/packages/playwright-test/types/testReporter.d.ts b/packages/playwright-test/types/testReporter.d.ts
index 3778ae2ae0..b1a12e05b7 100644
--- a/packages/playwright-test/types/testReporter.d.ts
+++ b/packages/playwright-test/types/testReporter.d.ts
@@ -20,15 +20,15 @@ export type { FullConfig, TestStatus } from './test';
/**
* `Suite` is a group of tests. All tests in Playwright Test form the following hierarchy:
- * - Root suite has a child suite for each [TestProject].
+ * - Root suite has a child suite for each {@link TestProject}.
* - Project suite #1. Has a child suite for each test file in the project.
* - File suite #1
- * - [TestCase] #1
- * - [TestCase] #2
+ * - {@link TestCase} #1
+ * - {@link TestCase} #2
* - Suite corresponding to a
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe-1) group
- * - [TestCase] #1 in a group
- * - [TestCase] #2 in a group
+ * - {@link TestCase} #1 in a group
+ * - {@link TestCase} #2 in a group
* - < more test cases ... >
* - File suite #2
* - < more file suites ... >
@@ -65,7 +65,7 @@ export interface Suite {
parent?: Suite;
/**
- * Child suites. See [Suite] for the hierarchy of suites.
+ * Child suites. See {@link Suite} for the hierarchy of suites.
*/
suites: Array<Suite>;
@@ -200,7 +200,7 @@ export interface TestCase {
}
/**
- * A result of a single [TestCase] run.
+ * A result of a single {@link TestCase} run.
*/
export interface TestResult {
/**
@@ -357,17 +357,18 @@ 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][Suite].
+ * once with a root suite that contains all other suites and tests. Learn more about [suites hierarchy]{@link
+ * 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 [TestCase] that is executed, and a [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 {@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.
* - [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, [TestResult] is complete and you can use
+ * called when test run has finished. By this time, {@link 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
@@ -389,7 +390,8 @@ export interface FullResult {
*/
export interface Reporter {
/**
- * Called once before running tests. All tests have been already discovered and put into a hierarchy of [Suite]s.
+ * Called once before running tests. All tests have been already discovered and put into a hierarchy of {@link
+ * Suite}s.
* @param config Resolved configuration.
* @param suite The root suite that contains all projects, files and test cases.
*/
@@ -560,7 +562,7 @@ export {};
/**
- * Represents a location in the source code where [TestCase] or [Suite] is defined.
+ * Represents a location in the source code where {@link TestCase} or {@link Suite} is defined.
*/
export interface Location {
/**
diff --git a/utils/generate_types/index.js b/utils/generate_types/index.js
index 1ecf6982bf..283b35537e 100644
--- a/utils/generate_types/index.js
+++ b/utils/generate_types/index.js
@@ -77,7 +77,7 @@ class TypesGenerator {
if (option)
return `\`${option}\``;
if (clazz)
- return `[${clazz.name}]`;
+ return `{@link ${clazz.name}}`;
if (!member || !member.clazz)
throw new Error('Internal error');
const className = member.clazz.varName === 'playwrightAssertions' ? '' : member.clazz.varName + '.';