File tree Expand file tree Collapse file tree 2 files changed +21
-31
lines changed Expand file tree Collapse file tree 2 files changed +21
-31
lines changed Original file line number Diff line number Diff line change 11*** Settings ***
22Suite Setup Run Keywords Go To Front Page Set Info Loglevel
33Suite Teardown Set Debug Loglevel
4- Test Teardown Register Keyword to Run on Failure Nothing
54Resource ../resource.txt
65
76*** Variables ***
87${PAGE TITLE} (root)/index.html
98${FAILURE MESSAGE} Page should not have contained text 'needle'
9+ ${old order}
10+
11+ *** Keywords ***
12+ On Fail
13+ ${count}= Evaluate ${ON FAIL COUNT} + 1
14+ Set Test Variable ${ON FAIL COUNT} ${count}
15+
16+ Prefer Custom Keywords
17+ Import Library CustomSeleniumKeywords
18+ ${old order}= Set Library Search Order CustomSeleniumKeywords
19+
20+ Restore Old Search Order
21+ Set Library Search Order ${old order}
1022
1123*** Test Cases ***
24+ Run On Failure Keyword Only Called Once
25+ [Setup] Prefer Custom Keywords
26+ Set Test Variable ${ON FAIL COUNT} ${0}
27+ Register Keyword To Run On Failure On Fail
28+ Run Keyword And Ignore Error Custom Selenium Keyword
29+ Should Be Equal ${ON FAIL COUNT} ${1} On Failure Keyword called ${ON FAIL COUNT} times.
30+ [Teardown] Register Keyword to Run On Failure Nothing
31+
1232Log Title On Failure
1333 [Documentation] LOG 1 Log Title will be run on failure. LOG 2:2 NONE LOG 3.1.1:1 ${PAGE TITLE} LOG 3.1:3 NONE
1434 Register Keyword to Run on Failure Log Title
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments