Solved

Mercury Quicktest Pro Script in VB

Posted on 2004-09-10
4
2,722 Views
Last Modified: 2011-10-03
I have a bit of a dilemma right now.
I created a Mercury Quicktest Pro script to test a custom app. The script itself works fine on the machine I wrote the script on. (i.e. it works fine on my machine, which obviously has QTP installed)
Now I have to test the same software on 32 other machines of different types, w9x, w2k, laptop, desktop, ethernet, token ring, panasonic, dell, you get the idea.

anyways, in order to run a QTP script on a particular machine, QTP is supposed to be installed on that machine. Unfortunately, I am unable to install the product on this 32-machine test bed, due to a number of business reasons.

So I think to myself, "Self... QTP scripts are based off of VB script. Why not write a VB program, compile it to an executable, and run the executable from each of the test machines?"

Sounds like a simple task, but apparently Im missing something. Once again, I am able to run this exe on my machine, but when I try to launch the exe from any of the test bed, I receive
<error>
Runtime error 429
ActiveX Component Can't Create Object
</error>
on line 4 of the following code (right at the beginning)
<code>
Private Sub Command1_Click()
Dim qtApp ' Declare the Application object variable
Dim qtTest ' Declare a Test object variable
Dim qtResultsOpt ' Declare a Run Results Options object variable
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
.
.
.
End Sub
</code>

So I guess I'm missing some dll or ocx that includes Quicktest.Application. I'm assuming that the exe runs fine on my machine, because I have quicktest installed on it, and that all its dlls are registered on my machine. Any thoughts on how I might find the correct dll and bind it to my exe, or register it on the test bed machines?

Thanks!
0
Comment
Question by:irontodd
  • 2
4 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 12033073
You don't want to hear this, but to create an Application object then the application must be installed. You are trying to run it.
Copying all the necessary files and registering them correctly is tantamount to installing the application.
0
 

Author Comment

by:irontodd
ID: 12043459
If this is the case, you get the 250 for the answer, but before I go ahead and close this question out... for another 250, is there a way in VB to rewrite my script. For example (in pseudo)
MyVBProgram.exe.
Start Internet Explorer
In address bar, type www.experts-exchange.com
Click on the link that says Login
In username field type Irontodd
In password field type ******
Click login button.
once page is loaded, click logout button
in address bar, type www.microsoft.com
<end pseudo>
basically i need my program to interact with objects in other apps that ARE installed on the machine. Is this possible in vb?
If possible, what is sample code to access these objects?
Thank you
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 250 total points
ID: 12044233
So you want to write your own Quicktest?

It can be done using API calls, thouh I'm no expert in this. You start with FindWindow and then use SendKeys

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_10067329.html
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now