Adding an additional string to Global Variable


with GetText I fill a Global Variable with something like: CHF -10.93
Now I need additional quotes around it: “CHF -10.93”

I tried it with a map, but withount success:


see the result from printline:
first line is result from getText
second line is my try with the map:

any other ideas how to add the quotes to the global variable?

Please show us how your code look like, how does it set a value CHF -10.93 to the GlobalVariable.

with pleasure:
GlobalVariable.cached_discount = WebUI.getText(findTestObject('page_checkout/_page_confirmation/confirmation_discount'))

String text = WebUI.getText(findTestObject('page_checkout/_page_confirmation/confirmation_discount'))
GlobalVariable.cached_discount = '\"' + text + '\"'

Is it what you want?

This looks quite good:

    2020-05-19 10:19:48.330 DEBUG oe_successfully_places_an_order_as_guest - 13: text = getText(findTestObject("page_checkout/_page_confirmation/confirmation_discount"))
2020-05-19 10:19:48.656 DEBUG oe_successfully_places_an_order_as_guest - 14: cached_discount = """ + text + """
2020-05-19 10:19:48.657 DEBUG oe_successfully_places_an_order_as_guest - 15: println(cached_discount)
"CHF -10.93"