sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #25433
Re: [Question #246694]: Sikuli with Selenium Java
Question #246694 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/246694
Status: Open => Answered
RaiMan proposed the following answer:
I successfully ran this script on Windows 7 with the Calculator app and got finally printed
Pass: 200
imgRechner = Pattern("titleOn.png").exact().targetOffset(-38,38) # window title activated
if not exists(imgRechner, 0):
click(Pattern("titleOff.png").exact()) # window title not activated
find(imgRechner)
regResult = Region.create(getLastMatch().getTarget(), 235, 20) # get the result field
click(Pattern("btnClearAll.png").exact())
regResult.highlight(2)
click(Pattern("btn4.png").exact())
click(Pattern("btnMult.png").exact())
click(Pattern("btn5.png").exact())
click(Pattern("btn0.png").exact())
click(Pattern("btnResult.png").exact())
Settings.OcrTextRead = True
wait(1)
txtResult = result.text()
if "200" in txtResult:
print "Pass:", txtResult
else:
print "Fail"
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.