> 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-web/en/when-the-test-doesnt-work/recording-issues/recording-tooltip-assertion.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# Recording assertions on tooltips

## Tooltip Assertion

Tooltips disappear when the user hovers out of an element. When recording, you can add a tooltip assertion in one of the following ways.

{% hint style="info" %}
**Hover step**

Before the tooltip assertion step, you need a [hover step](https://help.autify.com/nocode-web/en/autify-university/foundation/creating-a-scenario/hover-step.md) that causes the tooltip to appear.
{% endhint %}

## How to add assertions

Tooltips are typically implemented in two main ways: using only HTML and CSS, or using JS. How you add an assertion depends on how the tooltip is implemented.

## Adding an assertion to a tooltip implemented with HTML and CSS

If the tooltip is hidden using CSS and shown when hovering the parent element using HTML and CSS, select `:hover` in "Force state" in Chrome DevTools. This will keep the tooltip visible and allow you to add an assertion.

![](https://1964297753-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVdZPTgwISYb3LhjgKnw6%2Fuploads%2Fgit-blob-51b7b128fcccdcece99b7e401efd697b544b691b%2Fforce-state-hover.png?alt=media)

## Adding an assertion to a tooltip implemented with JS

If the tooltip is implemented using JS, you may be able to add an assertion in one of the following ways.

### Use a mouseover snippet to display the tooltip

In the DevTools console, execute the [mouse over snippet](https://javascript-snippets.autify.com/snippets/mouse/mouseover/) on the target element to display the tooltip, and then add an assertion.

### If you cannot add an assertion using the mouseover snippet

If the tooltip displays using the [mouse over snippet](https://javascript-snippets.autify.com/snippets/mouse/mouseover/), but disappears when you add the assertion, you may be able to add it by doing the following:

1. [Get a CSS selector or XPath](https://help.autify.com/nocode-web/en/autify-university/advanced/locator-feature/how-to-get-css-selectors.md) for the tooltip.
2. Add the desired assertion to the appropriate element and save it.
3. Set the CSS selector or XPath as the [locator](https://help.autify.com/nocode-web/en/autify-university/advanced/locator-feature/add-a-locator.md) of the assertion step.
4. Modify the expected value of the assertion step if necessary. For example, the expected value could be the tooltip text.

## If you are still having trouble...

Please contact us. We will work with you to resolve the issue.


---

# 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-web/en/when-the-test-doesnt-work/recording-issues/recording-tooltip-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.
