2015-11-02 22 views
4

當我執行此關鍵字,'沒有關鍵字與名稱'和'找到錯誤顯示。如何解決此錯誤「沒有關鍵字與名稱」和「找到」

測試此關鍵字

[arguments] ${YearDiff} ${MonthDiff} 

Run Keyword If ${YearDiff}>=0 and ${MonthDiff}>=0 Click Element id=Left_Calendar_Icon 

Run Keyword If ${YearDiff}<=0 and ${MonthDiff}<=0 Click Element id=Right_Calendar_Icon 

糾正我,如果我使用了錯誤的語法。

回答

3

您正在使用空格分隔的格式,這意味着機器人使用兩個或更多空格分隔關鍵字。 「和」兩邊有兩個空格,所以機器人認爲「和」是關鍵字。整個表達式需要放在測試用例表的單個單元格中。

的解決方案是穿上的「和」每一側只有一個空間:

Run Keyword If ${YearDiff}>=0 and ${MonthDiff}>=0 Click Element id=Left_Calendar_Icon 
相關問題