Use Set for object, it should work.
Sent on my BlackBerry® from Vodafone -----Original Message----- From: Chethana KP <[email protected]> Sender: [email protected] Date: Fri, 17 May 2013 12:07:49 To: <[email protected]> Reply-To: [email protected] Cc: <[email protected]>; <[email protected]> Subject: Re: Objects in an Array yes i agree .. we can store anything But not the Object reference variable. On Fri, May 17, 2013 at 12:11 PM, <[email protected]> wrote: > ** > You can store anything in Array. > > Arg(0)=5 > Arg(1)=true > Arg(2)=“QTP" > Set Arg(3)=Browser(“creationtime:=) > > Sent on my BlackBerry® from Vodafone > ------------------------------ > *From: *Chethana KP <[email protected]> > *Sender: *[email protected] > *Date: *Fri, 17 May 2013 09:54:53 +0530 > *To: *<[email protected]>; <[email protected]> > *ReplyTo: *[email protected] > *Subject: *Re: Objects in an Array > > > 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. > > > > -- > -- > 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. -- -- 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.
