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>