Sponsored Ad

Thursday, November 11, 2010

QTP Testing: How to Check Boolean Value

You can check a Boolean value in VBScript using CBool() function. This function return true for non zero number and throw error with non numeric value.

for 0 as input, CBool returns false.

QTP Program to convert numeric to Boolean values:

msgbox "CBool(10)? " & CBool(10) & vbCr & " CBool(0)? " & CBool(0) &vbCr & " CBool(-10) " & CBool(-10)

Output of given program:

QTP Testing: How to Check Boolean Value

0 comments:

Post a Comment

Sponsored Ad

Development Updates

Tech Updates