How to update Pass/Fail in Excel using Vbscript - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: How to update Pass/Fail in Excel using Vbscript (/Thread-How-to-update-Pass-Fail-in-Excel-using-Vbscript) |
How to update Pass/Fail in Excel using Vbscript - anji2010 - 07-02-2009 How to update Pass/Fail in Excel using Vbscript TCID Action property Expeted Actual Pass/Fail thses are the columns in excel . based on the "Action" keyword i wrote a function which returns pass/fail . how to update that pass/fail in excel sheet for that column "Pass/Fail" of that "Action " based on pass or fail returned Please help me thanks in advance RE: How to update Pass/Fail in Excel using Vbscript - basanth27 - 07-03-2009 Learn about Createobject("Excel.Application") RE: How to update Pass/Fail in Excel using Vbscript - ursvinod - 07-03-2009 Hi, Below is the solution, Code: Set qtApp = CreateObject("QuickTest.Application") Use the above code at the end of out script. - Vinod RE: How to update Pass/Fail in Excel using Vbscript - ritesh - 07-06-2009 Hi Vinod, Can u please explain in little bit detail. Bcoz i'm getting output as 'Running'. I use the following steps to update the result in excel: 1) I have written a function called ResultEntry() and saved it inside a VB file. 2) I call this function at the end of each test case. Here is the ResultEntry function Code: Public Function ResultEntry(TestCaseId, TestCase, Desc, Result) And I call this function at the end of the each test case inside the If loop like: Code: If (Pass condition) Then Please let me know if I'm wrong or even if I can improve the steps what i'm following. RE: How to update Pass/Fail in Excel using Vbscript - KVK - 07-13-2009 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 Code: Set QtpApp = CreateObject("QuickTest.Application") Paste the above code in a vbs file(*.vbs) and run the vbs file. Let me know if it works |