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/frame/page.html
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
<html>
|
2
|
-
<body>
|
3
|
-
<iframe id="child" src="child_frame.html"></iframe>
|
4
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<body>
|
3
|
+
<iframe id="child" src="child_frame.html"></iframe>
|
4
|
+
</body>
|
5
5
|
</html>
|
data/test/js.bxt
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
set title "test title"
|
2
|
-
js "document.title = '${title}'"
|
3
|
-
js "return document.title" current_title
|
4
|
-
echo "Title is: ${current_title}"
|
1
|
+
set title "test title"
|
2
|
+
js "document.title = '${title}'"
|
3
|
+
js "return document.title" current_title
|
4
|
+
echo "Title is: ${current_title}"
|
5
5
|
assertv "^${title}$" "${current_title}"
|
data/test/json.bxt
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
open "file://${__DIR__}/json/object.json"
|
2
|
-
assert json=top level
|
3
|
-
assert json=parent.first child
|
4
|
-
assert json=parent.second Child
|
5
|
-
assert json=parent.third 3
|
6
|
-
assert json=parent.fourth true
|
7
|
-
assert json=parent.fourth /.*/
|
8
|
-
failif assert json=parent.fifth /.*/
|
9
|
-
assert json=list[0] first
|
10
|
-
assert json=list[1].name second
|
11
|
-
assert json=list.length 3
|
12
|
-
failif assert json=list.length 4
|
13
|
-
|
14
|
-
open "file://${__DIR__}/json/array.json"
|
15
|
-
assert json=[0] 1
|
16
|
-
assert json=[1].value two
|
17
|
-
assert json=length 2
|
18
|
-
|
19
|
-
store json=[1].value is_this_two
|
1
|
+
open "file://${__DIR__}/json/object.json"
|
2
|
+
assert json=top level
|
3
|
+
assert json=parent.first child
|
4
|
+
assert json=parent.second Child
|
5
|
+
assert json=parent.third 3
|
6
|
+
assert json=parent.fourth true
|
7
|
+
assert json=parent.fourth /.*/
|
8
|
+
failif assert json=parent.fifth /.*/
|
9
|
+
assert json=list[0] first
|
10
|
+
assert json=list[1].name second
|
11
|
+
assert json=list.length 3
|
12
|
+
failif assert json=list.length 4
|
13
|
+
|
14
|
+
open "file://${__DIR__}/json/array.json"
|
15
|
+
assert json=[0] 1
|
16
|
+
assert json=[1].value two
|
17
|
+
assert json=length 2
|
18
|
+
|
19
|
+
store json=[1].value is_this_two
|
20
20
|
assertv two "${is_this_two}"
|
data/test/json/array.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[
|
2
|
-
1,
|
3
|
-
{"value": "two"}
|
1
|
+
[
|
2
|
+
1,
|
3
|
+
{"value": "two"}
|
4
4
|
]
|
data/test/json/object.json
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
{
|
2
|
-
"top":"level",
|
3
|
-
"parent": {
|
4
|
-
"first":"child",
|
5
|
-
"second":"Child",
|
6
|
-
"third": 3,
|
7
|
-
"fourth": true
|
8
|
-
},
|
9
|
-
"list": [
|
10
|
-
"first",
|
11
|
-
{"name":"second"},
|
12
|
-
{"name":"third"}
|
13
|
-
]
|
1
|
+
{
|
2
|
+
"top":"level",
|
3
|
+
"parent": {
|
4
|
+
"first":"child",
|
5
|
+
"second":"Child",
|
6
|
+
"third": 3,
|
7
|
+
"fourth": true
|
8
|
+
},
|
9
|
+
"list": [
|
10
|
+
"first",
|
11
|
+
{"name":"second"},
|
12
|
+
{"name":"third"}
|
13
|
+
]
|
14
14
|
}
|
data/test/load.bxt
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
set var "in main!"
|
2
|
-
set other "this shouldn't change"
|
3
|
-
echo "So far var is ${var}"
|
4
|
-
echo "... and __FILE__ is ${__FILE__}"
|
5
|
-
echo "... and other is ${other}"
|
6
|
-
echo "... and child_only is ${child_only}"
|
7
|
-
echo "About to load child.bxt..."
|
8
|
-
load load/child.bxt "var=overriden"
|
9
|
-
echo "Back in main var is ${var}"
|
10
|
-
echo "... and __FILE__ is ${__FILE__}"
|
11
|
-
echo "... and other is ${other}"
|
12
|
-
echo "... and child_only is ${child_only}"
|
13
|
-
assertv "load.bxt$" "${__FILE__}"
|
14
|
-
assertv "^this shouldn't change$" "${other}"
|
15
|
-
assertv "^in main!$" "${var}"
|
16
|
-
assertv "^\$\{child_only\}$" "${child_only}"
|
17
|
-
assertv "^child$" "${retval}"
|
18
|
-
|
1
|
+
set var "in main!"
|
2
|
+
set other "this shouldn't change"
|
3
|
+
echo "So far var is ${var}"
|
4
|
+
echo "... and __FILE__ is ${__FILE__}"
|
5
|
+
echo "... and other is ${other}"
|
6
|
+
echo "... and child_only is ${child_only}"
|
7
|
+
echo "About to load child.bxt..."
|
8
|
+
load load/child.bxt "var=overriden"
|
9
|
+
echo "Back in main var is ${var}"
|
10
|
+
echo "... and __FILE__ is ${__FILE__}"
|
11
|
+
echo "... and other is ${other}"
|
12
|
+
echo "... and child_only is ${child_only}"
|
13
|
+
assertv "load.bxt$" "${__FILE__}"
|
14
|
+
assertv "^this shouldn't change$" "${other}"
|
15
|
+
assertv "^in main!$" "${var}"
|
16
|
+
assertv "^\$\{child_only\}$" "${child_only}"
|
17
|
+
assertv "^child$" "${retval}"
|
18
|
+
|
19
19
|
tryload "this_one_is_invalid.bin"
|
data/test/load/child.bxt
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
echo "Welcome to child!"
|
2
|
-
set child_only "this is local"
|
3
|
-
echo "In here var is ${var}"
|
4
|
-
echo "... and __FILE__ is ${__FILE__}"
|
5
|
-
echo "... and other is ${other}"
|
6
|
-
echo "... and child_only is ${child_only}"
|
7
|
-
echo "Bye bye!"
|
8
|
-
assertv "child.bxt$" "${__FILE__}"
|
9
|
-
assertv "^this shouldn't change$" "${other}"
|
10
|
-
assertv "^overriden$" "${var}"
|
11
|
-
assertv "^this is local$" "${child_only}"
|
12
|
-
set retval "child"
|
1
|
+
echo "Welcome to child!"
|
2
|
+
set child_only "this is local"
|
3
|
+
echo "In here var is ${var}"
|
4
|
+
echo "... and __FILE__ is ${__FILE__}"
|
5
|
+
echo "... and other is ${other}"
|
6
|
+
echo "... and child_only is ${child_only}"
|
7
|
+
echo "Bye bye!"
|
8
|
+
assertv "child.bxt$" "${__FILE__}"
|
9
|
+
assertv "^this shouldn't change$" "${other}"
|
10
|
+
assertv "^overriden$" "${var}"
|
11
|
+
assertv "^this is local$" "${child_only}"
|
12
|
+
set retval "child"
|
13
13
|
return retval
|
data/test/parsers.bxt
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
load "parsers.csv"
|
1
|
+
load "parsers.csv"
|
2
2
|
load "parsers.html"
|
data/test/parsers.csv
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
open,"file://${__DIR__}/parsers/page.html"
|
2
|
-
write,by_id,hello
|
3
|
-
assert,"css=.parent input",hello
|
4
|
-
assert,"attr=by_attr:attr_value",hello
|
5
|
-
assert,"class=by_class",hello
|
6
|
-
assert,"tag_name=input",hello
|
7
|
-
|
1
|
+
open,"file://${__DIR__}/parsers/page.html"
|
2
|
+
write,by_id,hello
|
3
|
+
assert,"css=.parent input",hello
|
4
|
+
assert,"attr=by_attr:attr_value",hello
|
5
|
+
assert,"class=by_class",hello
|
6
|
+
assert,"tag_name=input",hello
|
7
|
+
|
data/test/parsers.html
CHANGED
@@ -1,32 +1,32 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
6
|
-
<link rel="selenium.base" href="file://${__DIR__}/parsers" />
|
7
|
-
<title>parsers</title>
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
<table cellpadding="1" cellspacing="1" border="1">
|
11
|
-
<thead>
|
12
|
-
<tr><td rowspan="1" colspan="3">parsers</td></tr>
|
13
|
-
</thead><tbody>
|
14
|
-
<!--Manually changed Base URL to use a relative page url.-->
|
15
|
-
<tr>
|
16
|
-
<td>open</td>
|
17
|
-
<td>/page.html</td>
|
18
|
-
<td></td>
|
19
|
-
</tr>
|
20
|
-
<tr>
|
21
|
-
<td>type</td>
|
22
|
-
<td>id=random_prefix_by_id</td>
|
23
|
-
<td>hello</td>
|
24
|
-
</tr>
|
25
|
-
<tr>
|
26
|
-
<td>assertValue</td>
|
27
|
-
<td>id=random_prefix_by_id</td>
|
28
|
-
<td>hello</td>
|
29
|
-
</tr>
|
30
|
-
</tbody></table>
|
31
|
-
</body>
|
32
|
-
</html>
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
6
|
+
<link rel="selenium.base" href="file://${__DIR__}/parsers" />
|
7
|
+
<title>parsers</title>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<table cellpadding="1" cellspacing="1" border="1">
|
11
|
+
<thead>
|
12
|
+
<tr><td rowspan="1" colspan="3">parsers</td></tr>
|
13
|
+
</thead><tbody>
|
14
|
+
<!--Manually changed Base URL to use a relative page url.-->
|
15
|
+
<tr>
|
16
|
+
<td>open</td>
|
17
|
+
<td>/page.html</td>
|
18
|
+
<td></td>
|
19
|
+
</tr>
|
20
|
+
<tr>
|
21
|
+
<td>type</td>
|
22
|
+
<td>id=random_prefix_by_id</td>
|
23
|
+
<td>hello</td>
|
24
|
+
</tr>
|
25
|
+
<tr>
|
26
|
+
<td>assertValue</td>
|
27
|
+
<td>id=random_prefix_by_id</td>
|
28
|
+
<td>hello</td>
|
29
|
+
</tr>
|
30
|
+
</tbody></table>
|
31
|
+
</body>
|
32
|
+
</html>
|
data/test/parsers/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/return.bxt
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
load return/f1.bxt
|
1
|
+
load return/f1.bxt
|
2
2
|
assertv "my_value" "${my_var}"
|
data/test/return/f1.bxt
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
load f2.bxt
|
1
|
+
load f2.bxt
|
2
2
|
return my_var
|
data/test/return/f2.bxt
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
load f3.bxt
|
1
|
+
load f3.bxt
|
2
2
|
return *
|
data/test/return/f3.bxt
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
load f4.bxt
|
1
|
+
load f4.bxt
|
2
2
|
return *
|
data/test/return/f4.bxt
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
set my_var my_value
|
2
|
-
return my_var
|
1
|
+
set my_var my_value
|
2
|
+
return my_var
|
data/test/ruby.bxt
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
ruby ruby/custom.rb "message=a message to ruby!"
|
1
|
+
ruby ruby/custom.rb "message=a message to ruby!"
|
2
2
|
assertv "^response from ruby!$" "${response}"
|
data/test/ruby/custom.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
lambda do |ctx|
|
2
|
-
raise "Failed" if ctx.variables['message'] != "a message to ruby!"
|
3
|
-
ctx.exec_action 'set response "response from ruby!"'
|
4
|
-
ctx.exec_action 'return response'
|
5
|
-
end
|
1
|
+
lambda do |ctx|
|
2
|
+
raise "Failed" if ctx.variables['message'] != "a message to ruby!"
|
3
|
+
ctx.exec_action 'set response "response from ruby!"'
|
4
|
+
ctx.exec_action 'return response'
|
5
|
+
end
|
data/test/select.bxt
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
open "file://${__DIR__}/select/page.html"
|
2
|
-
|
3
|
-
assert type def
|
4
|
-
|
5
|
-
select type Auto
|
6
|
-
assert type car
|
7
|
-
|
8
|
-
select type Bicycle
|
9
|
-
assert type bike
|
1
|
+
open "file://${__DIR__}/select/page.html"
|
2
|
+
|
3
|
+
assert type def
|
4
|
+
|
5
|
+
select type Auto
|
6
|
+
assert type car
|
7
|
+
|
8
|
+
select type Bicycle
|
9
|
+
assert type bike
|
data/test/select/page.html
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
<html>
|
2
|
-
<body>
|
3
|
-
<select id="type">
|
4
|
-
<option value="def" selected="selected">None</option>
|
5
|
-
<option value="car">Auto</option>
|
6
|
-
<option value="bike">Bicycle</option>
|
7
|
-
</select>
|
8
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<body>
|
3
|
+
<select id="type">
|
4
|
+
<option value="def" selected="selected">None</option>
|
5
|
+
<option value="car">Auto</option>
|
6
|
+
<option value="bike">Bicycle</option>
|
7
|
+
</select>
|
8
|
+
</body>
|
9
9
|
</html>
|
data/test/selectors.bxt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
open "file://${__DIR__}/selectors/page.html"
|
2
|
-
write by_id hello
|
3
|
-
assert "css=.parent input" hello
|
4
|
-
assert "attr=by_attr:attr_value" hello
|
5
|
-
assert "class=by_class" hello
|
6
|
-
assert "tag_name=input" hello
|
7
|
-
|
1
|
+
open "file://${__DIR__}/selectors/page.html"
|
2
|
+
write by_id hello
|
3
|
+
assert "css=.parent input" hello
|
4
|
+
assert "attr=by_attr:attr_value" hello
|
5
|
+
assert "class=by_class" hello
|
6
|
+
assert "tag_name=input" hello
|
7
|
+
|
data/test/selectors/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/setif.bxt
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
set name john
|
2
|
-
setif is_john true assertv "/John/i" "${name}"
|
3
|
-
assertv true ${is_john}
|
1
|
+
set name john
|
2
|
+
setif is_john true assertv "/John/i" "${name}"
|
3
|
+
assertv true ${is_john}
|
data/test/smart_selector.bxt
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
open "file://${__DIR__}/smart_selector/page.html"
|
2
|
-
|
3
|
-
assert "smart=By-id-suffix" "By id suffix"
|
4
|
-
assert "smart=By-name" "By name"
|
5
|
-
assert "smart=By-class" "By class"
|
6
|
-
assert "smart=By-id-fragment" "By id fragment"
|
7
|
-
assert "smart=By placeholder" "By placeholder"
|
8
|
-
assert "smart=By label sibling" "By label sibling"
|
9
|
-
assert "smart=By label parent" "By label parent"
|
10
|
-
assert "smart=By radio value" "By radio value"
|
11
|
-
assert "smart=By checkbox value" "By checkbox value"
|
12
|
-
click "smart=By submit text"
|
13
|
-
assert btn_text "By submit text"
|
14
|
-
click "smart=By input button text"
|
15
|
-
assert btn_text "By input button text"
|
16
|
-
click "smart=By button text"
|
17
|
-
assert btn_text "By button text"
|
1
|
+
open "file://${__DIR__}/smart_selector/page.html"
|
2
|
+
|
3
|
+
assert "smart=By-id-suffix" "By id suffix"
|
4
|
+
assert "smart=By-name" "By name"
|
5
|
+
assert "smart=By-class" "By class"
|
6
|
+
assert "smart=By-id-fragment" "By id fragment"
|
7
|
+
assert "smart=By placeholder" "By placeholder"
|
8
|
+
assert "smart=By label sibling" "By label sibling"
|
9
|
+
assert "smart=By label parent" "By label parent"
|
10
|
+
assert "smart=By radio value" "By radio value"
|
11
|
+
assert "smart=By checkbox value" "By checkbox value"
|
12
|
+
click "smart=By submit text"
|
13
|
+
assert btn_text "By submit text"
|
14
|
+
click "smart=By input button text"
|
15
|
+
assert btn_text "By input button text"
|
16
|
+
click "smart=By button text"
|
17
|
+
assert btn_text "By button text"
|
@@ -1,18 +1,18 @@
|
|
1
|
-
<html>
|
2
|
-
<body>
|
3
|
-
<input type="text" id="d89e554c-dc51-41e7-a456-ab6e9e67f899-By-id-suffix" value="By id suffix"/>
|
4
|
-
<input type="text" name="By-name" value="By name"/>
|
5
|
-
<input type="text" class="By-class" value="By class"/>
|
6
|
-
<input type="text" id="d89e554c-dc51-41e7-a456-ab6e9e67f899-By-id-fragment-5e83eee4-fc87-4778-b0b3-5e1551d002a5" value="By id fragment"/>
|
7
|
-
<input type="text" placeholder="By placeholder" value="By placeholder"/>
|
8
|
-
<label>By label parent<input type="text" value="By label parent"/></label>
|
9
|
-
<div><label for="my_input">By label sibling</label><input id="my_input" type="text" value="By label sibling"/></div>
|
10
|
-
<input type="radio" name="radio" value="By radio value"/>
|
11
|
-
<input type="checkbox" name="checkbox" value="By checkbox value"/>
|
12
|
-
<input type="submit" value="By submit text" onclick="document.getElementById('btn_text').setAttribute('value', this.getAttribute('value'));"/>
|
13
|
-
<input type="button" value="By input button text" onclick="document.getElementById('btn_text').setAttribute('value', this.getAttribute('value'));"/>
|
14
|
-
<button onclick="document.getElementById('btn_text').setAttribute('value', this.innerHTML);">By button text</button>
|
15
|
-
|
16
|
-
<input type="text" id="btn_text"/>
|
17
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<body>
|
3
|
+
<input type="text" id="d89e554c-dc51-41e7-a456-ab6e9e67f899-By-id-suffix" value="By id suffix"/>
|
4
|
+
<input type="text" name="By-name" value="By name"/>
|
5
|
+
<input type="text" class="By-class" value="By class"/>
|
6
|
+
<input type="text" id="d89e554c-dc51-41e7-a456-ab6e9e67f899-By-id-fragment-5e83eee4-fc87-4778-b0b3-5e1551d002a5" value="By id fragment"/>
|
7
|
+
<input type="text" placeholder="By placeholder" value="By placeholder"/>
|
8
|
+
<label>By label parent<input type="text" value="By label parent"/></label>
|
9
|
+
<div><label for="my_input">By label sibling</label><input id="my_input" type="text" value="By label sibling"/></div>
|
10
|
+
<input type="radio" name="radio" value="By radio value"/>
|
11
|
+
<input type="checkbox" name="checkbox" value="By checkbox value"/>
|
12
|
+
<input type="submit" value="By submit text" onclick="document.getElementById('btn_text').setAttribute('value', this.getAttribute('value'));"/>
|
13
|
+
<input type="button" value="By input button text" onclick="document.getElementById('btn_text').setAttribute('value', this.getAttribute('value'));"/>
|
14
|
+
<button onclick="document.getElementById('btn_text').setAttribute('value', this.innerHTML);">By button text</button>
|
15
|
+
|
16
|
+
<input type="text" id="btn_text"/>
|
17
|
+
</body>
|
18
18
|
</html>
|