Arun: I am happy it helped. Parke
On Wed, Mar 25, 2015 at 1:27 AM, Arun Kumar <[email protected]> wrote: > Hi Parke, > > I was facing the same problem and your solution worked. Thank you! > > On Tuesday, 31 July 2012 00:16:27 UTC+5:30, Parke 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 Groups > "QTP - HP Quick Test Professional - Automated Software Testing" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- 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 Groups "QTP - HP Quick Test Professional - Automated Software Testing" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
