HELP: Katalon removes parenthesis in my parameter


#1

This is my original code
if (WebUI.verifyElementPresent(findTestObject(‘SmartQ/Create Payment/has_Payment’), 5) == true) {
WebUI.sendKeys(findTestObject(‘SmartQ/Create Payment/input_Payment Amount_1stReserve’),
(reserveAmount1 / 2).toString())}

But after I run it, Katalon changes the syntax to
if (WebUI.verifyElementPresent(findTestObject(‘SmartQ/Create Payment/has_Payment’), 5) == true) {
WebUI.sendKeys(findTestObject(‘SmartQ/Create Payment/input_Payment Amount_1stReserve’),
reserveAmount1 / 2.toString())}


#2

That’s annoying. Try:

If that’s not what you want to see in your script, try adding another pair of parentheses around the whole value expression:

WebUI.sendKeys(
  findTestObject(‘SmartQ/Create Payment/input_Payment Amount_1stReserve’), 
  ((reserveAmount1 / 2).toString())
)