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