18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
sahi script parsed incorrectly for _setSelected function
Hi,
I am using Sahi Pro v3.6 with Firefox 6.0.2
I have a really simple script:
1 _click(_submit("Edit Risk Conditions"));
2 _click(_cell("Risk Condition Name:"));
3 _setSelected(_select(/risk_tran_condition_name/), "PAN");
4 _click(_submit("Apply"));
5 _click(_submit("Done"));
When this is run using the Sahi Controller the _setSelected function is not executed. It looks as if it is completely ignored. I noticed that the parsed script is as follows:
_sahi.schedule("_sahi._click(_sahi._submit(\"Edit Risk Conditions\"));", "C:\\sahi_portal\\Scripts\\temp.sah&n=1");
_sahi.schedule("_sahi._click(_sahi._cell(\"Risk Condition Name:\"));", "C:\\sahi_portal\\Scripts\\temp.sah&n=2");
_sahi._setSelected(_sahi._select(/risk_tran_condition_name/), "PAN");
_sahi.schedule("_sahi._click(_sahi._submit(\"Apply\"));", "C:\\sahi_portal\\Scripts\\temp.sah&n=4");
_sahi.schedule("_sahi._click(_sahi._submit(\"Done\"));", "C:\\sahi_portal\\Scripts\\temp.sah&n=5");
An idea what is causing this?
Thanks.
I am using Sahi Pro v3.6 with Firefox 6.0.2
I have a really simple script:
1 _click(_submit("Edit Risk Conditions"));
2 _click(_cell("Risk Condition Name:"));
3 _setSelected(_select(/risk_tran_condition_name/), "PAN");
4 _click(_submit("Apply"));
5 _click(_submit("Done"));
When this is run using the Sahi Controller the _setSelected function is not executed. It looks as if it is completely ignored. I noticed that the parsed script is as follows:
_sahi.schedule("_sahi._click(_sahi._submit(\"Edit Risk Conditions\"));", "C:\\sahi_portal\\Scripts\\temp.sah&n=1");
_sahi.schedule("_sahi._click(_sahi._cell(\"Risk Condition Name:\"));", "C:\\sahi_portal\\Scripts\\temp.sah&n=2");
_sahi._setSelected(_sahi._select(/risk_tran_condition_name/), "PAN");
_sahi.schedule("_sahi._click(_sahi._submit(\"Apply\"));", "C:\\sahi_portal\\Scripts\\temp.sah&n=4");
_sahi.schedule("_sahi._click(_sahi._submit(\"Done\"));", "C:\\sahi_portal\\Scripts\\temp.sah&n=5");
An idea what is causing this?
Thanks.
This discussion has been closed.
Comments
Thanks for pointing that out. Confirmed that it is a bug. The _condition in risk_tran_condition_name is tripping the parser. Till we fix it, please use:
_setSelected(_select(/risk_tran[_]condition_name/), "PAN");
Thanks,
Narayan
That work around is perfect. I appreciate the help and quick response.
Cheers,
Paul