> For the complete documentation index, see [llms.txt](https://docs.precisiontestautomation.in/scriptlessautomation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.precisiontestautomation.in/scriptlessautomation/automation-platforms/scriptlessweb-automation/web-automation-key-phrases/wait_type.md).

# WAIT\_TYPE

#### Definition of **WAIT\_TYPE**

In the context of web automation scripts,, `WAIT_TYPE` plays a crucial role in ensuring that web elements are in the correct state before an action is performed. Various types of waits can be specified:

#### VISIBILITY

* **Definition**: The automation script waits until the web element is both present in the Document Object Model (DOM) and visible on the page.
* **Use Case**: Use this when you need to interact with an element that must be visible to the user, such as form fields, buttons, and other interactive elements.

#### PRESENCE\_OF\_ELEMENT\_ON\_DOM

* **Definition**: The automation script waits solely for the element to be present on the DOM, regardless of its visibility.
* **Use Case**: Suitable for situations where the presence of an element within the DOM is sufficient to proceed, even if the element is not visible, such as hidden input fields.

#### PRESENCE\_OF\_TEXT\_GREATER\_THAN\_ONE

* **Definition**: The automation script waits solely for the element to be present on the DOM, regardless of its visibility.
* **Use Case**: Suitable for situations where the presence of an element within the DOM is sufficient to proceed, even if the element is not visible, such as hidden input fields.

#### ELEMENT\_TO\_BE\_CLICKABLE

* **Definition**: Waits for an element to be in a state that allows user interaction, particularly to be clicked.
* **Use Case**: Essential when ensuring that a button or link has become interactive following a prior action or page load.

#### PRESENCE\_OF\_ATTRIBUTE\_VALUE\_GREATER\_THAN\_ONE

* **Definition**: This wait checks that an element's attribute contains a value with a length greater than one character.
* **Use Case**: Useful when you need to validate that an attribute like 'value' in input fields is populated.

#### NONE

* **Definition**: Indicates that no wait is to be applied before proceeding with the action.
* **Use Case**: Used when the element is immediately available or when wait conditions are managed separately.

#### Implementation Tips

* Selecting the appropriate `WAIT_TYPE` is vital for the reliability of test execution.
* Incorrect usage of `WAIT_TYPE` can lead to flaky tests or increased execution time.

#### Usage

By default default wait will be 30sec but user can provide custom timeout as per the requirement

Example:

`amazonLanding,VISIBILITY:60,SCROLL_TO_TOP,condition,NONE,NONE,NONE,NONE`

#### Demo

{% embed url="<https://youtu.be/Rei8RzF2BmQ>" %}
Demo
{% endembed %}
