Hello Team,

Here is my code which does the autocomplete ..But for my requirement I need 
to select a specific data from the "AutoSuggestion" list. Any help would be 
highly appreciated.

With Browser("openedbytestingtool:=0").Page("Title:=.*")
.WebList("html id:=pt1:r2:0:soc1::content", "name:=pt1:r2:0:soc1","html 
tag:=SELECT").Select "Grips"
.Sync
wait(1)
.WebButton("html id:=pt1:r2:0:cb3","html tag:=BUTTON","name:=Pick").Click
 Set WshShell =CreateObject("WScript.Shell")
     .WebEdit("html 
id:=pt1:r2:0:r1:1:iclov1::content","name:=pt1:r2:0:r1:1:iclov1","html 
tag:=INPUT").Click
WshShell.SendKeys "WB" ' type the initial value
            wait(2)
' numRow= 
.WebTable("class:=af_dialog_main","name:=WebTable").GetROProperty("innertext")
' msgbox numRow
            WshShell.SendKeys "{DOWN}" 'Selects the first values form the 
dropdown
wait(1)

WshShell.SendKeys "{Tab}" 'tabs out to next field
wait(1)
If .WebButton("html id:=pt1:r2:0:r1:1:cb1","html 
tag:=BUTTON","innertext:=Submit").Exist(10) Then
.WebButton("html id:=pt1:r2:0:r1:1:cb1","html 
tag:=BUTTON","innertext:=Submit").Click
wait(1)
'.WebButton("html tag:=BUTTON", "html id:=pt1:r2:0:cb2", 
"innertext:=Save").Click
'Report Successful Share
Print "Pass"
blnFound = 1 

If blnFound = 0 Then 
   'Report Incorrect Share
   Print "Fail"
End If
End If
    End With



Thanks,
Fizza

-- 
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

Reply via email to