2023-06-02 17:46:10 +00:00
|
|
|
---
|
|
|
|
sidebar_label: LocatorOptions
|
|
|
|
---
|
|
|
|
|
|
|
|
# LocatorOptions interface
|
|
|
|
|
|
|
|
#### Signature:
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
export interface LocatorOptions
|
|
|
|
```
|
|
|
|
|
|
|
|
## Properties
|
|
|
|
|
2024-03-20 15:03:14 +00:00
|
|
|
<table><thead><tr><th>
|
|
|
|
|
|
|
|
Property
|
|
|
|
|
|
|
|
</th><th>
|
|
|
|
|
|
|
|
Modifiers
|
|
|
|
|
|
|
|
</th><th>
|
|
|
|
|
|
|
|
Type
|
|
|
|
|
|
|
|
</th><th>
|
|
|
|
|
|
|
|
Description
|
|
|
|
|
|
|
|
</th><th>
|
|
|
|
|
|
|
|
Default
|
|
|
|
|
|
|
|
</th></tr></thead>
|
|
|
|
<tbody><tr><td>
|
|
|
|
|
2024-04-11 11:01:13 +00:00
|
|
|
<span id="ensureelementisintheviewport">ensureElementIsInTheViewport</span>
|
2024-03-20 15:03:14 +00:00
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
boolean
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
Whether to scroll the element into viewport if not in the viewprot already.
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
`true`
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>
|
|
|
|
|
2024-04-11 11:01:13 +00:00
|
|
|
<span id="timeout">timeout</span>
|
2024-03-20 15:03:14 +00:00
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
number
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
Total timeout for the entire locator operation.
|
|
|
|
|
|
|
|
Pass `0` to disable timeout.
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
`Page.getDefaultTimeout()`
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>
|
|
|
|
|
2024-04-11 11:01:13 +00:00
|
|
|
<span id="visibility">visibility</span>
|
2024-03-20 15:03:14 +00:00
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
[VisibilityOption](./puppeteer.visibilityoption.md)
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
Whether to wait for the element to be `visible` or `hidden`. `null` to disable visibility checks.
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>
|
|
|
|
|
2024-04-11 11:01:13 +00:00
|
|
|
<span id="waitforenabled">waitForEnabled</span>
|
2024-03-20 15:03:14 +00:00
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
boolean
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
Whether to wait for input elements to become enabled before the action. Applicable to `click` and `fill` actions.
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
`true`
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>
|
|
|
|
|
2024-04-11 11:01:13 +00:00
|
|
|
<span id="waitforstableboundingbox">waitForStableBoundingBox</span>
|
2024-03-20 15:03:14 +00:00
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
boolean
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
Whether to wait for the element's bounding box to be same between two animation frames.
|
|
|
|
|
|
|
|
</td><td>
|
|
|
|
|
|
|
|
`true`
|
|
|
|
|
|
|
|
</td></tr>
|
|
|
|
</tbody></table>
|