Back to Puppeteer

Locator.map() method

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

19.2.2457 B
Original Source

Locator.map() method

Maps the locator using the provided mapper.

Signature

typescript
class Locator {
  map<To>(mapper: Mapper<T, To>): Locator<To>;
}

Parameters

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

Parameter

</th><th>

Type

</th><th>

Description

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

mapper

</td><td>

Mapper<T, To>

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

Returns:

Locator<To>