Back to Puppeteer

Locator.click() method

website/versioned_docs/version-24.40.0/api/puppeteer.locator.click.md

19.2.2654 B
Original Source

Locator.click() method

Clicks the located element.

Signature

typescript
class Locator {
  click<ElementType extends Element>(
    this: Locator<ElementType>,
    options?: Readonly<LocatorClickOptions>,
  ): Promise<void>;
}

Parameters

<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

this

</td><td>

Locator<ElementType>

</td><td> </td></tr> <tr><td>

options

</td><td>

Readonly<LocatorClickOptions>

</td><td>

(Optional)

</td></tr> </tbody></table>

Returns:

Promise<void>