05-18-2014, 01:59 PM
Hi all,
I am working on google search auto suggest webedit. I am able to display the auto suggest drop down but not able to select a particular item from the drop down. I used "Wscript.Shell" concept and sendkeys. But, it is not selecting any of the item.
SystemUtil.Run "iexplore.exe","https://www.google.co.in/"
I am working on google search auto suggest webedit. I am able to display the auto suggest drop down but not able to select a particular item from the drop down. I used "Wscript.Shell" concept and sendkeys. But, it is not selecting any of the item.
SystemUtil.Run "iexplore.exe","https://www.google.co.in/"
Code:
Browser("title:=Google.*").Page("title:=Google.*").WebEdit("name:=q").Set "a"
wait(2)
Browser("title:=Google.*").Page("title:=Google.*").WebEdit("name:=q").fireevent "onkeydown"
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{DOWN}"
WshShell.SendKeys "{DOWN}"
WshShell.SendKeys "{ENTER}"
set WshShell = nothing