← Back to team overview

sikuli-driver team mailing list archive

[Bug 886632] Re: Sikuli - could not performed a drag and drop action with the right button

 

It's working with the sikuli IDE but not with Java.
Here is the script in sikuli IDE :
    lRegion = find(Pattern("from_2.png"))
    click(lRegion.getCenter().above(20))
    mouseDown(Button.RIGHT)
    mouseMove(Env.getMouseLocation().offset(0, -100))
    mouseUp(Button.RIGHT)

In java , it loooks like this :
            Region lRegion = Screen.find("from_2.png");
            Location lLocation = lRegion.getCenter().above(Integer.parseInt(pStartingOffset));
            lRegion.mouseDown(Button.RIGHT);
             Screen.wait(0.5);
             lRegion.mouseMove(Env.getMouseLocation().offset(0, -100));
             Screen.wait(0.5);
              lRegion.mouseUp(Button.RIGHT);

When running with Java, it seems to ignore the mouseDown even if the motion is done correctly.
Adding a wait period in between actions doesn't change anything of the behavior.

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/886632

Title:
  Sikuli - could not performed a drag and drop action with the right
  button

Status in Sikuli:
  New

Bug description:
  I was using an earlier version of sikuli (sikuli-script.jar) and upgrated to the latest version as of today but I`m still facing the same issue. I'm running tests scripts with Robot Framework and sikuli using Java.
  I need to perform a drag and drop action with the mouse right button . The default drag and drop method provided by Screen class (or other classes) is a left button mouse drag and drop.
  So, what I did is : breaking down it into 3 actions : 
                    - mouseDown(Button.RIGHT)
                    - mouseMove(Destination_location) (or hover or drag)
                    - mouseUp()
  Even using these low level mouse events don't give the expected result of getting a right button drag and drop.
  Does someone have an idea how to  resolve this?

  Thank you

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/886632/+subscriptions


References