我是Robot Framework的新手,在運行下面的變量$ {month}時會返回'none'。設置變量如果返回無機器人框架
我想要做的是將月份數字轉換爲文本中的相關月份,例如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}
感謝我試過,但不幸的是仍然有「無」。我也嘗試轉換爲字符串,但這並沒有解決。 –