I would like to store ${Username}
value in an output file:
E.g. If ${Username}
equals 0401190926729000
, this value will be stored in a file.
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}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With