← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #235070]: Is Sikuli stable when it run in Java api for a little complicate program?

 

Question #235070 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/235070

Kurt Chen gave more information on the question:
My click functions are below, I was using the doubleClick() function:


       private Screen s;

       private Keyboard kb;

       private ScreenRegion sr;

       private Mouse mouse;

       private Canvas painter;

       private ScreenRegion rect;


       @BeforeSuite(alwaysRun = true)

       public void setupSuite() {


              Settings.setShowActions(false);

           Settings.SlowMotionDelay = 1;

           Settings.ClickDelay = 0.5;


              s = new Screen();

              sr = new DesktopScreenRegion();

              kb = new DesktopKeyboard();

              mouse = new DesktopMouse();

              painter = new DesktopCanvas();

       }


...


private void singleClick(String imagePath) throws FindFailed,
InterruptedException {


              painter.addCircle(sr.find(new ImageTarget(new
File(imagePath))).getCenter());

              painter.display(1);

              mouse.click(sr.find(new ImageTarget(new
File(imagePath))).getCenter());

              painter.clear();

       }


       private void doubleClick(String imagePath) throws FindFailed,
InterruptedException {


              painter.addCircle(sr.find(new ImageTarget(new
File(imagePath))).getCenter());

              painter.display(1);

              mouse.doubleClick(sr.find(new ImageTarget(new
File(imagePath))).getCenter());

              painter.clear();

       }


       private void rightClick(String imagePath) throws FindFailed,
InterruptedException {


              painter.addCircle(sr.find(new ImageTarget(new
File(imagePath))).getCenter());

              painter.display(1);

              mouse.rightClick(sr.find(new ImageTarget(new
File(imagePath))).getCenter());

              painter.clear();

       }



imagePath is the image file which passed into the click function.


Thanks.

-Kurt.


From: Ke Chen [mailto:kchen@xxxxxxxxxxxxxxxx] 
Sent: Monday, September 30, 2013 6:35 PM
To: 'rmhdevelop@xxxxxx'
Cc: 'question235070@xxxxxxxxxxxxxxxxxxxxx'
Subject: Click Issue


Hi RaiMan,


Here is the click issue for upload a file to website, you can see the Upload
button was greyed out, is not clickable.






Suppose to be seen like this:




This has been happening for so many times already, and this time, I am very
much sure I am using 1.0.1 version of sikuli-java.jar file.


The last one was that I have done it by manually, when I did it manually, I
always make sure I clicked hard enough to ensure the file is selected.


Thanks.

-Kurt.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.