← 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

 

ok, nice try ;-)

--- you say: no motion would have been performed
what motion are you talking about? mouse pointer (that's independent of focus) or some visual object?

--- you say: I just removed the click statement
so it works in the IDE without the click?

--- using class Screen and bout instance of Screen

in Java you should first create a screen instance with

Screen scr = new Screen();

from now on all methods, that should not act on a specific region are
qualified with scr.

so your Java code should look like this, to be "the same" as in Jython:

Screen scr = new Screen();
Region lRegion = scr.find("from_2.png");
Location lLocation = lRegion.getCenter().above(Integer.parseInt(pStartingOffset));
scr.hover(lLocation);
scr.mouseDown(Button.RIGHT);
scr.mouseMove(lLocation.offset(0, -100));
scr.mouseUp();

BTW: it is a general convention, to avoid lowercase L's especially at
the beginning of variable names, because they are easy to be misread.

-- 
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