Welcome, Guest. Please login or register.
Login with username, password and session length

 
Advanced search

18120 Posts in 4741 Topics- by 31743 Members - Latest Member: suuraj
 

Pages: [1]   Go Down
Print
0 Members and 1 Guest are viewing this topic.
Author Topic: How to call the external VBS file without running QTP    (Read 246 times)
prasad gali
FRProject
User
*
Offline Offline

Posts: 19


« on: February 18, 2010, 08:02:56 AM »

Hi All,

I am exporting the test resluts in HTML report.For that i wrote a script and working fine.

And this file should run after the execution only,but i donot know how to call this function ?

Please help me in this.

Thanks in advance.

Thanks,
GP
Logged
Tarun Lalwani
Advanced User
*****
Offline Offline

Posts: 854



WWW
« Reply #1 on: February 18, 2010, 08:06:26 AM »

Look at Run method of WshShell in QTP help file. You need to run it from QTP and set the Async parameter to true. In the external file you need to wait for QTP to finish execution, this can be done using QTP AOM
Logged

Tarun Lalwani,
QuickTest Professional Unplugged - My new Book on QTP...
prasad gali
FRProject
User
*
Offline Offline

Posts: 19


« Reply #2 on: February 19, 2010, 02:57:34 AM »

Hi Tarun,

I will try to run this .vbs externally in a different ways but unable to produce the results.

I have a code to convert the XML to HTML and the code working fine but its done manually by double clicking on that.But i don't want this manual method,please give me the way to run automatically once test execution is completed..

Thanks in advance.

Thanks,
Prasad G
Logged
Tarun Lalwani
Advanced User
*****
Offline Offline

Posts: 854



WWW
« Reply #3 on: February 19, 2010, 03:18:55 AM »

Look in the way its done in below article

http://knowledgeinbox.com/articles/qtp/how-to/how-to-work-with-modal-dialogs-in-qtp/
Logged

Tarun Lalwani,
QuickTest Professional Unplugged - My new Book on QTP...
prasad gali
FRProject
User
*
Offline Offline

Posts: 19


« Reply #4 on: February 22, 2010, 02:54:12 AM »

Hi Tarun,

Thanks for the quick responce.

The article that you have given is not working for me..
I have a .vbs file in hand to convert XML to HTML file.When exactly i need to call this and how to call this function.
I really happy if you send the answer for this ( if you give code i will be more happy).
Thanks in advance....

Thanks,
Prasad
Logged
Tarun Lalwani
Advanced User
*****
Offline Offline

Posts: 854



WWW
« Reply #5 on: February 22, 2010, 03:02:30 AM »

You basically need the code to be run when the script ends

So you can add a VBS file with below code
Code
GeSHi (qtp):
Class VBSRunner

  Sub Class_Terminate()

    SystemUtil.Run "wscript","c:\XML2HTML.vbs"

  End Sub

End Class

Dim oRunner

Set oRunner = New VBSRunner



Then you should create a file c:\XML2HTML.vbs



Set QTP = CreateObject("QuickTest.Application")

'Wait for the Test to Completely finish

While QTP.Test.IsRunning : Wend



'Now do the XML to HTML conversion

 
Created by GeSHI 1.0.7.20
Logged

Tarun Lalwani,
QuickTest Professional Unplugged - My new Book on QTP...
prasad gali
FRProject
User
*
Offline Offline

Posts: 19


« Reply #6 on: February 23, 2010, 04:06:20 AM »

Hi Tarun,

Its working .....Thanks a lot ,at last i found the solution with you and really admired with the solution.

Thanks a lot again......

Thanks,
Prasad G
Logged
Pages: [1]   Go Up
Print
Jump to: