Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

186
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!