Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing array of classes to parameter of action
#1
Solved: 12 Years, 10 Months, 3 Weeks ago
Hello,

Goal: From the qtp main starting file, initialize an array of classes, and pass that array as a parameter to a re-usable action via a parameter.

Problem: I am not able to pass an array of classes to my re-usable action.

I have the main startup file which we will reference as “application_main”.

I have a re-usable action which we will reference as “personal_action”

Inside application_main, we have a call to InvokeApplication, proceeded by a few other declarations.

I am able to initialize my array of classes fine (variable name: “myArray”). I proceed to pass that array as a parameter as follows in my application_main:

RunAction “personal_action”, oneIteration, customParam1, customParam2, myArray

On the personal_action page, I have the ability to edit the parameter properties via Edit->Action->Action Properties. I select the Parameters tab. In it, I am able to define the incoming parameters as:

String, Boolean, Date, Number, Password, Any

Since “array” is not available, I select “Any”.

Upon running, I am prompted with this:

Code:
The type you specified for the ‘myArray’ parameter in your RunAction statement does not match the type defined in the action.

The array is the third parameter being passed, and the third parameter type is “any”.

My Question: Why am I not able to pass an array to an action from the main startup file? Does anyone know of a way to do this?

Any help is appreciated. Thank you.
Reply


Messages In This Thread
Passing array of classes to parameter of action - by nvKy - 06-20-2012, 12:14 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Part of parameters missing when passing between actions skumar007 1 3,404 10-10-2014, 02:00 AM
Last Post: skumar007
  Action Parameter passing problem Qtpuser1 1 3,190 04-18-2014, 06:23 AM
Last Post: kgovadav
  How to convert a single dimension array to two dimensional array venkatesh9032 3 6,304 02-10-2014, 03:07 PM
Last Post: pranikgarg
  Getting run error passing a Frame into a user defined function!!! sepgs2004 1 3,231 10-14-2013, 06:37 PM
Last Post: anil2u
  Parameter bistritapcv 0 2,613 04-02-2013, 09:10 PM
Last Post: bistritapcv

Forum Jump:


Users browsing this thread: 1 Guest(s)