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