Solved

Mercury Quicktest Pro Script in VB

Posted on 2004-09-10
4
2,728 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…

688 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