2017-03-15 17 views

回答

3

應該很容易使用可以實現:

${timestamp} = Get Current Date result_format=%Y%m%d-%H%M 
${filename} = Set Variable Put-whatever-you-want-here-eg-${timestamp}.xls 
Save Excel ${filename} 

只要確保你在你的腳本中引用的DateTime庫。

+0

嗨,我已經實現了你提到的步驟,它給了我一個錯誤,說「無效模式('w + b')或文件名:」u'E:\\ RobotFramework \\ Comparision \\ Resultfiles \\ 2017 -03-16 04:14:06.288.xls' – Brother85

+0

@ Brother85的確如此,如果您想要獲得與文件名兼容的字符,您仍然必須指定結果格式。嘗試實際答案中的變化。 – Lubos

相關問題