Gajendra
Look for offsetheight property , it is always >0 or >20 or >30 depends on
object height

use below code to find the offsetheight  when object is not visible
Msgbox b,p,f.webimage("img1").object.offsetheight

then make actions to make the object visible then agin run above code .
that gives data , ho to proceed further

Regards,
Kishor

On Mon, Jul 30, 2012 at 6:53 PM, 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
>

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