Typing values SLOWLY, using UFT
Is there a possibillity to do this? There are spome edit fields in a web application that I have to enter a value, "like a user". Meaning by this that either there is an auto-complete process that kicks in when typing and then fills in the blanks, or in other cases a security mechanism (like captcha) that blocks fast inputs.
Is there a way to do this? Using sendkeys perhaps? Any thoughts over this ?
You can try two options: Both the options can be used to send the text or enter keystokes
1. Using wsript.shell object
set oShell = CreateObject("WScript.shell")
oShell.SendKeys(“String to input”)
2. Using Device Replay
Set oDR = CreateObject("Mercury.DeviceReplay")
oDR.SendString “String to input”
I have provided example to send string, but you can use these methods to send keystrokes. Sending keystrokes with each of these methods is different and you will have to look into the codes, which are different than for sending string.
Hope this helps
GoScriptLESS Create UFT Tests in seconds view demo and more details at scriptlessautomation.com
How does this differ from a standard "SET" command in UFT?
The SET command , it is like a copy->paste action.
Is there a difference between these commands on *how* they enter the text into the edit-field?
Any insights on this??
Will be very much appreciated !
Now check this out please... This is what I need help for. I need to select the year of birth from the drop down, and this will oipen after starting to type it in it's relevant edit field.
How would it be possible to choose from the list that appears there?
Please view the attached image.
As for the first problem, did you try the proposed solution?
As for the second, not sure i understand the problem - did you try the select method on the test object ?
What do you mean by the SELECT method?
The thing is that I cannot type to the field and leave the text there, as it will be discarded. I have to select the matching value from the drop down list that shows, while I am typing.
Otherwise, my selection is not saved.
If I do it manually, I start typing and then after a few letters the drop down immerges.
Please see the attached image
I meant, learn the control, it is identifed as drop down right?
Or is it identified as a webEdit?
if it is a dropdown, did you try using the select method?
When I click a certain icon (the arrow down icon) then this makes the drop down list appear, however I ahve not been able to select a value from that list, although I have learned that object seperately. UFT simply does not do anything with that listbox object...
Please view the ObjRep for this object.
Thing is, with this object and the ones next to it, is that they react to the arrow keys (up/down)...
So that can be an option too... if nothng else works
I tried doing something like this,as soon as I got the listbox open (which was not that easy, as it need to press a specific icon) the Select method did not select anything from that list. Simply ignored the command.
I tried using keystrokes, which at the moment seem to be the only option . meaning that I have to perform the up or down arrow press in order to select a value one per time.
Not very efficient, but the only thing that works...