I have an array that my script runs through, at one point I am trying to 
call a function/sub based on which array item is currently being checked. 
However, error's pop up no matter what I've tried so far.
Essentially this is my script:

Dim myArray(1,2)
> Set myArray(0,0) = browser(...).Page(...).Link(...)
> myArray(0,1) = "Section 1"
> myArray(0,2) = functionA    '<- this is the call to an associated function 
> library and if the script were to run right now, the function is called 
> without error
>
 

> Set myArray(1,0) = browser(...).Page(...).Link(...)
> myArray(1,1) = "Section 2"
> myArray(1,2) = functionB    '<- this is the call to an associated function 
> library and if the script were to run right now, the function is called 
> without error
>
 

> Dim counter
> For counter = 0 to 1
>   If myArray(counter,0).exist Then
>      myArray(counter,0).click
>   End If
> Next



This all works just fine.

So, i want to run the 3rd item in each array (the function call) after it 
does the link click and other stuff (which also works but I didn't add here 
for simplicity).

I've tried

>
> vRun = myArray(counter,3)
> vRun


Dim vRun
> Set vRun = myArray(counter,3)
> vRun


Dim vRun
> Set vRun = myArray(counter,3)
> Call vRun 


as well as attempting to add a scripting dictionary
All end in various errors from "type mismatch" to "expected statement"
 

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