I would like to store ${Username}
value in an output file:
E.g. If ${Username}
equals 0401190926729000
, this value will be sto
linux: Run echo "${Username}" > /tmp/foo
Here is an proposal:
*** Settings ***
Library OperatingSystem
Library String
*** test cases ***
write_variable_in_file
${Username} = Generate Random String 1 abc
log to console ${Username}
run keyword if '${Username}' == 'a' write_variable_in_file ${Username}
*** Keywords ***
write_variable_in_file
[Arguments] ${variable}
Create File ${EXECDIR}/file_with_variable.txt ${variable}