bauxite 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/Rakefile +69 -0
  4. data/bin/bauxite +27 -0
  5. data/doc/Bauxite/Action.html +1463 -0
  6. data/doc/Bauxite/ActionModule.html +342 -0
  7. data/doc/Bauxite/Context.html +1439 -0
  8. data/doc/Bauxite/Errors/AssertionError.html +107 -0
  9. data/doc/Bauxite/Errors/FileNotFoundError.html +107 -0
  10. data/doc/Bauxite/Errors.html +100 -0
  11. data/doc/Bauxite/Loggers/CompositeLogger.html +325 -0
  12. data/doc/Bauxite/Loggers/EchoLogger.html +164 -0
  13. data/doc/Bauxite/Loggers/FileLogger.html +215 -0
  14. data/doc/Bauxite/Loggers/NullLogger.html +334 -0
  15. data/doc/Bauxite/Loggers/TerminalLogger.html +586 -0
  16. data/doc/Bauxite/Loggers/XtermLogger.html +287 -0
  17. data/doc/Bauxite/Loggers.html +103 -0
  18. data/doc/Bauxite/Selector.html +422 -0
  19. data/doc/Bauxite/SelectorModule.html +283 -0
  20. data/doc/Bauxite.html +98 -0
  21. data/doc/created.rid +37 -0
  22. data/doc/fonts/Lato-Light.ttf +0 -0
  23. data/doc/fonts/Lato-LightItalic.ttf +0 -0
  24. data/doc/fonts/Lato-Regular.ttf +0 -0
  25. data/doc/fonts/Lato-RegularItalic.ttf +0 -0
  26. data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
  27. data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
  28. data/doc/fonts.css +167 -0
  29. data/doc/images/add.png +0 -0
  30. data/doc/images/arrow_up.png +0 -0
  31. data/doc/images/brick.png +0 -0
  32. data/doc/images/brick_link.png +0 -0
  33. data/doc/images/bug.png +0 -0
  34. data/doc/images/bullet_black.png +0 -0
  35. data/doc/images/bullet_toggle_minus.png +0 -0
  36. data/doc/images/bullet_toggle_plus.png +0 -0
  37. data/doc/images/date.png +0 -0
  38. data/doc/images/delete.png +0 -0
  39. data/doc/images/find.png +0 -0
  40. data/doc/images/loadingAnimation.gif +0 -0
  41. data/doc/images/macFFBgHack.png +0 -0
  42. data/doc/images/package.png +0 -0
  43. data/doc/images/page_green.png +0 -0
  44. data/doc/images/page_white_text.png +0 -0
  45. data/doc/images/page_white_width.png +0 -0
  46. data/doc/images/plugin.png +0 -0
  47. data/doc/images/ruby.png +0 -0
  48. data/doc/images/tag_blue.png +0 -0
  49. data/doc/images/tag_green.png +0 -0
  50. data/doc/images/transparent.png +0 -0
  51. data/doc/images/wrench.png +0 -0
  52. data/doc/images/wrench_orange.png +0 -0
  53. data/doc/images/zoom.png +0 -0
  54. data/doc/index.html +111 -0
  55. data/doc/js/darkfish.js +140 -0
  56. data/doc/js/jquery.js +18 -0
  57. data/doc/js/navigation.js +142 -0
  58. data/doc/js/search.js +109 -0
  59. data/doc/js/search_index.js +1 -0
  60. data/doc/js/searcher.js +228 -0
  61. data/doc/rdoc.css +580 -0
  62. data/doc/table_of_contents.html +510 -0
  63. data/lib/bauxite/actions/alias.rb +51 -0
  64. data/lib/bauxite/actions/assert.rb +49 -0
  65. data/lib/bauxite/actions/assertv.rb +40 -0
  66. data/lib/bauxite/actions/break.rb +39 -0
  67. data/lib/bauxite/actions/click.rb +35 -0
  68. data/lib/bauxite/actions/debug.rb +99 -0
  69. data/lib/bauxite/actions/echo.rb +36 -0
  70. data/lib/bauxite/actions/exec.rb +46 -0
  71. data/lib/bauxite/actions/js.rb +41 -0
  72. data/lib/bauxite/actions/load.rb +49 -0
  73. data/lib/bauxite/actions/open.rb +34 -0
  74. data/lib/bauxite/actions/params.rb +40 -0
  75. data/lib/bauxite/actions/replace.rb +37 -0
  76. data/lib/bauxite/actions/reset.rb +37 -0
  77. data/lib/bauxite/actions/return.rb +62 -0
  78. data/lib/bauxite/actions/ruby.rb +58 -0
  79. data/lib/bauxite/actions/set.rb +39 -0
  80. data/lib/bauxite/actions/source.rb +44 -0
  81. data/lib/bauxite/actions/store.rb +38 -0
  82. data/lib/bauxite/actions/test.rb +61 -0
  83. data/lib/bauxite/actions/tryload.rb +79 -0
  84. data/lib/bauxite/actions/wait.rb +38 -0
  85. data/lib/bauxite/actions/write.rb +40 -0
  86. data/lib/bauxite/application.rb +150 -0
  87. data/lib/bauxite/core/Action.rb +205 -0
  88. data/lib/bauxite/core/Context.rb +575 -0
  89. data/lib/bauxite/core/Errors.rb +36 -0
  90. data/lib/bauxite/core/Logger.rb +86 -0
  91. data/lib/bauxite/core/Selector.rb +156 -0
  92. data/lib/bauxite/loggers/composite.rb +70 -0
  93. data/lib/bauxite/loggers/echo.rb +36 -0
  94. data/lib/bauxite/loggers/file.rb +45 -0
  95. data/lib/bauxite/loggers/terminal.rb +130 -0
  96. data/lib/bauxite/loggers/xterm.rb +79 -0
  97. data/lib/bauxite/selectors/attr.rb +39 -0
  98. data/lib/bauxite/selectors/default.rb +38 -0
  99. data/lib/bauxite/selectors/frame.rb +60 -0
  100. data/lib/bauxite.rb +29 -0
  101. data/test/alias.bxt +6 -0
  102. data/test/assertv.bxt +2 -0
  103. data/test/delay/page.html +5 -0
  104. data/test/delay.bxt +2 -0
  105. data/test/exec.bxt +6 -0
  106. data/test/format/page.html +7 -0
  107. data/test/format.bxt +17 -0
  108. data/test/frame/child_frame.html +7 -0
  109. data/test/frame/grandchild_frame.html +5 -0
  110. data/test/frame/page.html +5 -0
  111. data/test/frame.bxt +6 -0
  112. data/test/js.bxt +5 -0
  113. data/test/load/child.bxt +13 -0
  114. data/test/load.bxt +17 -0
  115. data/test/ruby/custom.rb +5 -0
  116. data/test/ruby.bxt +2 -0
  117. data/test/selectors/page.html +7 -0
  118. data/test/selectors.bxt +7 -0
  119. data/test/stdin.bxt +1 -0
  120. data/test/test/test1.bxt +2 -0
  121. data/test/test/test2.bxt +3 -0
  122. data/test/test/test3.bxt +2 -0
  123. data/test/test.bxt.manual +4 -0
  124. metadata +194 -0
@@ -0,0 +1,510 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>Table of Contents - RDoc Documentation</title>
8
+
9
+ <link href="./fonts.css" rel="stylesheet">
10
+ <link href="./rdoc.css" rel="stylesheet">
11
+
12
+ <script type="text/javascript">
13
+ var rdoc_rel_prefix = "./";
14
+ </script>
15
+
16
+ <script src="./js/jquery.js"></script>
17
+ <script src="./js/navigation.js"></script>
18
+ <script src="./js/search_index.js"></script>
19
+ <script src="./js/search.js"></script>
20
+ <script src="./js/searcher.js"></script>
21
+ <script src="./js/darkfish.js"></script>
22
+
23
+
24
+ <body id="top" class="table-of-contents">
25
+ <main role="main">
26
+ <h1 class="class">Table of Contents - RDoc Documentation</h1>
27
+
28
+
29
+ <h2 id="classes">Classes and Modules</h2>
30
+ <ul>
31
+ <li class="class">
32
+ <a href="Bauxite/Action.html">Bauxite::Action</a>
33
+
34
+ <ul>
35
+ <li><a href="Bauxite/Action.html#Action+Methods">Action Methods</a>
36
+ </ul>
37
+ </li>
38
+ <li class="module">
39
+ <a href="Bauxite/ActionModule.html">Bauxite::ActionModule</a>
40
+ </li>
41
+ <li class="class">
42
+ <a href="Bauxite/Context.html">Bauxite::Context</a>
43
+
44
+ <ul>
45
+ <li><a href="Bauxite/Context.html#5Buntitled-5D">Top Section</a>
46
+ <li><a href="Bauxite/Context.html#Advanced+Helpers">Advanced Helpers</a>
47
+ <li><a href="Bauxite/Context.html#Metadata">Metadata</a>
48
+ <li><a href="Bauxite/Context.html#Variable+manipulation+methods">Variable manipulation methods</a>
49
+ </ul>
50
+ </li>
51
+ <li class="module">
52
+ <a href="Bauxite/Errors.html">Bauxite::Errors</a>
53
+ </li>
54
+ <li class="class">
55
+ <a href="Bauxite/Errors/AssertionError.html">Bauxite::Errors::AssertionError</a>
56
+ </li>
57
+ <li class="class">
58
+ <a href="Bauxite/Errors/FileNotFoundError.html">Bauxite::Errors::FileNotFoundError</a>
59
+ </li>
60
+ <li class="module">
61
+ <a href="Bauxite/Loggers.html">Bauxite::Loggers</a>
62
+ </li>
63
+ <li class="class">
64
+ <a href="Bauxite/Loggers/CompositeLogger.html">Bauxite::Loggers::CompositeLogger</a>
65
+ </li>
66
+ <li class="class">
67
+ <a href="Bauxite/Loggers/EchoLogger.html">Bauxite::Loggers::EchoLogger</a>
68
+ </li>
69
+ <li class="class">
70
+ <a href="Bauxite/Loggers/FileLogger.html">Bauxite::Loggers::FileLogger</a>
71
+ </li>
72
+ <li class="class">
73
+ <a href="Bauxite/Loggers/NullLogger.html">Bauxite::Loggers::NullLogger</a>
74
+ </li>
75
+ <li class="class">
76
+ <a href="Bauxite/Loggers/TerminalLogger.html">Bauxite::Loggers::TerminalLogger</a>
77
+ </li>
78
+ <li class="class">
79
+ <a href="Bauxite/Loggers/XtermLogger.html">Bauxite::Loggers::XtermLogger</a>
80
+ </li>
81
+ <li class="class">
82
+ <a href="Bauxite/Selector.html">Bauxite::Selector</a>
83
+
84
+ <ul>
85
+ <li><a href="Bauxite/Selector.html#label-Standard+Selenium+Selectors">Standard Selenium Selectors</a>
86
+ <li><a href="Bauxite/Selector.html#Selector+Methods">Selector Methods</a>
87
+ </ul>
88
+ </li>
89
+ <li class="module">
90
+ <a href="Bauxite/SelectorModule.html">Bauxite::SelectorModule</a>
91
+ </li>
92
+ </ul>
93
+
94
+ <h2 id="methods">Methods</h2>
95
+ <ul>
96
+
97
+ <li class="method">
98
+ <a href="Bauxite/Context.html#method-c-action_args">::action_args</a>
99
+ &mdash;
100
+ <span class="container">Bauxite::Context</span>
101
+
102
+ <li class="method">
103
+ <a href="Bauxite/Context.html#method-c-actions">::actions</a>
104
+ &mdash;
105
+ <span class="container">Bauxite::Context</span>
106
+
107
+ <li class="method">
108
+ <a href="Bauxite/Context.html#method-c-load_logger">::load_logger</a>
109
+ &mdash;
110
+ <span class="container">Bauxite::Context</span>
111
+
112
+ <li class="method">
113
+ <a href="Bauxite/Context.html#method-c-loggers">::loggers</a>
114
+ &mdash;
115
+ <span class="container">Bauxite::Context</span>
116
+
117
+ <li class="method">
118
+ <a href="Bauxite/Context.html#method-c-max_action_name_size">::max_action_name_size</a>
119
+ &mdash;
120
+ <span class="container">Bauxite::Context</span>
121
+
122
+ <li class="method">
123
+ <a href="Bauxite/Loggers/TerminalLogger.html#method-c-new">::new</a>
124
+ &mdash;
125
+ <span class="container">Bauxite::Loggers::TerminalLogger</span>
126
+
127
+ <li class="method">
128
+ <a href="Bauxite/Context.html#method-c-new">::new</a>
129
+ &mdash;
130
+ <span class="container">Bauxite::Context</span>
131
+
132
+ <li class="method">
133
+ <a href="Bauxite/ActionModule.html#method-c-new">::new</a>
134
+ &mdash;
135
+ <span class="container">Bauxite::ActionModule</span>
136
+
137
+ <li class="method">
138
+ <a href="Bauxite/SelectorModule.html#method-c-new">::new</a>
139
+ &mdash;
140
+ <span class="container">Bauxite::SelectorModule</span>
141
+
142
+ <li class="method">
143
+ <a href="Bauxite/Loggers/NullLogger.html#method-c-new">::new</a>
144
+ &mdash;
145
+ <span class="container">Bauxite::Loggers::NullLogger</span>
146
+
147
+ <li class="method">
148
+ <a href="Bauxite/Loggers/CompositeLogger.html#method-c-new">::new</a>
149
+ &mdash;
150
+ <span class="container">Bauxite::Loggers::CompositeLogger</span>
151
+
152
+ <li class="method">
153
+ <a href="Bauxite/Loggers/FileLogger.html#method-c-new">::new</a>
154
+ &mdash;
155
+ <span class="container">Bauxite::Loggers::FileLogger</span>
156
+
157
+ <li class="method">
158
+ <a href="Bauxite/Context.html#method-c-parse_args">::parse_args</a>
159
+ &mdash;
160
+ <span class="container">Bauxite::Context</span>
161
+
162
+ <li class="method">
163
+ <a href="Bauxite/Context.html#method-c-selectors">::selectors</a>
164
+ &mdash;
165
+ <span class="container">Bauxite::Context</span>
166
+
167
+ <li class="method">
168
+ <a href="Bauxite/Context.html#method-c-wait">::wait</a>
169
+ &mdash;
170
+ <span class="container">Bauxite::Context</span>
171
+
172
+ <li class="method">
173
+ <a href="Bauxite/Loggers/TerminalLogger.html#method-i-_block">#_block</a>
174
+ &mdash;
175
+ <span class="container">Bauxite::Loggers::TerminalLogger</span>
176
+
177
+ <li class="method">
178
+ <a href="Bauxite/Loggers/TerminalLogger.html#method-i-_cmd_color">#_cmd_color</a>
179
+ &mdash;
180
+ <span class="container">Bauxite::Loggers::TerminalLogger</span>
181
+
182
+ <li class="method">
183
+ <a href="Bauxite/Loggers/TerminalLogger.html#method-i-_fmt">#_fmt</a>
184
+ &mdash;
185
+ <span class="container">Bauxite::Loggers::TerminalLogger</span>
186
+
187
+ <li class="method">
188
+ <a href="Bauxite/Loggers/XtermLogger.html#method-i-_fmt">#_fmt</a>
189
+ &mdash;
190
+ <span class="container">Bauxite::Loggers::XtermLogger</span>
191
+
192
+ <li class="method">
193
+ <a href="Bauxite/Loggers/TerminalLogger.html#method-i-_restore_cursor">#_restore_cursor</a>
194
+ &mdash;
195
+ <span class="container">Bauxite::Loggers::TerminalLogger</span>
196
+
197
+ <li class="method">
198
+ <a href="Bauxite/Loggers/XtermLogger.html#method-i-_restore_cursor">#_restore_cursor</a>
199
+ &mdash;
200
+ <span class="container">Bauxite::Loggers::XtermLogger</span>
201
+
202
+ <li class="method">
203
+ <a href="Bauxite/Loggers/XtermLogger.html#method-i-_save_cursor">#_save_cursor</a>
204
+ &mdash;
205
+ <span class="container">Bauxite::Loggers::XtermLogger</span>
206
+
207
+ <li class="method">
208
+ <a href="Bauxite/Loggers/TerminalLogger.html#method-i-_save_cursor">#_save_cursor</a>
209
+ &mdash;
210
+ <span class="container">Bauxite::Loggers::TerminalLogger</span>
211
+
212
+ <li class="method">
213
+ <a href="Bauxite/Loggers/XtermLogger.html#method-i-_screen_width">#_screen_width</a>
214
+ &mdash;
215
+ <span class="container">Bauxite::Loggers::XtermLogger</span>
216
+
217
+ <li class="method">
218
+ <a href="Bauxite/Loggers/TerminalLogger.html#method-i-_screen_width">#_screen_width</a>
219
+ &mdash;
220
+ <span class="container">Bauxite::Loggers::TerminalLogger</span>
221
+
222
+ <li class="method">
223
+ <a href="Bauxite/Action.html#method-i-alias_action">#alias_action</a>
224
+ &mdash;
225
+ <span class="container">Bauxite::Action</span>
226
+
227
+ <li class="method">
228
+ <a href="Bauxite/ActionModule.html#method-i-args">#args</a>
229
+ &mdash;
230
+ <span class="container">Bauxite::ActionModule</span>
231
+
232
+ <li class="method">
233
+ <a href="Bauxite/Action.html#method-i-assert">#assert</a>
234
+ &mdash;
235
+ <span class="container">Bauxite::Action</span>
236
+
237
+ <li class="method">
238
+ <a href="Bauxite/Action.html#method-i-assertv">#assertv</a>
239
+ &mdash;
240
+ <span class="container">Bauxite::Action</span>
241
+
242
+ <li class="method">
243
+ <a href="Bauxite/Selector.html#method-i-attr">#attr</a>
244
+ &mdash;
245
+ <span class="container">Bauxite::Selector</span>
246
+
247
+ <li class="method">
248
+ <a href="Bauxite/Action.html#method-i-break_action">#break_action</a>
249
+ &mdash;
250
+ <span class="container">Bauxite::Action</span>
251
+
252
+ <li class="method">
253
+ <a href="Bauxite/Action.html#method-i-click">#click</a>
254
+ &mdash;
255
+ <span class="container">Bauxite::Action</span>
256
+
257
+ <li class="method">
258
+ <a href="Bauxite/Action.html#method-i-debug">#debug</a>
259
+ &mdash;
260
+ <span class="container">Bauxite::Action</span>
261
+
262
+ <li class="method">
263
+ <a href="Bauxite/Context.html#method-i-debug">#debug</a>
264
+ &mdash;
265
+ <span class="container">Bauxite::Context</span>
266
+
267
+ <li class="method">
268
+ <a href="Bauxite/Loggers/NullLogger.html#method-i-debug_prompt">#debug_prompt</a>
269
+ &mdash;
270
+ <span class="container">Bauxite::Loggers::NullLogger</span>
271
+
272
+ <li class="method">
273
+ <a href="Bauxite/Loggers/CompositeLogger.html#method-i-debug_prompt">#debug_prompt</a>
274
+ &mdash;
275
+ <span class="container">Bauxite::Loggers::CompositeLogger</span>
276
+
277
+ <li class="method">
278
+ <a href="Bauxite/Loggers/TerminalLogger.html#method-i-debug_prompt">#debug_prompt</a>
279
+ &mdash;
280
+ <span class="container">Bauxite::Loggers::TerminalLogger</span>
281
+
282
+ <li class="method">
283
+ <a href="Bauxite/Selector.html#method-i-default">#default</a>
284
+ &mdash;
285
+ <span class="container">Bauxite::Selector</span>
286
+
287
+ <li class="method">
288
+ <a href="Bauxite/Action.html#method-i-echo">#echo</a>
289
+ &mdash;
290
+ <span class="container">Bauxite::Action</span>
291
+
292
+ <li class="method">
293
+ <a href="Bauxite/Action.html#method-i-exec">#exec</a>
294
+ &mdash;
295
+ <span class="container">Bauxite::Action</span>
296
+
297
+ <li class="method">
298
+ <a href="Bauxite/Context.html#method-i-exec_action">#exec_action</a>
299
+ &mdash;
300
+ <span class="container">Bauxite::Context</span>
301
+
302
+ <li class="method">
303
+ <a href="Bauxite/ActionModule.html#method-i-execute">#execute</a>
304
+ &mdash;
305
+ <span class="container">Bauxite::ActionModule</span>
306
+
307
+ <li class="method">
308
+ <a href="Bauxite/Context.html#method-i-expand">#expand</a>
309
+ &mdash;
310
+ <span class="container">Bauxite::Context</span>
311
+
312
+ <li class="method">
313
+ <a href="Bauxite/SelectorModule.html#method-i-find">#find</a>
314
+ &mdash;
315
+ <span class="container">Bauxite::SelectorModule</span>
316
+
317
+ <li class="method">
318
+ <a href="Bauxite/Context.html#method-i-find">#find</a>
319
+ &mdash;
320
+ <span class="container">Bauxite::Context</span>
321
+
322
+ <li class="method">
323
+ <a href="Bauxite/Selector.html#method-i-frame">#frame</a>
324
+ &mdash;
325
+ <span class="container">Bauxite::Selector</span>
326
+
327
+ <li class="method">
328
+ <a href="Bauxite/Context.html#method-i-get_value">#get_value</a>
329
+ &mdash;
330
+ <span class="container">Bauxite::Context</span>
331
+
332
+ <li class="method">
333
+ <a href="Bauxite/Context.html#method-i-handle_errors">#handle_errors</a>
334
+ &mdash;
335
+ <span class="container">Bauxite::Context</span>
336
+
337
+ <li class="method">
338
+ <a href="Bauxite/Action.html#method-i-js">#js</a>
339
+ &mdash;
340
+ <span class="container">Bauxite::Action</span>
341
+
342
+ <li class="method">
343
+ <a href="Bauxite/Action.html#method-i-load">#load</a>
344
+ &mdash;
345
+ <span class="container">Bauxite::Action</span>
346
+
347
+ <li class="method">
348
+ <a href="Bauxite/Loggers/CompositeLogger.html#method-i-log">#log</a>
349
+ &mdash;
350
+ <span class="container">Bauxite::Loggers::CompositeLogger</span>
351
+
352
+ <li class="method">
353
+ <a href="Bauxite/Loggers/TerminalLogger.html#method-i-log">#log</a>
354
+ &mdash;
355
+ <span class="container">Bauxite::Loggers::TerminalLogger</span>
356
+
357
+ <li class="method">
358
+ <a href="Bauxite/Loggers/NullLogger.html#method-i-log">#log</a>
359
+ &mdash;
360
+ <span class="container">Bauxite::Loggers::NullLogger</span>
361
+
362
+ <li class="method">
363
+ <a href="Bauxite/Loggers/TerminalLogger.html#method-i-log_cmd">#log_cmd</a>
364
+ &mdash;
365
+ <span class="container">Bauxite::Loggers::TerminalLogger</span>
366
+
367
+ <li class="method">
368
+ <a href="Bauxite/Loggers/NullLogger.html#method-i-log_cmd">#log_cmd</a>
369
+ &mdash;
370
+ <span class="container">Bauxite::Loggers::NullLogger</span>
371
+
372
+ <li class="method">
373
+ <a href="Bauxite/Loggers/FileLogger.html#method-i-log_cmd">#log_cmd</a>
374
+ &mdash;
375
+ <span class="container">Bauxite::Loggers::FileLogger</span>
376
+
377
+ <li class="method">
378
+ <a href="Bauxite/Loggers/EchoLogger.html#method-i-log_cmd">#log_cmd</a>
379
+ &mdash;
380
+ <span class="container">Bauxite::Loggers::EchoLogger</span>
381
+
382
+ <li class="method">
383
+ <a href="Bauxite/Loggers/CompositeLogger.html#method-i-log_cmd">#log_cmd</a>
384
+ &mdash;
385
+ <span class="container">Bauxite::Loggers::CompositeLogger</span>
386
+
387
+ <li class="method">
388
+ <a href="Bauxite/Action.html#method-i-open">#open</a>
389
+ &mdash;
390
+ <span class="container">Bauxite::Action</span>
391
+
392
+ <li class="method">
393
+ <a href="Bauxite/Action.html#method-i-params">#params</a>
394
+ &mdash;
395
+ <span class="container">Bauxite::Action</span>
396
+
397
+ <li class="method">
398
+ <a href="Bauxite/Context.html#method-i-parse_file">#parse_file</a>
399
+ &mdash;
400
+ <span class="container">Bauxite::Context</span>
401
+
402
+ <li class="method">
403
+ <a href="Bauxite/Loggers/CompositeLogger.html#method-i-progress">#progress</a>
404
+ &mdash;
405
+ <span class="container">Bauxite::Loggers::CompositeLogger</span>
406
+
407
+ <li class="method">
408
+ <a href="Bauxite/Loggers/NullLogger.html#method-i-progress">#progress</a>
409
+ &mdash;
410
+ <span class="container">Bauxite::Loggers::NullLogger</span>
411
+
412
+ <li class="method">
413
+ <a href="Bauxite/Loggers/TerminalLogger.html#method-i-progress">#progress</a>
414
+ &mdash;
415
+ <span class="container">Bauxite::Loggers::TerminalLogger</span>
416
+
417
+ <li class="method">
418
+ <a href="Bauxite/Action.html#method-i-replace">#replace</a>
419
+ &mdash;
420
+ <span class="container">Bauxite::Action</span>
421
+
422
+ <li class="method">
423
+ <a href="Bauxite/Action.html#method-i-reset">#reset</a>
424
+ &mdash;
425
+ <span class="container">Bauxite::Action</span>
426
+
427
+ <li class="method">
428
+ <a href="Bauxite/Context.html#method-i-reset_driver">#reset_driver</a>
429
+ &mdash;
430
+ <span class="container">Bauxite::Context</span>
431
+
432
+ <li class="method">
433
+ <a href="Bauxite/Action.html#method-i-return_action">#return_action</a>
434
+ &mdash;
435
+ <span class="container">Bauxite::Action</span>
436
+
437
+ <li class="method">
438
+ <a href="Bauxite/Action.html#method-i-ruby">#ruby</a>
439
+ &mdash;
440
+ <span class="container">Bauxite::Action</span>
441
+
442
+ <li class="method">
443
+ <a href="Bauxite/SelectorModule.html#method-i-selenium_find">#selenium_find</a>
444
+ &mdash;
445
+ <span class="container">Bauxite::SelectorModule</span>
446
+
447
+ <li class="method">
448
+ <a href="Bauxite/Action.html#method-i-set">#set</a>
449
+ &mdash;
450
+ <span class="container">Bauxite::Action</span>
451
+
452
+ <li class="method">
453
+ <a href="Bauxite/Action.html#method-i-source">#source</a>
454
+ &mdash;
455
+ <span class="container">Bauxite::Action</span>
456
+
457
+ <li class="method">
458
+ <a href="Bauxite/Context.html#method-i-start">#start</a>
459
+ &mdash;
460
+ <span class="container">Bauxite::Context</span>
461
+
462
+ <li class="method">
463
+ <a href="Bauxite/Context.html#method-i-stop">#stop</a>
464
+ &mdash;
465
+ <span class="container">Bauxite::Context</span>
466
+
467
+ <li class="method">
468
+ <a href="Bauxite/Action.html#method-i-store">#store</a>
469
+ &mdash;
470
+ <span class="container">Bauxite::Action</span>
471
+
472
+ <li class="method">
473
+ <a href="Bauxite/Action.html#method-i-test">#test</a>
474
+ &mdash;
475
+ <span class="container">Bauxite::Action</span>
476
+
477
+ <li class="method">
478
+ <a href="Bauxite/Action.html#method-i-tryload">#tryload</a>
479
+ &mdash;
480
+ <span class="container">Bauxite::Action</span>
481
+
482
+ <li class="method">
483
+ <a href="Bauxite/Action.html#method-i-wait">#wait</a>
484
+ &mdash;
485
+ <span class="container">Bauxite::Action</span>
486
+
487
+ <li class="method">
488
+ <a href="Bauxite/Context.html#method-i-with_timeout">#with_timeout</a>
489
+ &mdash;
490
+ <span class="container">Bauxite::Context</span>
491
+
492
+ <li class="method">
493
+ <a href="Bauxite/Context.html#method-i-with_vars">#with_vars</a>
494
+ &mdash;
495
+ <span class="container">Bauxite::Context</span>
496
+
497
+ <li class="method">
498
+ <a href="Bauxite/Action.html#method-i-write">#write</a>
499
+ &mdash;
500
+ <span class="container">Bauxite::Action</span>
501
+ </ul>
502
+ </main>
503
+
504
+
505
+ <footer id="validator-badges" role="contentinfo">
506
+ <p><a href="http://validator.w3.org/check/referer">Validate</a>
507
+ <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
508
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
509
+ </footer>
510
+
@@ -0,0 +1,51 @@
1
+ #--
2
+ # Copyright (c) 2014 Patricio Zavolinsky
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ # of this software and associated documentation files (the "Software"), to deal
6
+ # in the Software without restriction, including without limitation the rights
7
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ # copies of the Software, and to permit persons to whom the Software is
9
+ # furnished to do so, subject to the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be included in
12
+ # all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ # SOFTWARE.
21
+ #++
22
+
23
+ class Bauxite::Action
24
+ # Aliases +name+ to +action+ with additional arguments.
25
+ #
26
+ # In +args+ the variables <tt>${1}</tt>..<tt>${n}</tt> will be expanded
27
+ # to the arguments given to the alias. Also <tt>${n*}</tt> will be expanded
28
+ # to the space separated list of arguments from the n-th on. Finally,
29
+ # <tt>${n*q}</tt> will behave like <tt>${n*}</tt> except that each argument
30
+ # will be surrounded by quotes (+"+) and quotes inside the argument will be
31
+ # doubled (+""+).
32
+ #
33
+ # Note that +action+ can be any action except +alias+. Also note that
34
+ # this action does not check for cyclic aliases (e.g. alias +a+ to +b+
35
+ # and alias +b+ to +a+). You should check that yourself.
36
+ #
37
+ # Also note that this method provides an action named +alias+ and not
38
+ # alias_action.
39
+ #
40
+ #
41
+ # For example:
42
+ # alias hey echo "$1, nice to see you!"
43
+ # hey john
44
+ # # => this would expand to
45
+ # # echo "john, nice to see you!"
46
+ #
47
+ # :category: Action Methods
48
+ def alias_action(name, action, *args)
49
+ @ctx.aliases[name] = ([action] + (args.map { |a| '"'+a.gsub('""', '')+'"' })).join(' ')
50
+ end
51
+ end
@@ -0,0 +1,49 @@
1
+ #--
2
+ # Copyright (c) 2014 Patricio Zavolinsky
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ # of this software and associated documentation files (the "Software"), to deal
6
+ # in the Software without restriction, including without limitation the rights
7
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ # copies of the Software, and to permit persons to whom the Software is
9
+ # furnished to do so, subject to the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be included in
12
+ # all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ # SOFTWARE.
21
+ #++
22
+
23
+ class Bauxite::Action
24
+ # Asserts that the value of the selected element matches +text+.
25
+ #
26
+ # +text+ is a regular expression. +text+ can be surrounded by +/+
27
+ # characters followed by regular expression flags.
28
+ #
29
+ # For example:
30
+ # # assuming <input type="text" id="hello" value="world" />
31
+ # assert hello world
32
+ # assert hello wor
33
+ # assert hello ^wor
34
+ # assert hello /WorlD/i
35
+ # # => these assertions would pass
36
+ #
37
+ # :category: Action Methods
38
+ def assert(selector, text)
39
+ @ctx.with_timeout Bauxite::Errors::AssertionError do
40
+ @ctx.find(selector) do |e|
41
+ actual = @ctx.get_value(e)
42
+ unless actual =~ _pattern(text)
43
+ raise Bauxite::Errors::AssertionError, "Assertion failed: expected '#{text}', got '#{actual}'"
44
+ end
45
+ true
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,40 @@
1
+ #--
2
+ # Copyright (c) 2014 Patricio Zavolinsky
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ # of this software and associated documentation files (the "Software"), to deal
6
+ # in the Software without restriction, including without limitation the rights
7
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ # copies of the Software, and to permit persons to whom the Software is
9
+ # furnished to do so, subject to the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be included in
12
+ # all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ # SOFTWARE.
21
+ #++
22
+
23
+ class Bauxite::Action
24
+ # Asserts that the +actual+ text matches the +expected+ text.
25
+ #
26
+ # +expected+ can be a regular expression. See #assert for more details.
27
+ #
28
+ # For example:
29
+ # # assuming ctx.variables['myvar'] = 'myvalue1234'
30
+ # assertv "^myvalue\d+$" "${myvar}"
31
+ # # => this assertion would pass
32
+ #
33
+ # :category: Action Methods
34
+ def assertv(expected, actual)
35
+ unless actual =~ _pattern(expected)
36
+ raise Bauxite::Errors::AssertionError, "Assertion failed: '#{actual}' does not match '#{expected}'"
37
+ end
38
+ true
39
+ end
40
+ end