> 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/faq/test-execution-and-result/ml-assert-element-text-should-be.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# MLアサーションの「対象のテキストが○○であることを確認する」ステップで実行時のテキストの値が異なっても成功することがあるのはなぜですか？

MLアサーションの **対象のテキストが○○であることを確認する** 検証で、下記の例のように、期待値とテスト結果のテキストの差分がわずかな場合、Autifyがテキストの違いを判断することが出来ずテストが成功する場合があります。

* 期待値のテキスト：`hogehoge 123456`
* テスト結果のテキスト：`hogehoge 123457`

対象のテキストが短い場合や、期待値とテスト結果のテキストの違いが大きい場合は正しく違いを判断し、テストが失敗します。

* **対象のテキストが短い**
  * 期待値のテキスト：`hogehoge 1`
  * テスト結果のテキスト：`hogehoge 2`
* **期待値とテスト結果のテキストの違いが大きい**
  * 期待値のテキスト：`hogehoge 12345`
  * テスト結果のテキスト：`hogehoge 67890`

期待値とテスト結果のテキストの違いがわずかで、MLアサーションのテストが成功となってしまう場合は、MLアサーションではなく、アサーションをご利用ください。

![](https://1076629499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fngfbmyfc37v4emfzEMM7%2Fuploads%2Fgit-blob-a4fa3a6d55102f5875f3000a27c28b4b214f653d%2FScreenshot%202023-03-20%20at%2012.56.33.png?alt=media)

## 関連記事

* [Machine Learning(ML) アサーション](https://help.autify.com/nocode-mobile/using-autify-nocode-mobile/scenario-creation-and-maintenance/ml-assertion.md)


---

# 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/faq/test-execution-and-result/ml-assert-element-text-should-be.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.
