sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #29028
Re: [Question #256394]: exists ('some text') or exists (image of text) not working properly
Question #256394 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/256394
Description changed to:
Hi,
In my application GUI that I am testing, there is a box that has some
text. I would like to check if a certain phrase appears in that textbox
while my that application is running.
the code that i have written is :
log = find(image of the textbox)
while not log.inside().exists("abc xyz"):
sleep(5)
while not testlog.inside().exists("abc xyz"):
popup("fail")
popup("pass")
This code did not work as it should. If I put in text, the test would
fail even if the text appeared. I tried putting an image of the text,
but with that it always passes even if the (abc xyz) does not appear.
I am currently using sikuli 1.0.1 and during the installation I have
just selected Option 1 (Sikuli IDE, running scripts from commandline)
and Option 6 (useable on windows, mac and linux). do i need to select
the option with ocr? how to have ocr inside the sikuli i already
installed? do i need to reinstall sikuli?
I have also tried putting these in my codes but it still could not work (maybe because i did not select ocr during installation?)
Settings.OcrTextSearch = True
Settings.OcrTextRead = True
I am thinking if the exists(some text) cannot work, I am wondering
whether I can use Sikuli to open the log file (the box that has text in
it is saved in a log file) and try to find the text in it. I would like
to know how to use Sikuli to search for text inside a log file.
Thanks.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.