# StateCheck

***stateCheck*** is a feature to know whether the execution control landed on the intended page. This method requires three parameters.

#### Syntax

***void stateCheck(String htmlElementName, String attType,String targetValue)***

| **Name**              | **Type** | **Description**                      |
| --------------------- | -------- | ------------------------------------ |
| ***htmlElementName*** | String   | Dom element name                     |
| **attType**           | String   | Type of the attribute                |
| ***targetValue***     | String   | The actual value of the html element |

#### Code snippet

```
/* 
 *  "I'm Feeling Lucky" button is found on Google's home page, 
 *  which tells you that you are rightly landed on Google's 
 *  home page
 */

stateCheck("bt.iamfeelinglucky", "value", "I'm Feeling Lucky");
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.qatts.com/master-1/ui-action-methods/assertion-methods/statecheck.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
