The best place to ask programming/development questions, imo. UPDATE: stackoverflow is 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 a great reference for finding answers.

My Music (Nickleus)

20121218

sahi sah test script - ERROR missing ( before function parameters

i tried running a seemingly well-coded sahi test script, but i only got FAILURE every time i ran it. the log output was simply that my script was missing a left parenthesis somewhere (which wasn't the case i found out):
ERROR
missing ( before function parameters.


here's the sahi code that was failing:
...
view_invoice_specification_list();
...

and here's that function code:
function view_invoice_specification_list(){
    _click(_span("Fakturaspesifikasjon"));
    _assert(_isVisible(_tableHeader("Fakturaspesifikasjon")));
}



in the sahi dashboard i clicked "view parsed script" and saw the following weird output:
function view_invoice_specification_sahi._list(){
...
}

...
view_invoice_specification_sahi._list();
...


the problem turned out to be the use of the word "list" in the function name. i renamed the function name to view_invoice_specification_lst(), and then it worked. it also works if i put an underscore after "list", e.g. view_invoice_specification_list_()

No comments:

Post a Comment