QTP fails to recognize the dialog

53 views
Skip to first unread message

sankar sakar

unread,
Oct 19, 2010, 12:12:10 AM10/19/10
to QTP - HP Quick Test Professional - Automated Software Testing
Hi All,

i want to check whether the flight reservation dialog box is open or
not,
if it's open i want to close, i tried with the below code it's doesn’t
work.
i tried by debug it , QTP doesn't detect the Flight Reservation
Dialog.
Please help me to find where i am missing.

code:
-------
If Dialog("Login").Dialog("text:=Flight Reservations").Exist(1) Then
MsgBox two
MsgBox "two"
Dialog("Login").Dialog("text:=Flight Reservations").Close
End If


Thanks
sankar

S R I D H A R

unread,
Oct 19, 2010, 1:08:14 AM10/19/10
to mercu...@googlegroups.com
The code is wrong
 
If Window("Login").Dialog("text:=Flight Reservations").Exist(1) Then
 MsgBox two
 MsgBox "two"
Window("Login").Dialog("text:=Flight Reservations").Close
End If

Check the difference between urs code and mine.Hope it will work now
 
Thanks
SRIDIVYADHAR
--
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 Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

sankar sakar

unread,
Oct 19, 2010, 3:52:52 AM10/19/10
to mercu...@googlegroups.com
Hi Sridivyadhar,
 
I tried your code , it fails.
 

Thanks
sankar

S R I D H A R

unread,
Oct 19, 2010, 7:57:40 AM10/19/10
to mercu...@googlegroups.com
First of all what is the application you are trying to automate

sankar sakar

unread,
Oct 19, 2010, 9:17:44 PM10/19/10
to mercu...@googlegroups.com
Hi,
 
I am tri to automat the sample applicatio Flight.
 
scenario:
 
If i enter wrong password application throws a pop up Dialog,i just want to check whether this Dilaog box exist or not using DP.
 
Thanks

mallikarjunarao

unread,
Oct 20, 2010, 3:33:41 AM10/20/10
to QTP - HP Quick Test Professional - Automated Software Testing
try this code, it works

Dialog("Login").WinEdit("attachedText:= Agent Name:").Set "malli"
Dialog("Login").WinEdit("attachedText:= Password:").Set "malli"
Dialog("Login").WinButton("text:=OK").Click
If Dialog("Login").Dialog("text:=Flight Reservations").Exist Then
Dialog("Login").Dialog("text:=Flight
Reservations").WinButton("text:=OK").Click
End If




On Oct 20, 6:17 am, sankar sakar <sssankar...@gmail.com> wrote:
> Hi,
>
> I am tri to automat the sample applicatio Flight.
>
> scenario:
>
> If i enter wrong password application throws a pop up Dialog,i just want to
> check whether this Dilaog box exist or not using DP.
>
> Thanks
>
> On Tue, Oct 19, 2010 at 5:27 PM, S R I D H A R <b.sri...@gmail.com> wrote:
>
> > First of all what is the application you are trying to automate
>
> >   On Tue, Oct 19, 2010 at 1:22 PM, sankar sakar <sssankar...@gmail.com>wrote:
>
> >>   Hi Sridivyadhar,
>
> >> I tried your code , it fails.
>
> >> Thanks
> >> sankar
>
> >>   On Tue, Oct 19, 2010 at 10:38 AM, S R I D H A R <b.sri...@gmail.com>wrote:
>
> >>>   The code is wrong
>
> >>> If Window("Login").Dialog("text:=Flight Reservations").Exist(1) Then
> >>>  MsgBox two
> >>>  MsgBox "two"
> >>> Window("Login").Dialog("text:=Flight Reservations").Close
> >>> End If
>
> >>> Check the difference between urs code and mine.Hope it will work now
>
> >>> Thanks
> >>> SRIDIVYADHAR
> >>>    On Tue, Oct 19, 2010 at 9:42 AM, sankar sakar <sssankar...@gmail.com>wrote:
>
> >>>> Hi All,
>
> >>>> i want to check whether the flight reservation dialog box is open or
> >>>> not,
> >>>> if it's open i want to close, i tried with the below code it's doesn’t
> >>>> work.
> >>>> i tried by debug it , QTP doesn't detect the Flight Reservation
> >>>> Dialog.
> >>>> Please help me to find where i am missing.
>
> >>>> code:
> >>>> -------
> >>>> If Dialog("Login").Dialog("text:=Flight Reservations").Exist(1) Then
> >>>>  MsgBox two
> >>>>  MsgBox "two"
> >>>> Dialog("Login").Dialog("text:=Flight Reservations").Close
> >>>> End If
>
> >>>> Thanks
> >>>> sankar
>
> >>>> --
> >>>> 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 Mercu...@googlegroups.com
> >>>> To unsubscribe from this group, send email to
> >>>> MercuryQTP+...@googlegroups.com<MercuryQTP%2Bunsu...@googlegroups.com>
> >>>> For more options, visit this group at
> >>>>http://groups.google.com/group/MercuryQTP?hl=en
>
> >>> --
> >>> 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 Mercu...@googlegroups.com
> >>> To unsubscribe from this group, send email to
> >>> MercuryQTP+...@googlegroups.com<MercuryQTP%2Bunsu...@googlegroups.com>
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/MercuryQTP?hl=en
>
> >> --
> >>   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 Mercu...@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> MercuryQTP+...@googlegroups.com<MercuryQTP%2Bunsu...@googlegroups.com>
> >> For more options, visit this group at
> >>http://groups.google.com/group/MercuryQTP?hl=en
>
> > --
> > 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 Mercu...@googlegroups.com
> > To unsubscribe from this group, send email to
> > MercuryQTP+...@googlegroups.com<MercuryQTP%2Bunsu...@googlegroups.com>
Reply all
Reply to author
Forward
0 new messages