← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #203304]: how to accurately recognize text "Snapshot 1", "Snapshot 2"...

 

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

RaiMan proposed the following answer:
If it does not work this way, then you should forget about the text
feature using it this way (see bug 710586).

You might try to first findAll("Snapshot") and then loop through the
matches and find out using Region.text().

Another general possibility is to select the text somehow and use
type("c", KeyModifier.CTRL) to get it to the clipboard and the use
Env.getClipboard() to compare it with a given text. this can be combined
with the above findAll().

But when using the clipboard approach, you cannot use paste() in the
same script currently (a bug).

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