1

I have a variable with value "x: 647, y: 1174" and I would like to parse them into two separate variables: ${x} = 647 and ${y} = 1174

Is this possible within Robot Framework?

1 Answer 1

3

String library will help you.

${var}    Set Variable    x: 647, y: 1174
${x}    Fetch From Left    ${var}    ,    # now x should be "x: 674"
${x}    Fetch From Right    ${x}    ${SPACE}    # and now it should be "674"
${y}    Fetch From Right    ${var}    y:${SPACE}

Or write a python function that does the same with regex for example.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.