sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #37884
Re: [Question #293220]: Can't click when using a Match object - JAVA
Question #293220 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/293220
Status: Open => Answered
Eugene S proposed the following answer:
I afraid this is not how it works.
What you are trying to do is to click the Iterator<Match> object while
what you really need to do is click on each one of the found elements
(if any). Try something like this:
ImagePath.setBundlePath("C:/temp/sikulipatterns/");
Screen s = new Screen();
Iterator<Match> results = s.findAll("eclipseDocIcon.png");
while (results.hasNext()) {
Match currentMatch = results.next();
currentMatch.highlight(1); //this helps to visualize the process and better understand what elements have been found
currentMatch.click();
}
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.