Drag and drop is not working in java(nightly build)

Bug #1429074 reported by Sathish Nagarajan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Confirmed
Undecided
Unassigned

Bug Description

Hi Support,
After upgrading my Mac to OS X Yosemite (10.10.2).
I was not able to use Sikuli1.0.1 . so, I moved to Sikuli 1.1 (nightly build).
With this setup, drag and drop is not working.
it is just moving the mouse from one position to another.
But it is not pressing the mouse and moving.
Waiting for a positive reply.

Thanks & Regards,
Sathish Nagarajan

Revision history for this message
Sathish Nagarajan (sathish-nagarajan) wrote :

In Sikuli IDE, it is working fine. But as a java project, it is not working.

Revision history for this message
RaiMan (raimund-hocke) wrote :

I made a test on your system setup and things worked as expected.

On Mac dragDrop can only be used in the same focus context.

So, dragDrop within the same Window (in Finder move a file to a folder) works in IDE and in Java (I am testing these things in a Maven project that depends on the 1.1.0-snapshot).

this is my test:

    ImagePath.add(TestRun.class.getCanonicalName() + "/ImagesAPI.sikuli");

    App b = new App("Safari");
    App f = new App("Finder");
    b.focus();
    Match src = s.find("SikuliLogo");
    f.focus();
    Location trgt = s.find("ZEITmacapp").belowAt(-50); // the drop point in the Finder window
    trgt.click();

    // trying to copy the Sikuli logo to Finder (does not work - focus problem)
    s.dragDrop(src, trgt);

    s.wait(3f);

    // doing the same dragDrop with basic mouse actions (works here and in IDE)
    b.focus();
    s.mouseMove(src);
    s.mouseDown(Button.LEFT);
    f.focus();
    s.mouseMove(trgt);
    s.wait(0.5);
    s.mouseUp();

    // moving a file to a folder in the same Finder window (works here and in IDE)
    trgt.click();
    s.dragDrop("ZEITmacapp", "testfolder");

Revision history for this message
Sathish Nagarajan (sathish-nagarajan) wrote :

Thanks raiman... it started working.

RaiMan (raimund-hocke)
Changed in sikuli:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.