GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Testing Tools  >  QTP

 Print  |  
Question:  How to add a failure from a VBscript function to the results. how can I implement the functionality of checkpoint functionality from by VBScript. For Ex: I want to record a failure if some calculations evaluate to false.



February 02, 2006 22:26:18 #2
    Member Since: Visitor    Total Comments: N/A 

RE: How to add a failure from a VBscript function to t...
 

Put a Function in the Library and call this :

Write_result Browser("sss").page("sscs").webElement("sss").check (checkpoint),"your step details"

For Ex:

Function Write_result(Flag,steps)
   Select Case Flag
   Case "True"
  Reporter.ReportEvent 0,"Debugger",steps
   Case "False"
  Reporter.ReportEvent 1,"Debugger",steps 
   Case 2
   Reporter.ReportEvent 2,"Debugger",steps
   Case 3
  Reporter.ReportEvent 3,"Debugger",steps
   Case 4
     Reporter.ReportEvent 4,"Debugger",steps
   Case Else
  Reporter.ReportEvent 1,"Debugger","Data entry error in the calling command"
   End Select
End Function

     

 

Back To Question