The context click on WebElement action

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 ...

Get Selenium WebDriver 3 Practical Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.