1

I'm working in windows application automation and the drag and drop getting error...

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(); 

Exception in thread "main" org.openqa.selenium.UnsupportedCommandException: 'mouseDown' is not valid or implemented command. (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 27 milliseconds Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700' System info: host: 'AntonyW10', ip: '10.246.0.91', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '10.0.1' Driver info: org.openqa.selenium.winium.WiniumDriver Capabilities [{app=C:\Users\Antony\Downloads\setup.exe, args=, innerPort=9998, debugConnectToRunningApp=false, keyboardSimulator=1, launchDelay=0, platform=ANY}] Session ID: AwesomeSession

  • Any updates on this guys? I also encountered this issue. It seems that the Winium developers don't have plans on fixing the open issues. I want to contribute but don't know how to edit the package. Anyone who can advise or give ideas would be a great help. Thank you! – bryan valdellon Mar 21 at 7:51
1

Try this below code:

Actions action = new Actions(driver);

Action dragDrop = action.clickAndHold(ele).moveToElement(ele1).release(ele1).build();

dragDrop.perform();
  • I tried but getting same error – user32519 May 2 '18 at 11:27
  • I guess this is a default error present in Winium with Java. Please refer this below link github.com/2gis/Winium.Desktop/issues/69 This is a open issue in winium – Prasanna venkatesh May 2 '18 at 11:54
  • here there is no solution mention – user32519 May 2 '18 at 12:24
  • Yes. This is a open issue. They have to fix this to make your code work. – Prasanna venkatesh May 2 '18 at 12:26
  • Check your import statements are correct for Action class import org.openqa.selenium.interactions.Action; import org.openqa.selenium.interactions.Actions; – Sachintha May 3 '18 at 5:18
0

You are using it wrong; try this:

 Actions action = new Actions(driver);
 action.dragAndDrop(ele1, ele2).build().perform(); 
  • 2
    Your answer would be much better if you were to explain how your code fixes the OP's problem. – Kate Paulk Sep 12 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy