Micro Focus QTP (UFT) Forums
Autocomplete in QTP 10.0 - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Autocomplete in QTP 10.0 (/Thread-Autocomplete-in-QTP-10-0)



Autocomplete in QTP 10.0 - branjitk - 06-11-2012

Hi All,
I am having error for Autocomplete, i attached one screenshot. In that image Port of loading and Port of Discharge are same.

My Doubt is I am entering values through script in that Edit boxes,but after click on Find button both are going to default values as shown in the screen shot. how to handle this issue while click on Button.

In this,i am using following code, but it is not working.

Code:
Browser("Browser").Page("Interactive Schedule -").WebEdit("WebEdit").Set "Chennai"
    wait 2
    Set wshell = CreateObject("wscript.Shell")
    Browser("Browser").Page("Interactive Schedule -").WebEdit("WebEdit").Click
    wshell.SendKeys "{DOWN}"
    wait 2
    wshell.SendKeys "{DOWN}"
    wait 2
    wshell.SendKeys "{TAB}"
Browser("Browser").Page("Interactive Schedule -").WebEdit("WebEdit_2").Set "Shanghai"
    wait 2
    Browser("Browser").Page("Interactive Schedule -").WebEdit("WebEdit_2").Click
    wait 2
    wshell.SendKeys "{DOWN}"
    wait 2
    wshell.SendKeys "{DOWN}"
    wait 2
    wshell.SendKeys "{TAB}"

Thanks & Regards,
Ranjit Kumar B