SilkTest Question:
Download Job Interview Questions and Answers PDF
Problem with the VerifyBitmap
Answer:
Using VerifyBitmap function for comparing the Position, Borders, Color etc.
For Example:
Window.VerifyBitmap("Position.bmp",[Rect])
Window.VerifyBitmap("Border.bmp",[Rect])
Window.VerifyBitmap("Color.bmp",[Rect])
Running the script if any one of the verification failed, script is terminating at that point itself, without running remaining lines in the script.
Is it possible to make script run completely even though any of the verification failed? Want to see all the failed verified results in result window.
Answer1:
Put all the verification statements in individual do...except.....You can keep except part blank or display your error message here.....
Answer2:
That is how below three functions will work.
VerifyBitmap()
VerifyProperties ()
Verify ()
that should be last statement of your testcase and cleanup code you put after that but, that will get executed only when testcase pass. You can put it in except block so that it will get executed even testcase fails also Like below
do
//
//
//your statements
//
//
VerifyBitmap()
except
// your remaining statements those need to be executed only when testcase fails.
Or
use SYS_CompareBitmap() instead of VerifyBitmap()
For Example:
Window.VerifyBitmap("Position.bmp",[Rect])
Window.VerifyBitmap("Border.bmp",[Rect])
Window.VerifyBitmap("Color.bmp",[Rect])
Running the script if any one of the verification failed, script is terminating at that point itself, without running remaining lines in the script.
Is it possible to make script run completely even though any of the verification failed? Want to see all the failed verified results in result window.
Answer1:
Put all the verification statements in individual do...except.....You can keep except part blank or display your error message here.....
Answer2:
That is how below three functions will work.
VerifyBitmap()
VerifyProperties ()
Verify ()
that should be last statement of your testcase and cleanup code you put after that but, that will get executed only when testcase pass. You can put it in except block so that it will get executed even testcase fails also Like below
do
//
//
//your statements
//
//
VerifyBitmap()
except
// your remaining statements those need to be executed only when testcase fails.
Or
use SYS_CompareBitmap() instead of VerifyBitmap()
Download SilkTest Interview Questions And Answers
PDF
Previous Question | Next Question |
How can we get the IP address of a PC? | How to link an error in the result file to the script file? |