這是本文件的舊版!


升級RobotFramework從3.0到3.1.2

升級後的錯誤訊息會類似這樣:

Variable '${phymemory_tabletr_xpath_prefix}' is string, not list or dictionary, and thus accessing item '2' from it is not possible.
原本的語法如下:
${phymemory_tabletr_xpath_prefix} | Set Variable | //table[@class='deviceTable']/tbody/tr
${speed_or_size_locator} | Set Variable | ${phymemory_tabletr_xpath_prefix}[2]/th[8]
Robot的issue有人和我遇到一樣問題,作者提供在index之前加入反斜線的改法:
 ${phymemory_tabletr_xpath_prefix}[2]/th[8] 
改為
 ${phymemory_tabletr_xpath_prefix}\[2]/th[8]
應該是3.1版本的內容: link