HP, QTP, QTP Code, QTP Interview Questions, Testing, Tools, UFT

How to launch QTP from HTML page?

I have got one query from one of my friend, how to launch QTP from HTML page. It is very simple. Create a simple *.HTML page using notepad and call a simple *.VBS code which launches QTP. Below is the code snippet.

HTML Snippet

<html>
  <head>
    <script type="text/vbscript" src="<full_path_of_your_vbscript_code.vbs>">
     </script>
  </head>
  <body>
    <input type=button id=launchQTP value="Click here to Launch QTP">
  </body>
</html>

[sociallocker][/sociallocker]

 VB Script Snippet

Option Explicit

Dim qtp 
Set qtp =CreateObject("QuickTest.Application")

qtp.Launch
qtp.Visible=True

'Do whatever you want

Set qtp=Nothing

Now open your HTML page, click on Click here to Launch QTP button. After a moment, QTP application opens up.

Thanks for visiting QAInsights! Check out our new portal Testifications.com to get updates on Software Testing related certifications. We’re always posting interesting articles on QAInsights. I request you to subscribe so you don’t miss out anything. Searching for QA Jobs Openings, check it at www.QAJobOpenings.com

Want to start a blog like this, please visit SpidyDomain to buy cheap web hosting and register domain.

Subscribe to our QAInsights YouTube Channel | Subscribe our free weekly newsletter.

Once a week we send a digest with the most popular articles.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

New Year. New Hope. Learn TruWeb. 78% OFF for Limited Time of my Udemy course..BUY NOW