0
votes
*** keywords ***
Do something on ${var1} and ${var2}
    Log ${var1} 
    Log ${var2}

*** Test Cases ***
Testing
    ${id1}  Set Variable    variable1
    ${id2}  Set Variable    variable2
    Do something on ${id1} and ${id2}

When we run the above robot testcase the logs display ${id1} and ${id2} as variables in the keyword.

KEYWORD ${id1} = BuiltIn . Set Variable variable1
KEYWORD ${id2} = BuiltIn . Set Variable variable2
KEYWORD Do something on ${id1} and ${id2}

Is it possible in robot to have the log print the value of the variable instead of the variable itself in such use case, where the embedded arguments are variables?

For example can we have log print

KEYWORD Do something on variable1 and variable2
1

1 Answers

-1
votes

Sometimes its worthy to read the official documentation.

Log To Console - https://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Log%20To%20Console

Also, you have Log ${var1} and it should be Log ${var1} (more than one space acts as separator)