0

I have a webapp that uses dojo widgets and drag-n-drop functionalities and I'm using Intern in order to test it. Now I want to test the drag-n-drop mechanism, and for this I hoped to use the Leadfoot's helper, DragAndDrop.js

As seen in the script's example, here my code:

return new DragAndDrop(remote)
    .findByXpath(source)
    .dragFrom()
    .end()
    .findByXpath(target)
    .dragTo()

I have the return statement because this code is part of a promise chain.

However, it seems to be not working and I do not get any kind of errors|exceptions, neither in the browser neither in selenium neither on intern side. Honestly, I have no idea where to start from. Any suggestion? May I provide further information?

Bruno Bruzzano
  • 477
  • 7
  • 21

1 Answers1

0

Have you tried

            return remote.findByXpath(target)
                .then(function(targetNode){
                    return remote.findByXpath(source)
                        .moveMouseTo(1,1)
                        .pressMouseButton().sleep(500)
                        .moveMouseTo(targetNode).sleep(500)
                        .releaseMouseButton();
                });

Note: sleep isn't necessary, I put it here so that you can see clearer the actions

Linh Nguyen
  • 1,120
  • 7
  • 13