← Back to team overview

sikuli-driver team mailing list archive

[Question #234158]: Finding fields from a known label

 

New question #234158 on Sikuli:
https://answers.launchpad.net/sikuli/+question/234158

I have a screenshot I can attach if needed. I have a screen with multiple edit fields on it. I would like to know if there is already functionality in Sikuli to take a label image and find an associated edit field. I was able to write a small test to find all check-boxes on a page, but that was easy since check boxes are all the same size and shape.

  public void findAllCheckBoxes() throws FindFailed {
    ...
        testPage.clickTab(testPage.getPagePath(), "misc-part-info");
        String imageName = getPageMapping().getString("common/checkbox/unchecked/image");
        Iterator<Match> checkboxes = getScreen().findAll(testPage.getImgLibrary() + "/" + imageName);
        while (checkboxes.hasNext()) {
            Match checkbox = checkboxes.next();

            checkbox.highlight((float) 1.0);
            getScreen().click(checkbox);
        }
...
    }

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