I write a function.. which iam pasting here. I define the parameters under prperties on function script as well on call function script. i tried to exec this function by changing many times. finally i give up..
Every time when i execute a call iam getting "undefined funtion called ibslogin"
There any one helping me out..
ibslogin("AMAT"); # calling ibslogin function by passing AMAT as a parameter.
#HERE IS THE FUNTION.
function ibslogin(in selectdbconn)
set_window("Please Login_0", 1);
set_window ("Please Login_0", 2);
set_window("Browser Main Window_1", 2);
You need to modify your if statements. In WinRunner a single = is the assignment, where a double = (==) is the comparison.
An if statement should look like:
Additionally - if you look at your GUI_load TSL statement - you are only using one \ to define the path to the file. In WinRunner, you need to use \\ in defining the path when it includes a directory seperator. This is just how WinRunner looks at items in the string. the \ cahracter has the ability to define special characters like the newline \n and return \r and others, so if you really want the character to be interpreted as "\" - you are going to have to use "\\" in your sting.
[This message has been edited by awdavis (edited 04-06-2001).]
Insanity: doing the same thing over and over again and expecting different results
You can solve your "undefined funtion called ibslogin" error calling the function after the function itself. This way you don't need to declare it as public.
Another way is to put the function in a "compiled module" script (you set a script as compiled module in their properties) and then writing:
You can put many functions in a compiled module and use it as a library.
Hope this help.
You should, as a good practice have at least one 'return();' statement in your function.
Also, the statement:
needs another slash (/) in front of 'amfs'.
Recommendation: for testing your function in order to get it to work - call it a static function such as (you really don't need the keyword static):
static function ibslogin(in selectdbconn)
# test it:
status = ibslogin( "mydb...");
Then call it from within this script file just to test it out. When it works, comment out or take the driver call out and call it a public function and you should be good to go. Make sure the script file containing the funcion is in your search path!
[This message has been edited by jpensyl (edited 04-10-2001).]