Micro Focus QTP (UFT) Forums
Action Parameterization Issue - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Action Parameterization Issue (/Thread-Action-Parameterization-Issue)



Action Parameterization Issue - Slothman - 10-29-2020

Background: I'm a complete beginner with automated testing. I'm a Business/Testing Analyst that hasn't done a ton of programming since college 18 years ago. However, I have written quite a few EXCEL VBA macros. I've been doing manual testing for 16 years.

I'm currently going through a Udemy Course on UFT, and am learning quite a bit, but sometimes even though I've copied the code verbatim from the course instructor, I am getting errors.


Here is one such issue I'm having today with Action Parameterization.

Looks pretty basic, but I'm getting this error:

You specified more parameters in your RunAction statement than the number of parameters defined for the action.
Line (8): "RunAction "Copy of Action1", oneIteration, a, b, c".


a and b have been set up in properties as input parameters (number, default 0)
c has been set up in properties as an output parameter (number)

I'm running UFT version 14.03 Build 3745


Here is the exact code:

Action:
------------------------------------------------------------
a=10
b=20

RunAction "Copy of Action1", oneIteration, a, b, c

msgbox c

---------------------------------------------------------------


Copy of Action 1:
----------------------------------------------------------------
parameter("c") = parameter("a") + parameter("b")
----------------------------------------------------------------'


RE: Action Parameterization Issue - Ankur - 10-31-2020

Check if these parameters are defined in the required action - "Copy of Action1"

By the way, this is a basic thing and your instructor should have helped you with it.