![](/img/trans.png)
[英]Robot Framework: How to distinguish the test case FAIL due to regular test step keyword failure versus verification test step failure
[英]how to skip test step in test case in robot framework
“Run keyword and Ignore Error”每次都會運行並且檢查元素是否可見,並且在可見時,它將執行 Handle_popup
在您的測試用例中添加這兩行,並在您的關鍵字部分添加以下關鍵字。
${PopupVisible}= Run Keyword And Ignore Error Wait_20s_And_Ensure_Visibilty ${XPATH_CLOSE_POPUP_EXPIRE}
Run Keyword If "${PopupVisible}[0]" == "PASS" Handle_Popup ${XPATH_CLOSE_POPUP}
*** Keywords ***
Wait_20s_And_Ensure_Visibilty
[Arguments] ${Element}
Wait Until Element Is Visible ${Element} timeout=20s
Capture Page Screenshot
Handle_Popup
#Here add your commented code which you shown in image
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.