The issue is that a dictionary object can't be used in an array (or at 
least I can't seem to get it to work). So in another thread I was directed 
to using an array. It now seems like I need to use a multi-dimensional 
array, but that has about exploded my mind.

So what my script does: 

   1. Goes through a list of predefined links and checks for their existence
   2. if the link exists, it performs a test with that link.
   3. If the link doesn't exist, reporter tells which link didn't exist
   

The links may change or be removed (and there's around 60 links elsewhere 
on the page that I don't want to test), so I'm not sure "find all links" is 
a valid option, thus the predefined list. I want to know when they have 
changed/been removed.

If you have an example of how I would do this using Dictionary object I'd 
be interested in that. Or how to use multi-dimensional arrays with what I 
already have going on (as I'm an array and scripting newbie)

Dim myArray(1)
> Set myArray(0)=Browser("...").Page("...").Link("A")
> Set myArray(1)=Browser("...").Page("...").Link("B")
> Dim Counter
> For Counter = 0 to 1
> If myArray(counter).Exist Then
> Reporter.ReportEvent micPass, "Link ", "Exists"
> Else
> Reporter.ReportEvent micFail, "Link ", "does not exist"
> End If
> Next


setup for a MD Array would be?:

Dim myArray(1,1)
> Set myArray(0,0)=Browser("...").Page("...").Link("A")
> Set myArray(0,1)=Browser("...").Page("...").Link("B")
> Set myArray(1,0)= "A"
> Set myArray(1,1)= "B"




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