How to avoid "Select a region on the screen"

Asked by Sumit Golaniya

I am using sikuli for uploading a document in the selenium but whenever I run the TC, it always ask to select a region and then proceed after selecting the region.
How to avoid this manual intervention.

  String homeImagePath = "/src/test/resources/SampleFilesForUploading/";
            homeImagePath = folderPath.replaceAll("\\\\|/", "\\" + System.getProperty("file.separator"));
            homeImagePath = System.getProperty("user.dir") + folderPath + "sikuliximage-1687333079257.png";

            Screen screen = new Screen();
            Pattern image = new Pattern(homeImagePath);
            Match r = screen.exists(image, 1);

    try {
                // file = screen.capture(screen.getBounds());
                //screen.mouseMove(image);
                //screen.newRegion(530, 289, 205, 41);
                //screen.newRegion(399, 439, 264, 55).click();
                screen.click(r,0);

                System.out.println("CLicked on Home button");
            } catch (FindFailed e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

Question information

Language:
English Edit question
Status:
Expired
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#2

What version of SikuliX API are you using?

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.