Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

138
Visualizações
Highcharts: Trigger showing tooltip programatically with selenium

I have the situation where I need to create some automatic actions with selenium on a third party website (which I assume means that I can't use the highcharts api).

When the third party website is loaded, there is no tooltip element in the html body. It seems that it is dynamically added when the cursor is hovering over the chart.

I would like to for the tooltip to be shown via java selenium. If there is a javascript way to do this please let me know and I will try to transfer it to the selenium code myself

So far I have tried via the browser console with javascript to trigger a 'mouseover' event or to add a 'hover' class to different elements inside the highcharts container but I had no luck, the tooltip is not added to the html body and therefore I cannot select it.

I believe the above issue can be reproduced with the element with highcharts-tooltip class is not added to the html body until the user hovers on the chart.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You should be able to get global Highcharts variable and call onMouseOver method on a specific point.

Highcharts.charts[0].series[0].points[0].onMouseOver();

You can also dispatch mousemove event directly on a svg element.

document.getElementsByClassName('highcharts-point')[0].dispatchEvent(new Event('mousemove', { 'bubbles': true }));

API Reference: https://api.highcharts.com/class-reference/Highcharts.Point#onMouseOver

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda