and in katalon console after i run the test im getting my universal variable it looks like this : [site_subscription={active=1, corp_offer=0, created_by=1, email_suppress=0, etc.
so now what i want to do is to take each of this value and somehow convert it into an variable object in katalon so later on in other test cases i can compare if variables that im taking from the site are the same as in katalon. I’ve found some simillar topic but im not quite sure if they solve my problem
What EXACTLY does universal.variable contain in JavaScript ?
The reason I ask is, Groovy (and therefore Katalon) has an annoying “feature” that it prints object notation as a series of assignments using "=" where JSON/JavaScript would use ":". I suspect that’s why you get active=1, corp_offer=0, etc.
Essentially, I think you’re looking at a Groovy Map. To pass it around various Test Cases you could store it in a GlobalVariable (perhaps intialized to an empty map - [:])
It looks like this in katalon, those universal variables are rly long, it all depends on which site am i and what type of user i am log-in with on my sites
The principle is, the last one will allow you dig into the object by “named strings” - this will prevent the Katalon IDE from underlining the member as “unknown”.
Just to clarify our terms here, the title of this topic is: “Converting string into an object?”
An instance of a String is an Object…
According to the rest of the OP, what they really want is to assign a String to a variable. I know this is a nitpick, but clearly-defined terms can help immensely in the long run
Not at all. I fully meant to change the title once the problem was nailed - then I took the day off
@wolczoskar I strongly recommend you start a new topic with new/different questions since this one, as it originally stood, has been solved. The reason Brandon is calling us to task is sound: future users want to search for one question and find one clear answer. This topic is starting to wander…