sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #20767
[Question #235394]: Can we have a check whether a text is present in particular region
New question #235394 on Sikuli:
https://answers.launchpad.net/sikuli/+question/235394
Can you please let me know if there is a solution to check whether a text is present in particular region .
If the text exists it should print the text exists and if it doesnt the text doesnt exists.
I 've tried it as below ,but it doesnt work:
I have a defined a list as below :
a =['apple','orange','grapes']
I have defined a region as :
t = selectRegion() # This will prompt me for the region that need be selected.
Now I want to search the selected region for the text defined in the list a.
i.e it should search for the region with the text apple and if it exists it should print apple exists else apploe does not exists.
for i in range(len(a)):
if exists(t.find(a(i))):
print a(i)+"exists" #if it exists it should print apple exists
exit()
else:
print a(i)+"does not exists" #apple does not exists
exit()
i+1
next i
This doesnt seems to be working .Can you please help with a solution on this ?
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.