switch statement on assert element
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;
}
}
Solved! Go to Solution.
- Labels:
-
Desktop Testing
-
Script Tests
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @DainiusA -
What is the error you are receiving? Or how is this not working in the expected way?
Thanks,
Emma
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @ebarbera ,
Thank you for your response, but I sorted this out just through if... else for now.
