Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to pass 2 arguments to a function
#1
Solved: 11 Years, 4 Months ago
I have created a function for string comaprison in .vbs file
The function looks like this and i am getting the return value
Code:
Public function StringCom(x1,x2)
Dim getvalue
getvalue =StrComp(x1,x2,compare)
StringCom =getvalue
End function

Now i call this function in QTP
Code:
dim x
x1 = "abc"
x2 = "abcdef"
x =Call StringCom (x1, x2)
msgbox x

here x should display the return value from the function

When i run this function in qtp, i get the following error message- Type msimatch StringCom

Can anybody please provide the right code
Reply


Messages In This Thread
How to pass 2 arguments to a function - by Rashmi - 08-13-2008, 06:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calling a function in a Test Script from a function library anupam4j 3 6,127 06-26-2015, 12:31 AM
Last Post: babu123
  PASS/FAIL in QTP badri 3 6,218 12-05-2014, 03:26 AM
Last Post: kiranpol
  how to pass the data frm datatable silpavinod 3 3,969 10-18-2012, 01:54 PM
Last Post: silpavinod
  How to pass all rows from data sheet in a function argument richa07 1 3,071 10-15-2012, 03:06 PM
Last Post: srinath_QTP
  how to pass a numeric value into webedit silpavinod 3 3,867 10-15-2012, 01:57 PM
Last Post: silpavinod

Forum Jump:


Users browsing this thread: 1 Guest(s)