selenium control mouse code example

Example 1: how to mouse element in selenium

By using Actions class

WebElement element = driver.findElement(By.xpath("xpath"));
Actions action = new Actions(driver);
action.moveToElement(element).perform();

Example 2: python control browse mouse selenium

driver = webdriver.Firefox(executable_path=driver_path)
action = webdriver.ActionChains(driver)
element = driver.find_element_by_id('your-id') # or your another selector here
action.move_to_element(element)
action.perform()