use following line. It should work.
E.g.  Window("Text:=Test").Dialog("Name:=A.*").WinButton("Text:=OK").Click

Use regular expression for the property which is changing. like here Name.

~Vaishali
On Thu, Dec 8, 2011 at 10:41 PM, ann hoang <[email protected]> wrote:

>   Hi Vaishali,
>
> Thanks for your input.. I did try to use regular expression  but it
> didn't work. After I record and
> In the obj Repositories: that dialog is showed
>
> Object Properties:
> Name: A_1
> Class: Dialog
> Repository: Local
>
> Test Object details:
> Description Properties:
> text: A
> native class: #32770
> is owned window: True
> is child window: False
> Oridinal Identifier:
> Type, Value: Location, 0
>
>
> Any
>
> --- On *Thu, 12/8/11, Vaishali Chaudhari <[email protected]>*wrote:
>
>
> From: Vaishali Chaudhari <[email protected]>
> Subject: Re: Problem with window name
> To: [email protected]
> Cc: [email protected]
> Date: Thursday, December 8, 2011, 8:10 AM
>
>
>  Hello Any,
>
>
> This condition can be handle using Descriptive programming and regular
> expression.
>
> E.g. Window("Text:=Test").Dialog("Text:=A.*").WinButton("Text:=OK").Click
> ~Vaishali
>
> On Wed, Dec 7, 2011 at 10:50 PM, ann hoang 
> <[email protected]<http://us.mc1616.mail.yahoo.com/mc/[email protected]>
> > wrote:
>
>
> hi All,
>
> Please help me with this problem..
> I have 10 window dialogs that were popped up at the same time with same
> name such as: Window("Test").Dialog("A").Activate
> Window("Test").Dialog("A").WinButton("OK").Click
>
> but after recorded it and in the Repositories is showed under TestObjects:
> Test
>       A
>       A_4
>       A_5
>       A_10
>      .A_1
>  .......
> ........
>
> how do I modify it to generic so I can click on that ok button in that
> window.
>
> Notes: problem that every time I want to click on 'ok' in that window so I
> don't know the number index after underscore is on top first..Thanks
>
> Any
>  --
> 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]<http://us.mc1616.mail.yahoo.com/mc/[email protected]>
> To unsubscribe from this group, send email to
> [email protected]<http://us.mc1616.mail.yahoo.com/mc/compose?to=mercuryqtp%[email protected]>
> 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 [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
>
>  --
> 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
>

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