The contextClick() method, also known as right-click, is quite common on many web pages these days. It displays a menu similar to this screenshot:
This context menu can be accessed by a right-click of the mouse on the WebElement. WebDriver provides the developer with an option of emulating that action, using the contextClick() method. Like many other methods, this method has two variants as well. One is clicking on the current location and the other overloaded method is clicking on the WebElement. Let's discuss the context of clicking on WebElement here.
The API syntax for the contextClick() method is ...