Highlighted
Super Contributor.
Super Contributor.
980 views

Parameter "Named Argument not found" error

Jump to solution

I've been chasing this through the UFT User Manual, online searches, et cetera, but have not found how to fix the problem. So I post it here.

In a new test solution, I have actions with VBScript code
(Not all script lines are included here, just the core lines to show the problem)
Dim TargetServers
TargetServers = Browser("Tests").Page("Tests").WebList("Servers").GetROProperty("select")
Environment.Value("TargetServers")=TargetServers
Parameter("pvTargetServers") = TargetServers
RunAction "CheckBanner", oneIteration, Parameter("pvTargetServers")

The Environment.Value is later used in other Actions, but not here.
I have TargetServers and Environment.Value("TargetServers") on a watch, and stepping through the test in the debugger, I see the proper values going into those variables.

The run crashes at Parameter("pvTargetServers") = TargetServers
Error: "Named Argument not found" and then quotes the entire line where it crashed

Any suggestions to this guy who is new to UFT & ALM ?

0 Likes
1 Solution

Accepted Solutions
Highlighted
Honored Contributor.
Honored Contributor.

Re: Parameter "Named Argument not found" error

Jump to solution

I have come across this issue a few times and this happened when the parameter was not defined. 

Check the action, input parameters or output parameters to see if this parameter is in the list. 

GoScriptLESS, Create test in seconds using UFT. View Demo and more details at scriptlessautomation.com 

View solution in original post

4 Replies
Highlighted
Honored Contributor.
Honored Contributor.

Re: Parameter "Named Argument not found" error

Jump to solution

I have come across this issue a few times and this happened when the parameter was not defined. 

Check the action, input parameters or output parameters to see if this parameter is in the list. 

GoScriptLESS, Create test in seconds using UFT. View Demo and more details at scriptlessautomation.com 

View solution in original post

Highlighted
Super Contributor.
Super Contributor.

Re: Parameter "Named Argument not found" error

Jump to solution

GoScriptless1,
Thank you for the reply.

I have tried to create input parameters and output parameters but the steps listed in the User Manual don't work for me, and I can't figure it out.

Does anyone have a how to doc/url that describes define / create / add parameters to Actions?
Do I need to define parameters for each Action seperately, or is there a way to define them "globally" ?

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: Parameter "Named Argument not found" error

Jump to solution

GoScriptless1 was right.
I went back into the Test Flow, and (this time) was able to add an Input Parameter.

The script ran past the Parameter( ) line.
Back to debugging!

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: Parameter "Named Argument not found" error

Jump to solution

Each Action needs the parameters defined.
Under View --> Test Flow a dialog appears (on the right wide of the UFT window)
The middle tab is Parameters
Click the plus sign (Add) and type the parameter name
Choose the parameter type {string, integer, boolean . . . }
Do a File --> Save All . . .
Repeat for each Action that uses Parameters

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.