The best place to *find* answers to programming/development questions, imo, however it's the *worst* place to *ask* questions (if your first question/comment doesn't get any up-rating/response, then u can't ask anymore questions--ridiculously unrealistic), but again, a great reference for *finding* answers.

My Music (Nickleus)

20130312

[SOLVED] sahi - ERROR missing ( before function parameters

i was sahi testing the following function:

function do_must_change_password($invalid_security_policy_password, $valid_security_policy_password) {
    _setValue(_password("changePwForm:currentpassword"), $invalid_security_policy_password);
    _setValue(_password("changePwForm:newpassword"), $valid_security_policy_password);

    _setValue(_password("changePwForm:confirmnewpassword"), $valid_security_policy_password);
    _click(_button("changePwForm:changePwBtn"));
}


but sahi was throwing this error on the line highlighted in red:
ERROR
missing ( before function parameters.


i found out that you can't end a sahi function name with _password, so i had to change the function name to:
function do_must_change_pwd(...

and then it worked :)

i've noticed that this also applies to function names ending in:
_list
_file

UPDATE: it looks like this might be the list of function name restrictions:
sahi/config/normal_functions.txt

No comments:

Post a Comment