Shiva Ravi
Shiva Ravi

Reputation: 17

Unable to right click in firefox browser using selenium (java) automation

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

Answers (1)

Darshit Chokshi
Darshit Chokshi

Reputation: 589

Try using this -

WebElement element = driver.findElement(By.id("testing"));
Actions action = new Actions(driver).contextClick(element);
action.build().perform();

Upvotes: 1

Related Questions