Welcome, Guest. Please login or register.
Login with username, password and session length

 
Advanced search

18120 Posts in 4741 Topics- by 31743 Members - Latest Member: suuraj
 

Pages: [1]   Go Down
Print
0 Members and 1 Guest are viewing this topic.
Author Topic: QTP wont input value into field    (Read 172 times)
Paul Reed
User
*
Offline Offline

Posts: 11


« on: February 23, 2010, 07:49:33 PM »

I have an issue whereby QTP refuses to input a value into a field within a VB6 app. So far it will go through the app and populate all manner of textboxes from drop downs to comobo boxes, etc, etc. When it comes to two particular textboxes it wont populate them with the given values.

The script is below:
Window("Application").Window("Application v1.4.6").WinObject("ThunderRT6FormDC").Window("Person Description").WinObject("___").Type "180"

QTP has no issues locating and placing the cursor into the box. I can even get it to delete any values already in the box. But wont enter the 180.

I am wondering if it is related to the box being a masked field as its prepopulated with the underscores. The other box I am having issues with is a data box that also has the underscores in there such as "__/__/____".

The populate these boxes manually you just enter the numbers so there is some formatting going on behind the scenes and im wondering if this is the issue.

Is there any way around this?

Any help you can offer would be much appreciated.
Logged
Tarun Lalwani
Advanced User
*****
Offline Offline

Posts: 854



WWW
« Reply #1 on: February 23, 2010, 07:53:15 PM »

Try it like this and see if it helps

With Window("Application").Window("Application v1.4.6").WinObject("ThunderRT6FormDC").Window("Person Description").WinObject("___")
   .Type micHome
   .Type "1"
   Wait 0, 500
   .Type "8"
   Wait 0, 500
   .Type "0"
   Wait 0, 500
End With
Logged

Tarun Lalwani,
QuickTest Professional Unplugged - My new Book on QTP...
Asiq Ahamed
Moderator
Sr. User
*****
Offline Offline

Posts: 459



WWW
« Reply #2 on: February 23, 2010, 09:34:45 PM »

Hi Fatti,
      If your textbox is formatted for "__/__/____", then your input should be like this '14071984'.

Please try with the below code,

Code
GeSHi (qtp):
Window("Application").Window("Application v1.4.6").WinObject("ThunderRT6FormDC").Window("Person Description").WinObject("___").Type "14071984"

 
Created by GeSHI 1.0.7.20

I guess this is your problem.
Logged
Paul Reed
User
*
Offline Offline

Posts: 11


« Reply #3 on: February 24, 2010, 01:16:56 AM »

Try it like this and see if it helps

With Window("Application").Window("Application v1.4.6").WinObject("ThunderRT6FormDC").Window("Person Description").WinObject("___")
   .Type micHome
   .Type "1"
   Wait 0, 500
   .Type "8"
   Wait 0, 500
   .Type "0"
   Wait 0, 500
End With

Mate that knocked it on the head. Your a legend.

Any particular reason that works and the original didnt?
Logged
Tarun Lalwani
Advanced User
*****
Offline Offline

Posts: 854



WWW
« Reply #4 on: February 24, 2010, 01:21:19 AM »

Not Sure. But mostly it could be because of the time application is taking to respond to each key event
Logged

Tarun Lalwani,
QuickTest Professional Unplugged - My new Book on QTP...
Pages: [1]   Go Up
Print
Jump to: