2023-07-25 14:45:10 +00:00
|
|
|
---
|
|
|
|
sidebar_label: Locator.map
|
|
|
|
---
|
|
|
|
|
|
|
|
# Locator.map() method
|
|
|
|
|
|
|
|
Maps the locator using the provided mapper.
|
|
|
|
|
|
|
|
#### Signature:
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
class Locator {
|
|
|
|
map<To>(mapper: Mapper<T, To>): Locator<To>;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
2024-03-20 15:03:14 +00:00
|
|
|
<table><thead><tr><th>
|
2023-07-25 14:45:10 +00:00
|
|
|
|
2024-03-20 15:03:14 +00:00
|
|
|
Parameter
|
|
|
|
|
|
|
|
</th><th>
|
|
|
|
|
|
|
|
Type
|
|
|
|
|
|
|
|
</th><th>
|
|
|
|
|
|
|
|
Description
|
|
|
|
|
|
|
|
</th></tr></thead>
|
|
|
|
<tbody><tr><td>
|
|
|
|
|
|
|
|
mapper
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
[Mapper](./puppeteer.mapper.md)<T, To>
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</tbody></table>
|
2023-07-25 14:45:10 +00:00
|
|
|
**Returns:**
|
|
|
|
|
|
|
|
[Locator](./puppeteer.locator.md)<To>
|