Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to update Pass/Fail in Excel using Vbscript
#5
Not Solved
Hi Ritesh,

Code:
Run_Status = qtTest.LastRunResults.Status

The above statement will return the current run status of the test.

You have to use this statement only at the end of your script i.e end of last action in your test. If there are any other actions that need still needs to run then the run status will be Running.

Please try this and let me know..
Hi Ritesh,

The above code that Vinod pasted can not be used in QTP instead use the same code in a vbs file and then run the vbs file. It works perfectly Smile

Code:
Set QtpApp = CreateObject("QuickTest.Application")
QtpApp.Launch
QtpApp.Visible = True
QtpApp.Open "C:\TestScript"
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions") ' Create
the Run Results Options object
qtResultsOpt.ResultsLocation = "C:\TestScrip" ' Set the results
QtpApp.Test.Run ' Run the test
MsgBox QtpApp.Test.LastRunResults.Status ' Check the results of the test  run
QtpApp.Close

Paste the above code in a vbs file(*.vbs) and run the vbs file.

Let me know if it works Smile
Reply


Messages In This Thread
RE: How to update Pass/Fail in Excel using Vbscript - by KVK - 07-13-2009, 09:05 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is VBScripting disabled in Office 365 update? soumyarani 0 1,553 12-19-2020, 12:37 PM
Last Post: soumyarani
  how can i click a macro button in excel using vbscript arpan 1 3,832 10-03-2017, 06:27 AM
Last Post: supputuri
  Pass reference to datatable into function smallsteve 2 2,141 09-28-2017, 09:18 PM
Last Post: smallsteve
  UFT 12.02 Compatibility for IE 11.0 : Fail to identify the defined Object Amruta_121 9 11,289 01-11-2016, 12:45 PM
Last Post: vinod123
  Can you please help me in QTP DP to pass the variable name anshika.agarwal 1 2,803 09-04-2014, 06:43 PM
Last Post: anshika.agarwal

Forum Jump:


Users browsing this thread: 1 Guest(s)