switch statement on assert element
Hello,
I am trying to make a switch statement on returned text for the first time. But I am doing something wrong. Can anyone guide me to the right path ?
function test ()
{
AssertSum = Aliases["Kernel"]["MainForm"]["CheckControl"]["zcheckTop"]["lblSum"]["Text"];
switch (AssertSum)
{
case AssertSum("56,22"):
SumButtonClick()
PaymentWindowClickCash()
PaymentWindowClickPay()
PaymentWindowClickFinalizePayment()
break;
case AssertSum("0,91"):
SumButtonClick()
PaymentWindowClickCash()
PaymentWindowClickPay()
PaymentWindowClickFinalizePayment()
break;
case AssertSum("40,63"):
SumButtonClick()
PaymentWindowClickCash()
PaymentWindowClickPay()
PaymentWindowClickFinalizePayment()
break;
default:
Log["Error"]("There is no sum like this")
break;
}
}
Hello ebarbera ,
Thank you for your response, but I sorted this out just through if... else for now.