Read text to a certain point/till special character is reached

Hi,

I am using the readText function to read a certain string from the SUT.
It looks something like this: changed: 2935, new: 0

Now I would like to read the string before the comma ie changed: 2935 and since the changed count varies from one test to another I cannot use the put characters x to y.

Thanks in advance

Please note that these forums are intended for community discussions and aren't an official channel for support. Support issues should be submitted via email to support_at_eggplant.io.

You'll need to parse the value returned by ReadText(). The easiest way to extract what you want in this case is to use the "delmited by" function:
put the first word delimited by comma of readtext(x1,y1,x2,y2) into  changed
that should put "changed:2935" into the variable changed. You could then split again at the colon to get just the number:
put the second word delimited by colon of changed into changedCount
put changedCount // outputs 2935



Thank you.