Now that we have seen a method that double-clicks at the current location, we will discuss another method that WebDriver provides to emulate the double-clicking of a WebElement.
The API syntax for the doubleClick() method is as follows:
public Actions doubleClick(WebElement onElement)
The input parameter for the preceding method is the target WebElement that has to be double-clicked, and the return type is the Actions class.
Let's see a code example for this. Open the DoubleClick.html file and single-click on the Click Me button. You shouldn't see anything happening. Now double-click on the button; you should see an alert saying Double Clicked !!. Now we will try to do the same thing using WebDriver. ...