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

187
Visualizações
Mousehover action In selenium works, But the action is not visible on the browser screen, is there any way that i can see it in REAL

My code

WebElement menu= bd.findElement(By.cssSelector("#main-nav > div.multi-level-nav.reveal-on-click > div > ul.first-level-ul > li:nth-child(1) > a"));
        actions.moveToElement(menu).build().perform();
        System.out.println("mouse hover done");
        Thread.sleep(5000);

It works, but when it comes to the running time on the browser screen the dropdown button is not listed down when doing the mousehover. I practically want to put this into display.

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

0

To capture the display of the dropdown button opening up you have to take a screenshot at the appropiate time as follows:

WebElement menu= bd.findElement(By.cssSelector("#main-nav > div.multi-level-nav.reveal-on-click > div > ul.first-level-ul > li:nth-child(1) > a"));
actions.moveToElement(menu).build().perform();
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File(".\\Screenshots\\keshu_thilakan.png"));
System.out.println("mouse hover done");
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