How to perform the Pressing of Enter Action in QTP. I'm selecting a cell and able to set a value ,now I want to press enter key and get the list from that Java Edit box. Which are the different ways I can achieve this?
Use mentioned above Type method: YourObject.Type micReturn
Use SendKeys method:
Function SendKeys(sKey)
Set WshShell = CreateObject("WScript.Shell")
WshShell.AppActivate "Your browser" ' You may need to activate your browser first
WshShell.SendKeys sKey
wait(1) ' You may need to add some Wait statements around
End Function
In your case it will be
SendKeys "{ENTER}"
See MSDN SendKeys and MSDN AppActivate for more details.