How do I check if a tooltip appears or not in selenium?

Answered

How do I check if the tooltip appears or not in selenium?

When mouseovering the element, I can see the tooltip appear.

How do I verify that the tooltip appears?

HTML of the Icon:


<td class=" text-center selection">

<p data-toggle="tooltip" title="" data-original-title="Je kan geen modules verwijderen die reeds gebruikt worden in de programmakalender">

<i style="color: orange;" class="icon-warning-sign icon-large"></i></p></td>

I can mouseover the icon with selenium, but I don’t know how I can verify that it appears or not.  Any help?

Default Asked on July 6, 2016 in Selenium WebDriver.
Add Comment
  • 1 Answer(s)
    Best answer

    Hi Krist,

    On hovering tooltip there must be an element which is getting visible .So you need to verify if element is getting visible or not and to be more specific get the text of that element and Assert it.

    Vice Professor Answered on July 6, 2016.

    Yes, I’ve found the difference.

    <p data-toggle="tooltip" title="" data-original-title="Je kan geen modules verwijderen die reeds gebruikt worden in de programmakalender" aria-describedby="tooltip270100">

    gets added when hovering, didn’t see it before… stupid me 🙂

    Thanks for the help

    on July 6, 2016.

    Appreciate your response..:)

    on July 7, 2016.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.