Solved

Mercury Quicktest Pro Script in VB

Posted on 2004-09-10
4
2,724 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access 2016 VB code 9 115
Vb.net 2008 2 60
How to add contact name to VBA code to automate emails in outlook using a Template 11 83
passing parameter in sql procedure 9 63
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

810 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