Hi
 
WshShell.SendKeys ("{Enter}")
 
is not working. I have general question for sendkeys method. the dialog box 
is by default active, If i press Enter (manually) the OK button is clicked. 
then why do we need to write a code to make the dialog box active
 
also i am using the below code, 
 
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{ENTER}"
 
In debugger WshShell is shown as containing the path of the current test 
folder in qtp. It means we need to give a reference to the application 
under test before using the second line of the code. For this what can be 
the solution.
 
 if i use below, it is not working
Set WshShell = CreateObject("WScript.Shell")
WshShell.Activate "WpfWindow("Real-time View").Dialog("Delete Page")"
WshShell.SendKeys "{ENTER}"
 
 
I want to click Yes button in the below code
WpfWindow("Real-time View").Dialog("Delete Page").WinButton("Yes")
 
 
I am also using below, but its not working
Set DeviceReplayObject=CreateObject("Mercury.DeviceReplay")
DeviceReplayObject.PressKey"28"
 
Regards
 
 

On Friday, July 20, 2012 9:48:27 AM UTC+5:30, gokul krishna wrote:

> Try this 
>
> WshShell.SendKeys ("{Enter}") 
>
> Cheers, 
> Gokul. 
>
> On Fri, Jul 20, 2012 at 9:32 AM, qtplearner <[email protected]> 
> wrote: 
> > Hi Friend 
> > pls see below query 
> > 
> > I am using sendkeys as but it is not working. need to click OK button in 
> a 
> > dialog box by pressing Enter 
> > 
> > Set WshShell = CreateObject("WScript.Shell") 
> > WshShell.SendKeys "{ENTER}" 
> > 
> > 
> > OK button is by default active in the dialogo box. For using sendkeys 
> > method, do i need to first launch application or activate dialog box 
> using 
> > Wshshell object. 
> > 
> > -- 
> > 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 
>
>
>
> -- 
> Thanks, 
> Gokul Krishna. 
>

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