region below and above keyword

Asked by Maniraj on 2017-11-30


I am trying to Set a region , see below code i set region but it is not working, below(100) there will be no "Noteicon" but it is clicking how we can handle this.

IMP: It is taking Screenshot correctly in the specified region - Below(100).

Request you to explain in details help me out to fix this issue.

                 Screen screen = new Screen();
                Region r = new Region(screen);

Question information

English Edit question
Needs information
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
RaiMan (raimund-hocke) said : #1

using the latest SikuliX version? 1.1.1 or 1.1.2 nightly

Maniraj (aathimaniraj) said : #2

yes using 1.1.1 version

RaiMan (raimund-hocke) said : #3

suggestion for the above:

Screen screen = new Screen();
Region reg = r.find(VisText).below(100); // comment 1
reg.highlight(2); // comment 2; // 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

Maniraj (aathimaniraj) said : #4

Hi Having doubt,

                 Region reg = screen.find(Aimage1).above(50); // comment 1
  reg.saveScreenCapture("/Users/855/Desktop/","Q"); // comment 2
  reg.highlight(2); // comment 3; // comment 4

-- comment 4:
It is not Finding Noteicon but Screenshot is taking correctly and in That noteicon is visible too but it is not clicking

Kindly help me out to fix

RaiMan (raimund-hocke) said : #5

Sure that the image Noteicon completely lies inside the Region reg (only 50 pixels in height)?

Can you help with this problem?

Provide an answer of your own, or ask Maniraj for more information if necessary.

To post a message you must log in.