← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #243198]: How to compate the text

 

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

    Status: Needs information => Answered

RaiMan proposed the following answer:
either visually:
if <the-region-containing-text2>.exists(capture(<the-region-containing-text1>, 0):
    print "equal";
else:
    print "not equal"

or using the OCR-feature:
text1 = <the-region-containing-text1>.text()
text2 = <the-region-containing-text2>.text()
if text1 == text2:
…

about problems and usage of OCR look at the relevant questions and faqs.

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