I have used ${SUITE NAME}
tag. It is giving the Suite
name along with the path as
"Robotframework.TestSuites.foldername.testsuitename"
. I need suite name only. How can I get that?
${the name}= Set Variable ${SUITE NAME}
# split the output on every . character
${the name}= Split String ${the name} separator=.
# get the last member of the split
${the name}= Set Variable @{the name}[-1]
Log To Console ${the name} # prints testsuitename in your example
P.S. It'll get nasty if you use dots in your suite names.
You can do that in-line as well.
${SUITE NAME.rsplit('.')[0]}
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