← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #661287]: region below and above keyword

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
suggestion for the above:

Screen screen = new Screen();
Region reg = r.find(VisText).below(100); // comment 1
reg.highlight(2); // comment 2
reg.click(Noteicon); // comment 3

-- comment 1:
store the evaluated Region for later use to avoid a new search

-- comment 2:
gives you direct visible feedback of the evaluated region

-- comment 3:
should stop with a FindFailed exception, if Noteicon (supposing it is a String containing an image filename) is not visible in the Region reg

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