Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

421
Vistas
How to check for tooltip message on mouse hover in Selenium?

I want to do mouseover function over Tooltip, which displays meessage.

Here is the link to video - https://screenrec.com/share/5IWTd4a7i9

For some reason hover does not happen due to which I do not get the text and test fails

This is what I have tried

browser.actions()
.mouseMove(
  element(by.xpath('/html/body/app-root/div/main/ng-component/ngb-tabset/div/div/view-concepts-tab/div[1]/concept-view/div/dl/mat-accordion/mat-expansion-panel/div/div/div[4]/term-view/div/div[3]/div[1]/dl/mat-accordion/mat-expansion-panel/mat-expansion-panel-header/span[1]/mat-panel-description/dd/span')))
.click()
.perform();

text('On mouse hover')

Also tried

    expect(element.all(by.xpath('/html/body/app-root/div/main/ng-component/ngb-tabset/div/div/view-concepts-tab/div/concept-view/div/dl/mat-accordion/mat-expansion-panel/div/div/div[2]/term-view/div/div[3]/div[1]/dl/mat-accordion/mat-expansion-panel/mat-expansion-panel-header/span[1]/mat-panel-description/dd/span'))).toEqual('On mouse hover');

EDIT

I got some success with below code, however error is Expected [ ] to equal 'On mouse hover'.

    expect(element.all(by.css('dd#A>span'))).toEqual('On mouse hover');

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You have to use atribute value of title then you will get the tooltip text. you dont have to scroll to the element.

expect(element(By.id("xyz")).getAttribute("title")).ToBe("Tool tip text");

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda