← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #235394]: Can we have a check whether a text is present in particular region

 

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

    Status: Answered => Open

saaliha is still having a problem:
Thanks for the quick revert,RaiMan.

I tried it out and it gave me the output as 
apple does not exists

orange does not exists

grapes does not exists
none of given texts found
Where as the texts 'apple','orange','grapes' actually exists in the GUI
====================================
I changed the above to :
t = selectRegion()
a = 'grapes'
found = False
for text in a:
    if t.exists(text):
        print text + " exists"
        found = True
        break
    else:
        print text + " does not exists"
if not found:
    print "none of given texts found"

The output received is as:
g exists.
Here it reads the first charachter of the text and matches it.
====================
Any clue on how to proceed with it so that it will search for the entire text and check for its present in the GUI and give the output as "grapes exists" "apple exists " and "orange exists"

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