Use Actions class to double-click the target box.
// Java
WebElement target = driver.findElement(By.id("double_click_target"));
new Actions(driver).doubleClick(target).perform();
# Python
target = driver.find_element(By.ID, "double_click_target")
ActionChains(driver).double_click(target).perform()
// Java - Full Test
driver.findElement(By.id("double_click_reset")).click();
WebElement target = driver.findElement(By.id("double_click_target"));
Actions actions = new Actions(driver);
actions.doubleClick(target).perform();
WebElement result = driver.findElement(By.id("double_click_success"));
assert result.isDisplayed();
assert result.getText().contains("Double click completed");
# Python - Full Test
driver.find_element(By.ID, "double_click_reset").click()
target = driver.find_element(By.ID, "double_click_target")
ActionChains(driver).double_click(target).perform()
result = driver.find_element(By.ID, "double_click_success")
assert result.is_displayed()
assert "Double click completed" in result.text
// Java - Alternative Solution
new Actions(driver)
.doubleClick(driver.findElement(By.id("double_click_target")))
.perform();
# Python - Alternative Solution
ActionChains(driver).double_click(
driver.find_element(By.ID, "double_click_target")
).perform()
double_click_target.double_click_success is displayed.