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_()
IT, computer and programming tutorials and tips that i couldnt find anywhere else using google, from my daily work as a Senior Developer of solutions using Java and Linux.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment