I have a test script that verifies if a check box is checked.How can I do this?:If the check box is checked --> continue with the script.If the checkbox is not checked --> pause the script and a message appears "Check box is not checked" and with 2 buttons "Continue" or "Stop the Script".Note: the Consequences of the 2 buttons are obvious.

Questions by Pachuca

Showing Answers 1 - 1 of 1 Answers

adisgee

  • Aug 2nd, 2007
 

Your questions holds most of the answers : )

1. Read the value of the checkbox using some get_object function. (type get_ on the WinRunner editor and intellisense will display a whole bunch of "get_ " functions. select the one that best serves your purpose.)

2. The value returned by a checkbox is usually boolean (1- checked, 0 - unchecked or might be the other way round)

3. if vValue == 1
{
   ...
   ...
}

else if vValue == 0
{
 ....
 ....
}
else
{
   ...
   "function did not return any value - code failure"
}

3. As far as your qs of having those two buttons on the popup, i doubt that is possible in WinRunner. (Might be possible, but then I am not aware of it, sorry)

Thanks,
Aditya.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions