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.
Issue regerding Error
Hi,
I dont know why its showing error. Eventhough i have check with controller each and every line.
my part of the script is,
if (_condition(_radio("ctl00_cphClientBody_rdolstType_0").checked))
{
_assertExists(_select("ctl00\$cphClientBody\$ddlBuyCurrency"));
_setSelected(_select("ctl00\$cphClientBody\$ddlDelInstruction"), "1");
_wait(3000, _isVisible(_select("ctl00\$cphClientBody\$ddlDelInstruction"));
_setSelected(_select("ctl00\$cphClientBody\$ddlSellCurrency"), "15");
_wait(2000, _isVisible(_select("ctl00\$cphClientBody\$ddlDelInstruction")));
_setValue(_textbox("ctl00\$cphClientBody\$txtBuyAmount"), "500");
_assert(_radio("ctl00_cphClientBody_rblDeli_0").checked);
if (_condition(_radio("ctl00_cphClientBody_rblDeli_0").checked))
{
_assertExists(_select("ctl00\$cphClientBody\$ddlDelInstruction")); (\\Syntax Error ; missing)
_setSelected(_select("ctl00\$cphClientBody\$ddlDelInstruction"), "1");
else
_assertExists(_textbox("ctl00\$cphClientBody\$txtMultipleDelivery"));
_assert(_isVisible(_textbox("ctl00\$cphClientBody\$txtMultipleDelivery")));
_setValue(_textbox("ctl00\$cphClientBody\$txtMultipleDelivery"), "2");
}
_setValue(_textbox("ctl00\$cphClientBody\$txtFieldRate"), "500");
_setValue(_textbox("ctl00\$cphClientBody\$txtFieldParty"), "Majestic");
else
_assertExists(_radio("ctl00_cphClientBody_rblAttachment_0"));
_setSelected(_select("ctl00\$cphClientBody\$ddlBuyCurrency"), 1);
_click(_button("OK"));
_setValue(_textbox("ctl00\$cphClientBody\$txtTransactionAmt"), "5000");
}
Pls look at this...
I dont know why its showing error. Eventhough i have check with controller each and every line.
my part of the script is,
if (_condition(_radio("ctl00_cphClientBody_rdolstType_0").checked))
{
_assertExists(_select("ctl00\$cphClientBody\$ddlBuyCurrency"));
_setSelected(_select("ctl00\$cphClientBody\$ddlDelInstruction"), "1");
_wait(3000, _isVisible(_select("ctl00\$cphClientBody\$ddlDelInstruction"));
_setSelected(_select("ctl00\$cphClientBody\$ddlSellCurrency"), "15");
_wait(2000, _isVisible(_select("ctl00\$cphClientBody\$ddlDelInstruction")));
_setValue(_textbox("ctl00\$cphClientBody\$txtBuyAmount"), "500");
_assert(_radio("ctl00_cphClientBody_rblDeli_0").checked);
if (_condition(_radio("ctl00_cphClientBody_rblDeli_0").checked))
{
_assertExists(_select("ctl00\$cphClientBody\$ddlDelInstruction")); (\\Syntax Error ; missing)
_setSelected(_select("ctl00\$cphClientBody\$ddlDelInstruction"), "1");
else
_assertExists(_textbox("ctl00\$cphClientBody\$txtMultipleDelivery"));
_assert(_isVisible(_textbox("ctl00\$cphClientBody\$txtMultipleDelivery")));
_setValue(_textbox("ctl00\$cphClientBody\$txtMultipleDelivery"), "2");
}
_setValue(_textbox("ctl00\$cphClientBody\$txtFieldRate"), "500");
_setValue(_textbox("ctl00\$cphClientBody\$txtFieldParty"), "Majestic");
else
_assertExists(_radio("ctl00_cphClientBody_rblAttachment_0"));
_setSelected(_select("ctl00\$cphClientBody\$ddlBuyCurrency"), 1);
_click(_button("OK"));
_setValue(_textbox("ctl00\$cphClientBody\$txtTransactionAmt"), "5000");
}
Pls look at this...
Comments
The error seems to be due to the misuse if..else condition.
The above mentioned script has errors and i pointed out with comment statement.Please, go through it,
Above script should be in the form of
Please, ensure that the syntax has been followed in if...else condition.
Regards,
Theeran.