Gajendra:
Change the last function to:
Function CountNumberWeblist(br,pg)
Dim oDesc
Set oDesc = Description.Create()
oDesc("micclass").value = "WebList"
print "looking at page " & pg
Set webLists =
Browser("name:="&br).Page("title:="&pg).ChildObjects(oDesc)
print "number of weblists = " & webLists.count & ", and the names are
below:"
For i = 0 to webLists.count - 1
print webLists(i).GetROProperty("name") & ": the select type =
" &
webLists(i).GetROProperty("select type") &": multiple = " &
webLists(i).GetROProperty("multiple")
Next
print vbcr
End Function
Does the last print statement provide information that you need? A
zero multiple should mean false and a one multiple should mean true.
On 8/15/12, Parke Kuntz <[email protected]> wrote:
> Gajendra:
>
> You can run the two functions and determine in where the name occurs.
> If the name shows up in the weblist group, then you will need to find
> out if it is a multiple.
> I do not know if the source index will be of any assistance or not.
> (probably not)
>
> Does the property, select type, have a value of Extended Selection for
> the multiple? If yes, then that would solve the multiple problem.
>
>
> Parke
>
> Function CountNumberWebEdits(br,pg)
> Dim oDesc
> Set oDesc = Description.Create()
> oDesc("micclass").value = "WebEdit"
> print "looking at page " & pg
> Set webedits =
> Browser("name:="&br).Page("title:="&pg).ChildObjects(oDesc)
> print "number of webedits = " & webedits.count & ", and the names are
> below:"
>
> For i = 0 to webedits.count - 1
> print "name = " & webedits(i).GetROProperty("name") & ": the
> source
> index = " & webedits(i).GetROProperty("source_index")
> Next
> print vbcr
> End Function
>
> Function CountNumberWebLists(br,pg)
> Dim oDesc
> Set oDesc = Description.Create()
> oDesc("micclass").value = "WebList"
> print "looking at page " & pg
> Set weblists =
> Browser("name:="&br).Page("title:="&pg).ChildObjects(oDesc)
> print "number of weblists = " & weblists.count & ", and the names are
> below:"
>
> For i = 0 to weblists.count - 1
> print "name = " & weblists(i).GetROProperty("name") & ": the
> source
> index = " & weblists(i).GetROProperty("source_index")
> Next
> print vbcr
> End Function
>
>
> On 8/9/12, Gajendra Jain <[email protected]> wrote:
>> Hi,
>>
>> I have a scenario where the object has to be changed from Webedit to
>> Weblist or Weblist to Multiselect. but the common thing is the LABEL
>> attached to it.
>>
>> Is there any way where i can find out which object is present(Webedit or
>> weblist or multiselect) next to the LABEL at the Run time?
>>
>> 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