我的工作是windows应用程序自动化和拖放错误.
public void dragAndDrop() {
WebElement ele=driver.findElementById("");
WebElement ele1=driver.findElementByName("");
Actions action = new Actions(driver);
Action dragDrop = action.dragAndDrop(ele, ele1).build();
dragDrop.perform(); 线程"main“org.openqa.selenium.UnsupportedCommandException:'mouseDown‘中的异常无效或已实现命令。(警告:服务器没有提供任何堆栈跟踪信息)命令持续时间或超时: 27毫秒构建信息:版本:'3.0.1',修订版:'1969d75',时间:'2016-10-18 09:49:13-0700‘系统信息:主机:'AntonyW10',ip:'10.246.0.91',os.name:'Windows 10',os.arch:’any 64‘,os.version:'10.0',java.version:'10.0.1‘驱动程序信息: org.openqa.selenium.winium.WiniumDriver功能{app=C:\Users\Antony\Downloads\setup.exe,args=,innerPort=9998,debugConnectToRunningApp=false,keyboardSimulator=1,launchDelay=0,platform=ANY}会话ID: AwesomeSession
发布于 2018-05-02 11:23:44
试试下面的代码:
Actions action = new Actions(driver);
Action dragDrop = action.clickAndHold(ele).moveToElement(ele1).release(ele1).build();
dragDrop.perform();发布于 2019-09-12 19:38:22
您使用它是错误的,请尝试如下:
Actions action = new Actions(driver);
action.dragAndDrop(ele1, ele2).build().perform(); https://sqa.stackexchange.com/questions/33456
复制相似问题