How to Write user defined functions?

Answer Posted / jinsha

First we have to define the function and then we have to
call the function.
Eg:
to define a function
integer biger(integer a,integer b)
if (a>b)
return a
else
return b
save the file with .inc extension as x.inc
Now to call a function
Use x.inc
test case userfn1()
int a=10
int b=5
int c=biger(a,b)
print("{c}is greater")

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi All, An newbiee to silk test tool. I wanted to write a function which checks the browser type installed in the local machine & then based on the browser type test case should run. I tried little bit writing the function : Void Func_ValidateBrowserType() Window myWin myWin = Browser.GetRealBrowser () print (myWin) Any help please.. Thanks, V

2036


What is 4test?

592


How to add objects of other pages to a test frame?

600


What are testplan attributes?

583


How to create group and sub group descriptions in a testplan?

577






What is the dom browser extension?

581


How to test your defaultbasestate?

599


Can silktest run on mac?

637


Want to lear from basic about silktest and how to write scripts. Please let me know if you know any website

2612


What is stored in a test frame?

589


How to run a test case from a test script file?

591


What is silktest project?

552


What is the syntax of ui object identifier used by dom extension?

587


What is a silktest testplan?

612


What is defaultbasestate?

589