?
Solved

Mercury Quicktest Pro Script in VB

Posted on 2004-09-10
4
Medium Priority
?
2,733 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
3 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 500 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

850 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