Autocomplete dropdown list not displayed with qtp for webedit

I have a problem in my web application automation with qtp. QTP is setting value in the Edit box. But drop down list is not displayed while doing with QTP. If we are trying manually then list is getting displayed.

the properties for WebEdit object are

"Class Name:=WebEdit",
"abs_x:=772",
"abs_y:=636",
"class:=ui-autocomplete-input",
"default value:=",
"disabled:=0",
"height:=20",
"html id:=alertTextTag",
"html tag:=INPUT",
"innerhtml:=",
"innertext:=",
"kind:=singleline",
"max length:=2147483647",
"name:=alertTextTag",
"outerhtml:=<INPUT aria-haspopup=true id=alertTextTag class="ui-autocomplete-input" role=textbox size=45 type=text name=alertTextTag autocomplete=""off"" jQuery171016074769097226676=""73"" aria-autocomplete=""list"">",
"outertext:=",
"readonly:=0",
"rows:=0",
"type:=text",
"value:=",
"visible:=True",
"width:=288",
"width in characters:=45",
"x:=388",
"y:=487"

 

Manually ,After clicking the webedit box when we press the down arrow, dropdown list is displayed .I tried to do the exactly same in qtp script by SendKey method with following code

 

Set WshShell = CreateObject("WScript.Shell")
Browser("BrowserName").Page("PageName").WebList("searchForAlertBy").Select "Alert Category"
Browser("BrowserName").Page("PageName").WebEdit("alertTextTag").Set "Assets"

Browser("BrowserName").Page("PageName").WebEdit("alertTextTag").Click
Wscript.Sleep 100
WshShell.SendKeys "{DOWN}"

 

But Down key is not pressed on application.

What is wrong with this code and is there any other method to achieve this?

 

Thanks

 

 

 

 

 

 

 

 

 

Parents Reply Children