Sample-Retry Keyword

Setting Value
Library Collections
Variable Value
${ELSE} 1==1
Test Case Action Arguments
Test Retry Keyword @{check_result} Run Keyword And Ignore Error Retry Keyword 5s
... 2s Sleep And Fail
Should Be Equal As Strings @{check_result}[0] FAIL
@{result} Retry Keyword 5s 2s
... Fail At First Time  - Return Scala Var test
@{result} Retry Keyword 5s 2s
... Fail At First Time  - Return List Var test1 test2
Keyword Action Arguments
Sleep And Fail Sleep 5s
Fail
Fail At First Time - Return Scala Var [Arguments] ${input}
${return} Set Variable ${input}
[Return] ${return}
Fail At First Time - Return List Var [Arguments] @{input}
@{return} Create List @{input}
[Return] @{return}
Retry Keyword [Arguments] ${timeout} ${interval} ${keyword_name}
... @{arguments}
${result} Wait Until Keyword Succeeds ${timeout} ${interval}
... ${keyword_name} @{arguments}
${check_result} Is An Array Variable ${result}
${tran_keyword_name} Set Variable If '${check_result}'!='FALSE' Convert To List
... ${ELSE} Create List
@{return_result} Run Keyword ${tran_keyword_name} ${result}
[Return] @{return_result}
Is An Array Variable [Arguments] ${variable}=${EMPTY}
[Documentation] Confirm the ${variable}'s content whether is a array var or not.
@{check_result} Run Keyword And Ignore Error Should Be Equal ${variable}
... ${None}
${variable} Set Variable If '@{check_result}[0]'=='PASS' ${EMPTY}
... ${ELSE} ${variable}
@{array} Convert To List ${variable}
@{check_result} Run Keyword And Ignore Error Should Be Empty ${variable}
${prefix} Set Variable If '@{check_result}[0]'=='PASS' ${EMPTY}
... ${ELSE} @{array}[0]
@{check_result} Run Keyword And Ignore Error Should Start With ${variable}
... ${prefix}
${result} Set Variable If '@{check_result}[0]'=='PASS' FALSE
... ${ELSE} TRUE
[Return] ${result}