In this video will see how to Hover on any element/link/image using selenium webdriver.
I hope you like this video. For any questions, suggestions or appreciation please contact us at: https://programmerworld.co/contact/ or email at: programmerworld1990@gmail.com
Code and details:
public static void main(String[] args) {
// TODO Auto-generated method stub
System.setProperty("webdriver.chrome.driver", "path of chromedriver exe\\chromedriver.exe");
ChromeOptions op = new ChromeOptions();
op.setBinary("path of chrome browser for testing exe\\chrome.exe");
op.addArguments("--remote-allow-origins=*");
WebDriver driver = new ChromeDriver(op);
driver.get("https://programmerworld.co/");
WebElement hlink = driver.findElement(By.linkText("Selenium"));
Actions a = new Actions(driver);
a.moveToElement(hlink).perform();
}
}
![](https://programmerworld.co/wp-content/uploads/2024/03/image.png)