Automation testing QTP with VB Script functions Interview questions


Total available count: 68
Subject - Software Testing
Subsubject - Automation testing QTP with VB Script functions

While...Wend statement?

While...Wend statement executes a series of statements as long as a given condition is True.

Syntax:
While condition
   Version [statements]
Wend

Arguments:
condition: Numeric or string expression that evaluates to True or False. If condition is Null, condition is treated as False.
statements: One or more statements executed while condition is True.

Example:  

'While...Wend
    Counter =1
    While Counter < 4
    Total =Inputbox("Please enter the total marks in numbers")
    If   Total < 50 Then                                 
           MsgBox  "Fail"                                       
  ElseIf  Total >=50 and Total <=60   then                                  
            Msgbox "Second Class"                        
  ElseIf  Total >60 and Total <80   then                                  
            Msgbox "First Class"                       
    ElseIf  Total >=80  then                                
             Msgbox "Distinction"                  
                                     Else      
            Msgbox "Invalid Marks"
  End If
     Counter=counter + 1
    Wend

 




Next 5 interview question(s)

1
With statement?
2
FSO(File system object)?
3
Object/Collection Description?
4
Creating a FileSystemObject Object?
5
Method: CreateTextFile?

Comments