Gopi,
Try with this one. Same scenario for us also and solved using below code:
Browser("").Page("").WebEdit("").Set ""
Browser("").Page("").WebEdit("").Click
wait 3
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "123"
wait 3
WshShell.SendKeys "{DOWN}"
wait 3
WshShell.SendKeys "{ENTER}"
wait 3
Set WshShell = Nothing
Regards,
Anil Rai
On Saturday, March 29, 2014 3:37:30 PM UTC+5:30, Gopi wrote:
>
> Hii..
>
> I'm trying to automate one web page where I have one auto complete textbox
> as a mandatory field to complete.
>
> I have searched several threads and arrived with the code below, but it
> does not work as expected. Can someone look into this and point me where it
> goes wrong, please?
>
> Browser("Sample").Page("Pg_Sample").WebEdit("TxtBox").Set "123"
> Set ws = CreateObject("WScript.Shell")
> wait 2
> ws.SendKeys "{DOWN}"
> wait 2
> WS.SendKeys "{TAB}"
> Set ws = Nothing
>
>
> When I do manually in UI, that particular textbox would allow me to key-in
> first 4-5 characters/digits, and then automatically it would list some
> values from where I could pick-up the required using DOWN & TAB keys.
>
> ~~ Gopi
>
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
---
You received this message because you are subscribed to the Google Groups "QTP
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.