仅在firefox浏览器中无法右键单击我的selenium脚本。以下是我使用过的代码
WebElement test = driver.findElement(By.id("testing"));
action.contextClick(test).perform();//right click on job area
以下是执行时看到的错误:
org.openqa.selenium.UnsupportedCommandException: mouseMoveTo
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
答案 0 :(得分:1)
尝试使用此 -
WebElement element = driver.findElement(By.id("testing"));
Actions action = new Actions(driver).contextClick(element);
action.build().perform();