Hi,

I tried by removing the quotes, but still it is returning the object count *
7*. I think, since all the Search buttons are in the same page, its
returning same. I don't know how the visible property for all the Search
button is TRUE even though only 1 Search button is visible at a time.

Regards,
Gajendra

On Tue, Jul 31, 2012 at 12:16 AM, Parke Kuntz <[email protected]> wrote:

> Gajendra:
>
> The objButton("visible").Value = "True" should be
> objButton("visible").Value = True.
> No quotes, it is boolean and not a string.
>
> hth
>
>
> Parke
>
>
> On 7/30/12, Gajendra Jain <[email protected]> wrote:
> > Hi,
> >
> > I have a webpage where we have different tabs. And each tab(ex TabA, TabB
> > etc) has a Search button.
> >
> > On click of tab, different search button is displayed means at any given
> > point of time only one search button is visible.
> >
> > I add the around 7 Search Webbutton to the object repository and noticed
> > only the index is changed but the other properties are similar for all 7
> > webbuttons.
> >
> > I wrote following descriptive programing to check how many objects(Search
> > button) are visible at given time.
> >
> > strButtonName = "Search"
> > Fun_ClickButton(strButtonName)
> >
> >
> > Public Function Fun_ClickButton(strButtonName)
> >     Set objButton = Description.Create
> >     objButton("micclass").value = "WebButton"
> > '    objButton("visible").Value = "True"
> >     objButton("name").Value = strButtonName
> >
> >     Set objButtonCollection = Browser("CreationTime:=0").Page("title:=
> > .*").ChildObjects(objButton)
> >
> >     If objButtonCollection.count  > 0 Then
> >         objButtonCollection(0).click
> >     Else
> >         Reporter.ReportEvent micWarning, "Button", strButtonName & "is
> not
> > displayed"
> >     End If
> > End Function
> > .
> > *Output is 0(zero objects)*
> >
> > if i *comment *the line * objButton("visible").Value = "True"*
> > *Its returning 7*
> >
> > Please let me know how can i get the only one count of Search Button ?
> >
> >
> > Regards
> > Gajendra
> >
> > --
> > 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
> >
>
>
> --
> Parke
> Cell: 770-842-0121
>
> --
> 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