How to setText in a Field to a Variable's Value?

I have a variable called “TotalCosts” that has a numeric value of the sum of other variables - let’s say its value is 800. How would I make a manual-entry UI field “CostCalculation” have TotalCosts’ value in it so on the UI it’d be

CostCalculation: 800

From the threads I’ve searched through, either I’m looking up the wrong thing or I’m not quite understanding the syntax (or if I’m going about it all wrong).

I’ve tried the straightforward approaches of

WebUI.setText(findTestObject(‘CostCalculation’), TotalCosts)
WebUI.sendKeys(findTestObject(‘CostCalculation’), TotalCosts)

which definitely do not work. Any suggestions?

The syntax looks good to me

`WebUI.sendKeys(findTestObject('Insider_Program/Field_Phone_Number'), phonestring)`

Are you sure the selector for “CostCalculation” is correct?

Doh. Suggestion to self: Set variables up in the right test case. Really new to this and I guess I needed to take a break from it for a little while :crazy_face: thanks @manpreet.mukkar!

@hhomberg It happens