make right click on mouse simple code example

Example: how to right click

I would create an action class in order to right click or double click
To perform any actions against web element using actions class,
we need to locate the element first:

WebElement el = driver.findElement

Double Click (doubleClick):
	    Actions actions = new Actions (driver).perform 				 		
        actions.doubleClick(el).perform()
		actions.moveTo(el).perform actions.doubleClick.perform 			
        actions.moveTo(el).doubleClick().build.perform()
Right Click (contextClick):
	actions.contextClick(elementLocator).perform();

Tags:

Misc Example