← Back to team overview

sikuli-driver team mailing list archive

[Question #707066]: How to avoid "Select a region on the screen"

 

New question #707066 on SikuliX:
https://answers.launchpad.net/sikuli/+question/707066

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();
            }

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.