Reputation: 17
Only in firefox browser unable to right click in my selenium script. Below are the piece of code i have used
WebElement test = driver.findElement(By.id("testing"));
action.contextClick(test).perform();//right click on job area
And below is the error is see while execute :
org.openqa.selenium.UnsupportedCommandException: mouseMoveTo
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
Upvotes: 0
Views: 710
Reputation: 589
Try using this -
WebElement element = driver.findElement(By.id("testing"));
Actions action = new Actions(driver).contextClick(element);
action.build().perform();
Upvotes: 1