I am attempting to compose a QTP test where, as the first (and critical) step of the test is to input a large amount of data into the application.
This data is entered via a demographic input screen, where the user's SSN and other pertinent information is entered.
Here is the problem: Currently, the SSN field is only validated if there is a "key up" event registered by the application. In other words, if I TYPE in the SSN, it recognizes it and works fine. However, if I PASTE in the SSN, tab to the next field, and click "save," it tells me there is no SSN present.
It seems that I can only get QTP to "paste" in the SSN information... and I can't get it to register a key push or anything like that... Is there a way to solve this problem?
I know this may seem a little vague. Please let me know if you need more info. Basically, I need to know how I can get QTP to actually type in a piece of text, not paste.
Use the FireEvent method.
I've made effective use of the "onchange" event.
From one of many examples in QTP Help:
Triggers an event.
Image(description).FireEvent Value [, x, y]
Argument Type Description
Value String The Name of event to trigger. For the list of events, see the Event List.
x, y Number Optional. The x- and y-coordinates, relative to the upper left corner of the object.
The following example uses the FireEvent method to simulate moving the mouse over an image.
Thanks for the pointers. Those along with this:
Set WshShell = CreateObject("WScript.Shell")
have gotten me started. I found the Java Add-in manual in my managers office, and I'll be looking for what I need there in the future. I hope the answers will reveal themselves, hehe.
Again, thanks, and lots of bonus points to you,