amitbanerjee28 / sikuli-api

Automatically exported from code.google.com/p/sikuli-api
0 stars 0 forks source link

Sikuli-java api 1.0.1 version click sometime doesn't work #75

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
Click in Java api doesn't work

What version of the product are you using? On what operating system?
sikuli-java.jar ( 1.0.1 version ) on Window 7 with Firefox browser

Please provide any additional information below.

My click functions are below, I was using the singleClick() 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@boardvantage.com] 
Sent: Monday, September 30, 2013 6:35 PM
To: 'rmhdevelop@me.com'
Cc: 'question235070@answers.launchpad.net'
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.

Original issue reported on code.google.com by kurtxc...@gmail.com on 1 Oct 2013 at 8:59

Attachments: