【发布时间】:2016-04-06 12:47:18
【问题描述】:
我是 Robot Framework 的新手,在运行下面的变量 ${month} 时返回“无”。
我要做的是将月份作为数字转换为文本中的相关月份,例如1 月至 1 月,4 月至 4 月等。
我相信这将是一个简单的修复,但我不知道它是什么......任何帮助将不胜感激。
${month int} Get Current Date result_format=%m
Log To Console month int=${month int}
${month} = Set Variable If '${month int}' >= 13 Fail
${month} = Set Variable If '${month int}' == '01' January
${month} = Set Variable If '${month int}' == '02' Febuary
${month} = Set Variable If '${month int}' == '03' March
${month} = Set Variable If '${month int}' == '04' April
${month} = Set Variable If '${month int}' == '05' May
${month} = Set Variable If '${month int}' == '06' June
${month} = Set Variable If '${month int}' == '07' July
${month} = Set Variable If '${month int}' == '08' August
${month} = Set Variable If '${month int}' == '09' September
${month} = Set Variable If '${month int}' == '10' October
${month} = Set Variable If '${month int}' == '11' November
${month} = Set Variable If '${month int}' == '12' December
Log To Console month string=${month}
【问题讨论】:
标签: robotframework