How to capture hover tooltip text in cypress?

Viewed 45

I am trying to capture the text of a tooltip which appears when I hover the mouse on an element.

What I have been able to do so far?
Make the cypress script hover on the element and these 2 solutions work: cy.get('div').contains('Another Sample KPI').next('*[name="info"]').trigger('mouseenter') and cy.get('div').contains('Another Sample KPI').next('*[name="info"]').realHover()

What's not working is to capture the tooltip text. That is because I am not able to get the tooltip element/component in the DOM. Many solutions on stackoverflow have suggested to capture the tooltip element but in my case, I am not able to get it. It is not displayed in the DOM: enter image description here

Another image:
enter image description here

0 Answers
Related