Skip to content

Commit e713ed4

Browse files
committed
Moved run_on_failure_only_once test out into run_on_failure.txt
1 parent 1e4d418 commit e713ed4

File tree

2 files changed

+21
-31
lines changed

2 files changed

+21
-31
lines changed

test/acceptance/keywords/run_on_failure.txt

100644100755
Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,34 @@
11
*** Settings ***
22
Suite Setup Run Keywords Go To Front Page Set Info Loglevel
33
Suite Teardown Set Debug Loglevel
4-
Test Teardown Register Keyword to Run on Failure Nothing
54
Resource ../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+
1232
Log 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

test/acceptance/keywords/run_on_failure_only_once.txt

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)