How to write code for click Particular image. If screen has multiple of the same images on screen

Asked by Venkat on 2018-08-13

How to write code for click Particular image. If screen has multiple of the same images on screen.

Please Check below code

screen = new screen();

boolean lg=false;

Pattern Dptn;

Pattern Eptn;

Dptn= new Pattern(filePath +prop.getProperty("Image1"));

Eptn= new Pattern(filePath +prop.getProperty("Image2"));

screen.find(Dptn).left(4).highlight(4);

Thread.sleep(8000);

screen.click(Eptn);

Dptn=null;

Eptn=null;

ImagePath.remove(filePath +prop.getProperty("Image1"));

ImagePath.remove(filePath +prop.getProperty("Image2"));

break;

But I'm unable to click on Image2. same screen like image2 we have 10 same images.

Please help me to write a code.

Thanks & Regards,
Venkat

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2018-08-13
Last reply:
2018-08-13
RaiMan (raimund-hocke) said : #1

see findAll() in the docs

Can you help with this problem?

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

To post a message you must log in.