> For the complete documentation index, see [llms.txt](https://help.autify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.autify.com/nocode-mobile/en/using-autify-nocode-mobile/scenario-creation-and-maintenance/ml-assertion.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# Machine Learning (ML) Assertion

## What is ML Assertion?

Autify's Machine Learning technology uses the large amount of training data available in Autify to understand element information and make assertions on any element on the screen. Autify's Machine Learning technology recognizes the elements and enables the user to easily select which elements to assert against.

## How is ML Assertion different from other assertion methods?

With ML Assertion, the methods used to recognize elements on the screen are different. This means that ML Assertion is able to support apps created with a wider variety of app development languages and libraries such as Objective-C, Swift, Flutter, React Native, and so on. ML Assertion also provides an improvement in performance compared to previous assertion methods. (Note: There is no additional work or changes in behavior required to use ML Assertions)

## How to use ML Assertion

It is easy to use!

### Scenario detail page

1. Go to a Scenario details page
2. Press **ML Assertion** at the top of the screen where you want to add an assertion

   ![](https://1041389054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj0BSsfTevAGpY0hwBHT7%2Fuploads%2Fgit-blob-c82b42c85033fee7949bd81b2f8e0bcb172b1242%2FCleanShot%202022-06-06%20at%2001.12.37.png?alt=media)
3. Select assertion keywords and expectations to be used

   ![](https://1041389054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj0BSsfTevAGpY0hwBHT7%2Fuploads%2Fgit-blob-eb315f9d3f13e5e9b81ba32f3ce0c5d91f826b0c%2FCleanShot%202022-06-06%20at%2001.15.32.png?alt=media)
4. Once the information is added, you will be able to press **Save**

### On Recording page

1. Start recording
2. Select ML Assert from terminal operations

   ![](https://1041389054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj0BSsfTevAGpY0hwBHT7%2Fuploads%2Fgit-blob-5d91f1d196a0a173d6547e9bd5b9b9574d022fd8%2FCleanShot%202022-06-06%20at%2001.16.42.png?alt=media)
3. Select assertion keywords and expectations to be used

   ![](https://1041389054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj0BSsfTevAGpY0hwBHT7%2Fuploads%2Fgit-blob-eb315f9d3f13e5e9b81ba32f3ce0c5d91f826b0c%2FCleanShot%202022-06-06%20at%2001.15.32.png?alt=media)
4. Once the information is added, you will be able to press **Save**

## ML Assertion keywords and descriptions

| Keyword                    | Description                                                                 |
| -------------------------- | --------------------------------------------------------------------------- |
| Element Should Be Visible  | Verify that the target element is visible                                   |
| Element Text Should Be     | Verify that the string of the target element matches the specified string   |
| Element Should Contain     | Verify that the target element contains the specified string                |
| Element Should Not Contain | Verify that the element does not contain the specified string of characters |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.autify.com/nocode-mobile/en/using-autify-nocode-mobile/scenario-creation-and-maintenance/ml-assertion.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
