Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Passing a value as an argument in function
#1
Solved: 10 Years, 9 Months, 2 Weeks ago
Hi All,
I am new to qtp and implemented one functionality as like below
Function:

Code:
Function loginpage(m)
Dialog("Login").WinEdit("Agent Name:").Set m
Dialog("Login").WinEdit("Password:").SetSecure "4a8a8fcc491dd5ddab8dcf1970f281492644fe42"
End Function

Script:
Code:
Call loginpage(filight)
Dialog(“Login”).WinButton(“Ok”).Click

In the above script I have given a argument “filght” that is “filght is replaced by “m”
My way of thinking:
“Filght” need to be taken as “Agent Name:”

Actual one:

Here it is not taking “filght” in to “Agent Name” field but password field is taking as "mercury"

Thanks in advance
qtpctc
Reply


Messages In This Thread
Passing a value as an argument in function - by qtpctc - 08-18-2009, 05:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Click after CheckProperty to a WebElement passed via Function argument fails naruoga 0 1,030 02-28-2019, 11:46 AM
Last Post: naruoga
  Calling a function in a Test Script from a function library anupam4j 3 5,908 06-26-2015, 12:31 AM
Last Post: babu123
  Part of parameters missing when passing between actions skumar007 1 2,848 10-10-2014, 02:00 AM
Last Post: skumar007
  Action Parameter passing problem Qtpuser1 1 2,721 04-18-2014, 06:23 AM
Last Post: kgovadav
  Getting run error passing a Frame into a user defined function!!! sepgs2004 1 2,718 10-14-2013, 06:37 PM
Last Post: anil2u

Forum Jump:


Users browsing this thread: 2 Guest(s)