bauxite 0.6.18 → 0.6.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -21
- data/README.md +293 -293
- data/Rakefile +128 -128
- data/bin/bauxite +27 -27
- data/doc/Bauxite.html +6 -9
- data/doc/Bauxite/Action.html +298 -315
- data/doc/Bauxite/ActionModule.html +23 -26
- data/doc/Bauxite/Application.html +36 -38
- data/doc/Bauxite/Context.html +303 -303
- data/doc/Bauxite/Errors.html +6 -9
- data/doc/Bauxite/Errors/AssertionError.html +6 -9
- data/doc/Bauxite/Errors/FileNotFoundError.html +6 -9
- data/doc/Bauxite/Errors/FormatError.html +6 -9
- data/doc/Bauxite/Loggers.html +6 -9
- data/doc/Bauxite/Loggers/CompositeLogger.html +29 -32
- data/doc/Bauxite/Loggers/EchoLogger.html +10 -13
- data/doc/Bauxite/Loggers/FileLogger.html +25 -28
- data/doc/Bauxite/Loggers/HtmlLogger.html +99 -102
- data/doc/Bauxite/Loggers/NullLogger.html +16 -19
- data/doc/Bauxite/Loggers/ReportLogger.html +43 -46
- data/doc/Bauxite/Loggers/TerminalLogger.html +76 -79
- data/doc/Bauxite/Loggers/XtermLogger.html +28 -31
- data/doc/Bauxite/Parser.html +87 -89
- data/doc/Bauxite/ParserModule.html +19 -22
- data/doc/Bauxite/Selector.html +99 -105
- data/doc/Bauxite/SelectorModule.html +27 -30
- data/doc/README_md.html +117 -103
- data/doc/created.rid +58 -58
- data/doc/fonts.css +167 -167
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +117 -103
- data/doc/js/darkfish.js +32 -11
- data/doc/js/jquery.js +0 -0
- data/doc/js/navigation.js +0 -0
- data/doc/js/search.js +0 -0
- data/doc/js/search_index.js +1 -1
- data/doc/js/searcher.js +0 -0
- data/doc/rdoc.css +580 -580
- data/doc/table_of_contents.html +69 -72
- data/lib/bauxite.rb +28 -28
- data/lib/bauxite/actions/alias.rb +51 -51
- data/lib/bauxite/actions/assert.rb +49 -49
- data/lib/bauxite/actions/asserth.rb +60 -60
- data/lib/bauxite/actions/assertm.rb +49 -49
- data/lib/bauxite/actions/assertv.rb +40 -40
- data/lib/bauxite/actions/assertw.rb +47 -47
- data/lib/bauxite/actions/break.rb +39 -39
- data/lib/bauxite/actions/capture.rb +61 -61
- data/lib/bauxite/actions/click.rb +36 -36
- data/lib/bauxite/actions/debug.rb +103 -103
- data/lib/bauxite/actions/doif.rb +43 -43
- data/lib/bauxite/actions/dounless.rb +43 -43
- data/lib/bauxite/actions/echo.rb +36 -36
- data/lib/bauxite/actions/exec.rb +46 -46
- data/lib/bauxite/actions/exit.rb +35 -35
- data/lib/bauxite/actions/failif.rb +52 -52
- data/lib/bauxite/actions/js.rb +41 -41
- data/lib/bauxite/actions/load.rb +49 -49
- data/lib/bauxite/actions/open.rb +35 -35
- data/lib/bauxite/actions/params.rb +40 -40
- data/lib/bauxite/actions/replace.rb +37 -37
- data/lib/bauxite/actions/reset.rb +38 -38
- data/lib/bauxite/actions/return.rb +68 -68
- data/lib/bauxite/actions/ruby.rb +58 -58
- data/lib/bauxite/actions/select.rb +48 -48
- data/lib/bauxite/actions/set.rb +39 -39
- data/lib/bauxite/actions/setif.rb +44 -44
- data/lib/bauxite/actions/source.rb +44 -44
- data/lib/bauxite/actions/store.rb +38 -38
- data/lib/bauxite/actions/submit.rb +37 -37
- data/lib/bauxite/actions/test.rb +67 -67
- data/lib/bauxite/actions/tryload.rb +71 -71
- data/lib/bauxite/actions/wait.rb +38 -38
- data/lib/bauxite/actions/write.rb +44 -44
- data/lib/bauxite/application.rb +349 -349
- data/lib/bauxite/core/action.rb +199 -199
- data/lib/bauxite/core/context.rb +791 -791
- data/lib/bauxite/core/errors.rb +41 -41
- data/lib/bauxite/core/logger.rb +169 -169
- data/lib/bauxite/core/parser.rb +85 -85
- data/lib/bauxite/core/selector.rb +152 -152
- data/lib/bauxite/loggers/composite.rb +91 -91
- data/lib/bauxite/loggers/echo.rb +36 -36
- data/lib/bauxite/loggers/file.rb +68 -68
- data/lib/bauxite/loggers/html.rb +154 -154
- data/lib/bauxite/loggers/terminal.rb +134 -134
- data/lib/bauxite/loggers/xterm.rb +101 -101
- data/lib/bauxite/parsers/csv.rb +43 -43
- data/lib/bauxite/parsers/default.rb +42 -42
- data/lib/bauxite/parsers/html.rb +79 -79
- data/lib/bauxite/selectors/attr.rb +39 -39
- data/lib/bauxite/selectors/frame.rb +60 -60
- data/lib/bauxite/selectors/json.rb +88 -88
- data/lib/bauxite/selectors/sid.rb +38 -38
- data/lib/bauxite/selectors/smart.rb +80 -80
- data/lib/bauxite/selectors/window.rb +77 -77
- data/test/alert.bxt +3 -3
- data/test/alert/page.html +4 -4
- data/test/alias.bxt +9 -9
- data/test/asserth.bxt +2 -2
- data/test/assertv.bxt +1 -1
- data/test/assertw.bxt +7 -7
- data/test/broken.bxt.manual +0 -0
- data/test/bug_load_path.bxt.manual +0 -0
- data/test/bug_load_path/broken.bxt.manual +0 -0
- data/test/bug_load_path/test.bxt +0 -0
- data/test/capture.bxt.manual +20 -20
- data/test/capture/my_test.bxt +1 -1
- data/test/capture/page.html +6 -6
- data/test/capture_on_error.bxt.manual +3 -3
- data/test/capture_on_error/my_test.bxt +1 -1
- data/test/capture_on_error/page.html +2 -2
- data/test/debug.bxt.manual +0 -0
- data/test/default_selector.bxt.manual +7 -7
- data/test/default_selector/page.html +10 -10
- data/test/default_selector_var.bxt +1 -1
- data/test/delay.bxt +2 -2
- data/test/delay/page.html +4 -4
- data/test/doif.bxt +6 -6
- data/test/dounless.bxt +6 -6
- data/test/exec.bxt +6 -6
- data/test/exit.bxt +3 -3
- data/test/exit/test.bxt +3 -3
- data/test/extension.bxt.manual +4 -4
- data/test/extension/custom.rb +12 -12
- data/test/extension/page.html +4 -4
- data/test/failif.bxt +7 -7
- data/test/failif/page.html +5 -5
- data/test/format.bxt +17 -17
- data/test/format/page.html +6 -6
- data/test/frame.bxt +6 -6
- data/test/frame/child_frame.html +6 -6
- data/test/frame/grandchild_frame.html +4 -4
- data/test/frame/page.html +4 -4
- data/test/js.bxt +4 -4
- data/test/json.bxt +19 -19
- data/test/json/array.json +3 -3
- data/test/json/object.json +13 -13
- data/test/load.bxt +18 -18
- data/test/load/child.bxt +12 -12
- data/test/parsers.bxt +1 -1
- data/test/parsers.csv +7 -7
- data/test/parsers.html +32 -32
- data/test/parsers/page.html +6 -6
- data/test/return.bxt +1 -1
- data/test/return/f1.bxt +1 -1
- data/test/return/f2.bxt +1 -1
- data/test/return/f3.bxt +1 -1
- data/test/return/f4.bxt +2 -2
- data/test/ruby.bxt +1 -1
- data/test/ruby/custom.rb +5 -5
- data/test/select.bxt +9 -9
- data/test/select/page.html +8 -8
- data/test/selectors.bxt +7 -7
- data/test/selectors/page.html +6 -6
- data/test/set_builtin.bxt +5 -0
- data/test/set_builtin/page.html +5 -0
- data/test/setif.bxt +3 -3
- data/test/smart_selector.bxt +17 -17
- data/test/smart_selector/page.html +17 -17
- data/test/stdin.bxt +0 -0
- data/test/submit.bxt +4 -4
- data/test/submit/page.html +6 -6
- data/test/submit/page2.html +4 -4
- data/test/test.bxt.manual +6 -6
- data/test/test/test1.bxt +2 -2
- data/test/test/test2.bxt +3 -3
- data/test/test/test3.bxt +2 -2
- data/test/test/test4.bxt +1 -1
- data/test/test/test5.bxt +1 -1
- data/test/window.bxt +14 -14
- data/test/window/page.html +5 -5
- data/test/window/popup.html +4 -4
- metadata +5 -3
data/test/alert.bxt
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
open "file://${__DIR__}/alert/page.html"
|
2
|
-
assertm "hello world!"
|
3
|
-
assert text "There is an alert over this text!"
|
1
|
+
open "file://${__DIR__}/alert/page.html"
|
2
|
+
assertm "hello world!"
|
3
|
+
assert text "There is an alert over this text!"
|
data/test/alert/page.html
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
<html>
|
2
|
-
<body onload="setTimeout(function() { alert('hello world!'); }, 2000);">
|
3
|
-
<div id="text">There is an alert over this text!</div>
|
4
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<body onload="setTimeout(function() { alert('hello world!'); }, 2000);">
|
3
|
+
<div id="text">There is an alert over this text!</div>
|
4
|
+
</body>
|
5
5
|
</html>
|
data/test/alias.bxt
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
alias hey echo "${1}, nice to see you!"
|
2
|
-
hey john
|
3
|
-
|
4
|
-
alias set_hi set hi "hi ${1}"
|
5
|
-
set_hi dude!
|
6
|
-
assertv "^hi dude!$" "${hi}"
|
7
|
-
|
8
|
-
alias merge_hi echo "${1*}"
|
9
|
-
merge_hi how are you doing?
|
1
|
+
alias hey echo "${1}, nice to see you!"
|
2
|
+
hey john
|
3
|
+
|
4
|
+
alias set_hi set hi "hi ${1}"
|
5
|
+
set_hi dude!
|
6
|
+
assertv "^hi dude!$" "${hi}"
|
7
|
+
|
8
|
+
alias merge_hi echo "${1*}"
|
9
|
+
merge_hi how are you doing?
|
data/test/asserth.bxt
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
open "https://www.ruby-lang.org"
|
2
|
-
asserth "content-type=html" "status=^\d+ .*$"
|
1
|
+
open "https://www.ruby-lang.org"
|
2
|
+
asserth "content-type=html" "status=^\d+ .*$"
|
data/test/assertv.bxt
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
set myvar myvalue1234
|
1
|
+
set myvar myvalue1234
|
2
2
|
assertv "^myvalue\d+$" "${myvar}"
|
data/test/assertw.bxt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
assertw
|
2
|
-
|
3
|
-
js "window.w = window.open()"
|
4
|
-
assertw 2
|
5
|
-
|
6
|
-
js "setTimeout(function() { window.w.close(); }, 3000);"
|
7
|
-
assertw 1
|
1
|
+
assertw
|
2
|
+
|
3
|
+
js "window.w = window.open()"
|
4
|
+
assertw 2
|
5
|
+
|
6
|
+
js "setTimeout(function() { window.w.close(); }, 3000);"
|
7
|
+
assertw 1
|
data/test/broken.bxt.manual
CHANGED
File without changes
|
File without changes
|
File without changes
|
data/test/bug_load_path/test.bxt
CHANGED
File without changes
|
data/test/capture.bxt.manual
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
open "file://${__DIR__}/capture/page.html"
|
2
|
-
write by_id hello
|
3
|
-
|
4
|
-
# Seq 0
|
5
|
-
capture
|
6
|
-
|
7
|
-
# Seq 1
|
8
|
-
capture
|
9
|
-
|
10
|
-
# Seq 2
|
11
|
-
capture
|
12
|
-
|
13
|
-
# With name
|
14
|
-
capture with_name.png
|
15
|
-
|
16
|
-
# With test name
|
17
|
-
test "capture/my_test.bxt"
|
18
|
-
|
19
|
-
# With named test name
|
20
|
-
test "capture/my_test.bxt" named_test
|
1
|
+
open "file://${__DIR__}/capture/page.html"
|
2
|
+
write by_id hello
|
3
|
+
|
4
|
+
# Seq 0
|
5
|
+
capture
|
6
|
+
|
7
|
+
# Seq 1
|
8
|
+
capture
|
9
|
+
|
10
|
+
# Seq 2
|
11
|
+
capture
|
12
|
+
|
13
|
+
# With name
|
14
|
+
capture with_name.png
|
15
|
+
|
16
|
+
# With test name
|
17
|
+
test "capture/my_test.bxt"
|
18
|
+
|
19
|
+
# With named test name
|
20
|
+
test "capture/my_test.bxt" named_test
|
data/test/capture/my_test.bxt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
capture
|
1
|
+
capture
|
data/test/capture/page.html
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
<html>
|
2
|
-
<body>
|
3
|
-
<div class="parent">
|
4
|
-
<input id="random_prefix_by_id" class="by_class" by_attr="attr_value">
|
5
|
-
</div>
|
6
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<body>
|
3
|
+
<div class="parent">
|
4
|
+
<input id="random_prefix_by_id" class="by_class" by_attr="attr_value">
|
5
|
+
</div>
|
6
|
+
</body>
|
7
7
|
</html>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
open "file://${__DIR__}/capture_on_error/page.html"
|
2
|
-
test capture_on_error/my_test.bxt
|
3
|
-
write label main
|
1
|
+
open "file://${__DIR__}/capture_on_error/page.html"
|
2
|
+
test capture_on_error/my_test.bxt
|
3
|
+
write label main
|
4
4
|
assertv true false
|
@@ -1,2 +1,2 @@
|
|
1
|
-
write label my_test
|
1
|
+
write label my_test
|
2
2
|
assertv false true
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<html>
|
2
|
-
<body><input type="text" id="label" /></body>
|
1
|
+
<html>
|
2
|
+
<body><input type="text" id="label" /></body>
|
3
3
|
</html>
|
data/test/debug.bxt.manual
CHANGED
File without changes
|
@@ -1,7 +1,7 @@
|
|
1
|
-
open "file://${__DIR__}/default_selector/page.html"
|
2
|
-
|
3
|
-
assert "#username" "jdoe"
|
4
|
-
assert ".password" "hello world!"
|
5
|
-
assert "[data=pet]" "velociraptor"
|
6
|
-
assert ".form textarea" "Hi! I'm John"
|
7
|
-
assert "textarea" "Notes go here."
|
1
|
+
open "file://${__DIR__}/default_selector/page.html"
|
2
|
+
|
3
|
+
assert "#username" "jdoe"
|
4
|
+
assert ".password" "hello world!"
|
5
|
+
assert "[data=pet]" "velociraptor"
|
6
|
+
assert ".form textarea" "Hi! I'm John"
|
7
|
+
assert "textarea" "Notes go here."
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<html>
|
2
|
-
<body>
|
3
|
-
<textarea>Notes go here.</textarea>
|
4
|
-
<div class="form">
|
5
|
-
<input id="username" value="jdoe"/>
|
6
|
-
<input class="password" value="hello world!" />
|
7
|
-
<input data="pet" value="velociraptor" />
|
8
|
-
<textarea>Hi! I'm John</textarea>
|
9
|
-
</div>
|
10
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<body>
|
3
|
+
<textarea>Notes go here.</textarea>
|
4
|
+
<div class="form">
|
5
|
+
<input id="username" value="jdoe"/>
|
6
|
+
<input class="password" value="hello world!" />
|
7
|
+
<input data="pet" value="velociraptor" />
|
8
|
+
<textarea>Hi! I'm John</textarea>
|
9
|
+
</div>
|
10
|
+
</body>
|
11
11
|
</html>
|
@@ -1 +1 @@
|
|
1
|
-
load "default_selector.bxt.manual" "__SELECTOR__=css"
|
1
|
+
load "default_selector.bxt.manual" "__SELECTOR__=css"
|
data/test/delay.bxt
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
open "file://${__DIR__}/delay/page.html"
|
2
|
-
assert label "done!"
|
1
|
+
open "file://${__DIR__}/delay/page.html"
|
2
|
+
assert label "done!"
|
data/test/delay/page.html
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
<html>
|
2
|
-
<body onload="setTimeout(function() { document.getElementById('label').innerHTML = 'done!'; }, 3000);">
|
3
|
-
<div id="label">not yet!</div>
|
4
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<body onload="setTimeout(function() { document.getElementById('label').innerHTML = 'done!'; }, 3000);">
|
3
|
+
<div id="label">not yet!</div>
|
4
|
+
</body>
|
5
5
|
</html>
|
data/test/doif.bxt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
set first john
|
2
|
-
set last doe
|
3
|
-
doif john ${first} assertv doe ${last}
|
4
|
-
doif john ${first} set is_john true
|
5
|
-
assertv true ${is_john}
|
6
|
-
doif smith ${last} load smith_specific_text.bxt
|
1
|
+
set first john
|
2
|
+
set last doe
|
3
|
+
doif john ${first} assertv doe ${last}
|
4
|
+
doif john ${first} set is_john true
|
5
|
+
assertv true ${is_john}
|
6
|
+
doif smith ${last} load smith_specific_text.bxt
|
data/test/dounless.bxt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
set first john
|
2
|
-
set last doe
|
3
|
-
dounless james ${first} assertv doe ${last}
|
4
|
-
dounless james ${first} set is_john true
|
5
|
-
assertv true ${is_john}
|
6
|
-
dounless doe ${last} load smith_specific_text.bxt
|
1
|
+
set first john
|
2
|
+
set last doe
|
3
|
+
dounless james ${first} assertv doe ${last}
|
4
|
+
dounless james ${first} set is_john true
|
5
|
+
assertv true ${is_john}
|
6
|
+
dounless doe ${last} load smith_specific_text.bxt
|
data/test/exec.bxt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
exec today=date "--date='2001-01-01' |
|
2
|
-
assertv "^Mon$" "${today}"
|
3
|
-
|
4
|
-
alias get_date exec ${2}=date "--date='${1}' |
|
5
|
-
get_date 2001-01-02 tomorrow
|
6
|
-
assertv "^Tue$" "${tomorrow}"
|
1
|
+
exec today=date "--date='2001-01-01' | sed 's/\(...\).*/\1/'"
|
2
|
+
assertv "^Mon$" "${today}"
|
3
|
+
|
4
|
+
alias get_date exec ${2}=date "--date='${1}' | sed 's/\(...\).*/\1/'"
|
5
|
+
get_date 2001-01-02 tomorrow
|
6
|
+
assertv "^Tue$" "${tomorrow}"
|
data/test/exit.bxt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
load exit/test.bxt
|
2
|
-
assertv "hi!" "${message}"
|
3
|
-
exit
|
1
|
+
load exit/test.bxt
|
2
|
+
assertv "hi!" "${message}"
|
3
|
+
exit
|
4
4
|
assertv true false
|
data/test/exit/test.bxt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
set message "hi!"
|
2
|
-
return message
|
3
|
-
exit
|
1
|
+
set message "hi!"
|
2
|
+
return message
|
3
|
+
exit
|
4
4
|
assertv true false
|
data/test/extension.bxt.manual
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
hello
|
2
|
-
open "file://${__DIR__}/extension/page.html"
|
3
|
-
assert "by_attr=attr_value" hello
|
4
|
-
|
1
|
+
hello
|
2
|
+
open "file://${__DIR__}/extension/page.html"
|
3
|
+
assert "by_attr=attr_value" hello
|
4
|
+
|
data/test/extension/custom.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
class Bauxite::Action
|
2
|
-
def hello()
|
3
|
-
lambda { puts 'Hello World!' }
|
4
|
-
end
|
5
|
-
end
|
6
|
-
|
7
|
-
class Bauxite::Selector
|
8
|
-
def by_attr(value)
|
9
|
-
attr "by_attr:#{value}"
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
1
|
+
class Bauxite::Action
|
2
|
+
def hello()
|
3
|
+
lambda { puts 'Hello World!' }
|
4
|
+
end
|
5
|
+
end
|
6
|
+
|
7
|
+
class Bauxite::Selector
|
8
|
+
def by_attr(value)
|
9
|
+
attr "by_attr:#{value}"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
data/test/extension/page.html
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
<html>
|
2
|
-
<body>
|
3
|
-
<input by_attr="attr_value">
|
4
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<body>
|
3
|
+
<input by_attr="attr_value">
|
4
|
+
</body>
|
5
5
|
</html>
|
data/test/failif.bxt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
open "file://${__DIR__}/failif/page.html"
|
2
|
-
failif assert label "not yet!"
|
3
|
-
failif assertv true false
|
4
|
-
assert hello world
|
5
|
-
failif assert hello universe
|
6
|
-
failif source "not in the source code"
|
7
|
-
failif failif assertv true true
|
1
|
+
open "file://${__DIR__}/failif/page.html"
|
2
|
+
failif assert label "not yet!"
|
3
|
+
failif assertv true false
|
4
|
+
assert hello world
|
5
|
+
failif assert hello universe
|
6
|
+
failif source "not in the source code"
|
7
|
+
failif failif assertv true true
|
data/test/failif/page.html
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
<html>
|
2
|
-
<body onload="setTimeout(function() { document.getElementById('label').innerHTML = 'done!'; }, 3000);">
|
3
|
-
<div id="label">not yet!</div>
|
4
|
-
<input id="hello" value="world" />
|
5
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<body onload="setTimeout(function() { document.getElementById('label').innerHTML = 'done!'; }, 3000);">
|
3
|
+
<div id="label">not yet!</div>
|
4
|
+
<input id="hello" value="world" />
|
5
|
+
</body>
|
6
6
|
</html>
|
data/test/format.bxt
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
open "file://${__DIR__}/format/page.html"
|
2
|
-
|
3
|
-
# action arg1 arg2
|
4
|
-
write by_id hello
|
5
|
-
echo "hello world!"
|
6
|
-
assert by_id hello
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
#
|
12
|
-
|
13
|
-
|
14
|
-
# indented comment
|
15
|
-
|
16
|
-
set my_var "stuff with whitespace and tabs embedded "
|
17
|
-
assertv "^stuff with whitespace and tabs embedded $" "${my_var}"
|
1
|
+
open "file://${__DIR__}/format/page.html"
|
2
|
+
|
3
|
+
# action arg1 arg2
|
4
|
+
write by_id hello
|
5
|
+
echo "hello world!"
|
6
|
+
assert by_id hello
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
#
|
12
|
+
|
13
|
+
|
14
|
+
# indented comment
|
15
|
+
|
16
|
+
set my_var "stuff with whitespace and tabs embedded "
|
17
|
+
assertv "^stuff with whitespace and tabs embedded $" "${my_var}"
|
data/test/format/page.html
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
<html>
|
2
|
-
<body>
|
3
|
-
<div class="parent">
|
4
|
-
<input id="random_prefix_by_id" class="by_class" by_attr="attr_value">
|
5
|
-
</div>
|
6
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<body>
|
3
|
+
<div class="parent">
|
4
|
+
<input id="random_prefix_by_id" class="by_class" by_attr="attr_value">
|
5
|
+
</div>
|
6
|
+
</body>
|
7
7
|
</html>
|
data/test/frame.bxt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
open "file://${__DIR__}/frame/page.html"
|
2
|
-
write "frame=|child|search_text" "World"
|
3
|
-
assert "frame=|child|label" "Hello"
|
4
|
-
assert "frame=|child|css=.input_box" "World"
|
5
|
-
assert "frame=|child|frame=|grandchild|label" "Hello boy!"
|
6
|
-
|
1
|
+
open "file://${__DIR__}/frame/page.html"
|
2
|
+
write "frame=|child|search_text" "World"
|
3
|
+
assert "frame=|child|label" "Hello"
|
4
|
+
assert "frame=|child|css=.input_box" "World"
|
5
|
+
assert "frame=|child|frame=|grandchild|label" "Hello boy!"
|
6
|
+
|
data/test/frame/child_frame.html
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
<html>
|
2
|
-
<body>
|
3
|
-
<input id="search_text" class="input_box"/>
|
4
|
-
<span id="label">Hello</span>
|
5
|
-
<iframe id="grandchild" src="grandchild_frame.html"></iframe>
|
6
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<body>
|
3
|
+
<input id="search_text" class="input_box"/>
|
4
|
+
<span id="label">Hello</span>
|
5
|
+
<iframe id="grandchild" src="grandchild_frame.html"></iframe>
|
6
|
+
</body>
|
7
7
|
</html>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<html>
|
2
|
-
<body>
|
3
|
-
<span id="label">Hello boy!</span>
|
4
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<body>
|
3
|
+
<span id="label">Hello boy!</span>
|
4
|
+
</body>
|
5
5
|
</html>
|