How to validate [verification] sikuli scripts

Asked by Sathyamoorthy

Hi,

I just create sikuli script for my testing. it works fine. but here the problem is how to validate the script. see if my script is executed and it completes upto the end of line. i want to know that how to verify the script is completed successfuly ?

Thanks,
V.Sathyamoorthy

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

place at the end

popup("Hey, I got to the end of the script")

Revision history for this message
Sathyamoorthy (sathyamoorthybe) said :
#2

Hey RaiMan Thanks.
But in my case i have to verify the output screen . For example in the output [Final Windows ] Shows pass/ fail status of test cases. So how do i say that testing was completed successfully.
 - Like i need to capture the failure status screenshot, and need to compare with output screen
 - And also in the entire screenshot i need to search failure word. is it possible?
In Sikuli will match only the pattern. how can i search failure word in final screen and compare .

Revision history for this message
RaiMan (raimund-hocke) said :
#3

--- But in my case i have to verify the output screen
imgRef = "shot of the screen how it should be.png"
check = Finder(capture(SCREEN))
check.find(imgRef)
if check.hasNext(): print "equal"
else: print "not equal"

about Class Finder: look docs

--- how can i search failure word in final screen and compare
you might try Region.text()
There are many questions around here and we have bug 710586

So if Region.text() does not work in your situation, you have to use the visual search with the shot of the word.

Revision history for this message
Sathyamoorthy (sathyamoorthybe) said :
#4

Thanks .
Let me try it out

Can you help with this problem?

Provide an answer of your own, or ask Sathyamoorthy for more information if necessary.

To post a message you must log in.