Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法使用selenium(java)automation在firefox浏览器中单击鼠标右键_Java_Selenium - Fatal编程技术网

无法使用selenium(java)automation在firefox浏览器中单击鼠标右键

无法使用selenium(java)automation在firefox浏览器中单击鼠标右键,java,selenium,Java,Selenium,仅在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: v

仅在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'
试着用这个-

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

有人能帮我解决这个问题吗这是selenium 3中关于gecko驱动程序的一个公开问题。selenium和webdriver开发人员已经有了这个问题。你可以追踪这个。如果您在本期中看到评论部分,他们已经引用了这一问题的根本原因。谢谢sameer!感谢您的即时响应,但在调试过程中,selenium无法对第三行“action.build().perform();”执行操作,并且它捕获了前面提到的错误earlier@ShivaRavi此解决方案非常完美(+1),应该对您有效。我怎么也面临着同样的问题。但问题现在已关闭。相反,根据Jim的说法,你可以追踪感谢