Run Keyword And Ignore Error是非常好用的keyword,讓你來做某些事情的反向判斷。
# 登入頁
Go To ${LOGIN_PAGE}
# 錯誤預防, 忽略alert dialog
${result} ${msg} Run Keyword And Ignore Error Alert Should Be Present
# 如果alert出現, 再試一次'goto login page'
Run Keyword If '${result}'=='PASS' Go To ${LOGIN_PAGE}
Reference: 丫兩的筆記本 - Wait Something Keywords
沒有留言:
張貼留言