我用过${SUITE NAME}标签.它将Suite名称与路径一起
给出"Robotframework.TestSuites.foldername.testsuitename".我只需要套件名称.我怎么能得到它?
${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
Run Code Online (Sandbox Code Playgroud)
PS如果你在套件名称中使用圆点,它会变得很糟糕.
| 归档时间: |
|
| 查看次数: |
984 次 |
| 最近记录: |