From 275a917dbf421b587fa44d57e88af3da63be8e43 Mon Sep 17 00:00:00 2001 From: danfengliu Date: Wed, 13 Feb 2019 14:48:09 +0800 Subject: [PATCH] add Capture Page Screenshot in retry keyword (#6897) Signed-off-by: danfengliu --- tests/resources/Util.robot | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/resources/Util.robot b/tests/resources/Util.robot index f918bf135..84c310678 100644 --- a/tests/resources/Util.robot +++ b/tests/resources/Util.robot @@ -125,10 +125,11 @@ Wait Unitl Command Success Retry Keyword When Error [Arguments] ${keyword} ${element}=${None} ${times}=6 :For ${n} IN RANGE 1 ${times} - \ Log To Console Attampt to ${keyword} ${n} times ... + \ Log To Console Trying ${keyword} ${n} times ... \ ${out} Run Keyword If "${element}"=="${None}" Run Keyword And Ignore Error ${keyword} \ ... ELSE Run Keyword And Ignore Error ${keyword} ${element} \ Log To Console Return value is ${out[0]} \ Exit For Loop If '${out[0]}'=='PASS' - \ Sleep 1 + \ Sleep 2 + Run Keyword If '${out[0]}'=='FAIL' Capture Page Screenshot Should Be Equal As Strings '${out[0]}' 'PASS' \ No newline at end of file