As per my knowledge and Object can't be stored in ARRAY.

Better solution would be in library file declare the variable as PUBLIC and
then set the website link
you can use it any where in the script.

~Chethana
On Fri, May 17, 2013 at 2:23 AM, Jon <[email protected]> wrote:

> Is it possible to make a website link an object, and use that object in an
> array?
>
> I've already made a test script that runs through 20+ hardcoded links, I
> want to streamline this a little so that updates to the meat of the script
> are done once instead of 20+ times. I was hoping to use an array but I
> can't see to get anything going (i've never used an array before).
>
> This seems to work, but only halfway to where i want, and really no better
> than my current method as I would still have to have 20+ copies of the code:
>
> Dim linkOne, linkTwo
>> Set linkOne = Browser(...).Page(...).Link(...)
>> Set linkTwo = Browser(...).Page(...).Link(...)
>> If oLinks.Exist Then
>>     msgbox "yes"
>> Else
>>     msgbox "no"
>> End If
>
>
> how would i do this in an array?
>
>
> I've tried, and failed, to add in:
>
> Dim myArray(1)
>> myArray(0) = linkOne
>> myArray(1) = linkTwo
>> If myArray(1).Exist Then
>>     msgbox "yes"
>> Else
>>     msgbox "no"
>> End If
>
>
>
>
> Any help is appreciated, Thanks.
>
> --
> --
> 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/groups/opt_out.
>
>
>

-- 
-- 
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/groups/opt_out.


Reply via email to