celerity_thingista 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. data/.document +5 -0
  2. data/.gitignore +9 -0
  3. data/.gitmodules +3 -0
  4. data/.travis.yml +4 -0
  5. data/Gemfile +3 -0
  6. data/LICENSE +278 -0
  7. data/README.rdoc +84 -0
  8. data/Rakefile +15 -0
  9. data/benchmark/bm_2000_spans.rb +48 -0
  10. data/benchmark/bm_digg.rb +26 -0
  11. data/benchmark/bm_google_images.rb +36 -0
  12. data/benchmark/bm_input_locator.rb +69 -0
  13. data/benchmark/bm_text_input.rb +19 -0
  14. data/benchmark/loader.rb +14 -0
  15. data/celerity.gemspec +26 -0
  16. data/lib/celerity.rb +75 -0
  17. data/lib/celerity/browser.rb +924 -0
  18. data/lib/celerity/clickable_element.rb +73 -0
  19. data/lib/celerity/collections.rb +164 -0
  20. data/lib/celerity/container.rb +802 -0
  21. data/lib/celerity/default_viewer.rb +14 -0
  22. data/lib/celerity/disabled_element.rb +40 -0
  23. data/lib/celerity/element.rb +314 -0
  24. data/lib/celerity/element_collection.rb +115 -0
  25. data/lib/celerity/element_locator.rb +164 -0
  26. data/lib/celerity/elements/button.rb +54 -0
  27. data/lib/celerity/elements/file_field.rb +29 -0
  28. data/lib/celerity/elements/form.rb +22 -0
  29. data/lib/celerity/elements/frame.rb +86 -0
  30. data/lib/celerity/elements/image.rb +89 -0
  31. data/lib/celerity/elements/label.rb +16 -0
  32. data/lib/celerity/elements/link.rb +43 -0
  33. data/lib/celerity/elements/meta.rb +14 -0
  34. data/lib/celerity/elements/non_control_elements.rb +124 -0
  35. data/lib/celerity/elements/option.rb +38 -0
  36. data/lib/celerity/elements/radio_check.rb +114 -0
  37. data/lib/celerity/elements/select_list.rb +146 -0
  38. data/lib/celerity/elements/table.rb +154 -0
  39. data/lib/celerity/elements/table_cell.rb +36 -0
  40. data/lib/celerity/elements/table_elements.rb +42 -0
  41. data/lib/celerity/elements/table_row.rb +54 -0
  42. data/lib/celerity/elements/text_field.rb +168 -0
  43. data/lib/celerity/exception.rb +83 -0
  44. data/lib/celerity/htmlunit.rb +64 -0
  45. data/lib/celerity/htmlunit/commons-codec-1.7.jar +0 -0
  46. data/lib/celerity/htmlunit/commons-collections-3.2.1.jar +0 -0
  47. data/lib/celerity/htmlunit/commons-io-2.4.jar +0 -0
  48. data/lib/celerity/htmlunit/commons-lang3-3.1.jar +0 -0
  49. data/lib/celerity/htmlunit/commons-logging-1.1.1.jar +0 -0
  50. data/lib/celerity/htmlunit/cssparser-0.9.9.jar +0 -0
  51. data/lib/celerity/htmlunit/htmlunit-2.12.jar +0 -0
  52. data/lib/celerity/htmlunit/htmlunit-core-js-2.12.jar +0 -0
  53. data/lib/celerity/htmlunit/httpclient-4.2.3.jar +0 -0
  54. data/lib/celerity/htmlunit/httpcore-4.2.2.jar +0 -0
  55. data/lib/celerity/htmlunit/httpmime-4.2.3.jar +0 -0
  56. data/lib/celerity/htmlunit/jetty-http-8.1.9.v20130131.jar +0 -0
  57. data/lib/celerity/htmlunit/jetty-io-8.1.9.v20130131.jar +0 -0
  58. data/lib/celerity/htmlunit/jetty-util-8.1.9.v20130131.jar +0 -0
  59. data/lib/celerity/htmlunit/jetty-websocket-8.1.9.v20130131.jar +0 -0
  60. data/lib/celerity/htmlunit/nekohtml-1.9.18.jar +0 -0
  61. data/lib/celerity/htmlunit/sac-1.3.jar +0 -0
  62. data/lib/celerity/htmlunit/serializer-2.7.1.jar +0 -0
  63. data/lib/celerity/htmlunit/xalan-2.7.1.jar +0 -0
  64. data/lib/celerity/htmlunit/xercesImpl-2.10.0.jar +0 -0
  65. data/lib/celerity/htmlunit/xml-apis-1.4.01.jar +0 -0
  66. data/lib/celerity/identifier.rb +28 -0
  67. data/lib/celerity/ignoring_web_connection.rb +15 -0
  68. data/lib/celerity/input_element.rb +25 -0
  69. data/lib/celerity/javascript_debugger.rb +32 -0
  70. data/lib/celerity/listener.rb +143 -0
  71. data/lib/celerity/resources/no_viewer.png +0 -0
  72. data/lib/celerity/short_inspect.rb +29 -0
  73. data/lib/celerity/util.rb +129 -0
  74. data/lib/celerity/version.rb +3 -0
  75. data/lib/celerity/viewer_connection.rb +89 -0
  76. data/lib/celerity/watir_compatibility.rb +70 -0
  77. data/lib/celerity/xpath_support.rb +50 -0
  78. data/spec/browser_authentication_spec.rb +16 -0
  79. data/spec/browser_spec.rb +439 -0
  80. data/spec/button_spec.rb +24 -0
  81. data/spec/clickable_element_spec.rb +39 -0
  82. data/spec/default_viewer_spec.rb +23 -0
  83. data/spec/element_spec.rb +77 -0
  84. data/spec/filefield_spec.rb +18 -0
  85. data/spec/htmlunit_spec.rb +63 -0
  86. data/spec/implementation.rb +7 -0
  87. data/spec/index_offset_spec.rb +24 -0
  88. data/spec/link_spec.rb +16 -0
  89. data/spec/listener_spec.rb +142 -0
  90. data/spec/spec_helper.rb +6 -0
  91. data/spec/table_spec.rb +41 -0
  92. data/spec/watir_compatibility_spec.rb +32 -0
  93. data/tasks/benchmark.rake +4 -0
  94. data/tasks/check.rake +24 -0
  95. data/tasks/clean.rake +3 -0
  96. data/tasks/fix.rake +25 -0
  97. data/tasks/jar.rake +55 -0
  98. data/tasks/rdoc.rake +4 -0
  99. data/tasks/snapshot.rake +25 -0
  100. data/tasks/spec.rake +27 -0
  101. data/tasks/website.rake +10 -0
  102. data/tasks/yard.rake +16 -0
  103. data/website/benchmarks.html +237 -0
  104. data/website/css/color.css +153 -0
  105. data/website/css/hacks.css +3 -0
  106. data/website/css/layout.css +179 -0
  107. data/website/css/screen.css +5 -0
  108. data/website/css/textmate.css +226 -0
  109. data/website/css/typography.css +72 -0
  110. data/website/gfx/body_bg.gif +0 -0
  111. data/website/gfx/button_bg.jpg +0 -0
  112. data/website/gfx/header_bg.jpg +0 -0
  113. data/website/gfx/header_left.jpg +0 -0
  114. data/website/gfx/header_right.jpg +0 -0
  115. data/website/gfx/nav_bg.jpg +0 -0
  116. data/website/index.html +125 -0
  117. data/website/yard/index.html +1 -0
  118. metadata +246 -0
@@ -0,0 +1,153 @@
1
+ * {
2
+ border: 0;
3
+ }
4
+
5
+ a {
6
+
7
+ }
8
+
9
+ a:hover {
10
+
11
+ }
12
+
13
+ body {
14
+ background: rgb(249,249,247) url(../gfx/body_bg.gif) repeat-x top left;
15
+ }
16
+
17
+ abbr, acronym {
18
+ border-bottom: 1px dotted black;
19
+ cursor: help;
20
+ }
21
+
22
+ table {
23
+ border-collapse: collapse;
24
+ }
25
+
26
+ table th {
27
+ border-bottom: 2px solid #000;
28
+ border-top: 2px solid #000;
29
+ }
30
+
31
+ #container {
32
+ border: 1px solid rgb(220,220,208);
33
+ }
34
+
35
+ #header {
36
+ color: #fff;
37
+ background: url(../gfx/header_bg.jpg) repeat-x top left;
38
+ }
39
+
40
+ #header a {
41
+ color: #fff;
42
+ text-decoration: none;
43
+ }
44
+
45
+ #header #leftSlice {
46
+ z-index: 0;
47
+ background: url(../gfx/header_left.jpg) no-repeat top left;
48
+ }
49
+
50
+ #header #rightSlice {
51
+ z-index: 1;
52
+ background: url(../gfx/header_right.jpg) no-repeat top right;
53
+ }
54
+
55
+ #header h1 {
56
+ z-index: 3;
57
+ }
58
+
59
+ #header #tagline {
60
+ z-index: 3;
61
+ }
62
+
63
+ #nav {
64
+ background: #000 url(../gfx/nav_bg.jpg) repeat-x bottom left;
65
+ color: #fff;
66
+ }
67
+
68
+ #nav ul {
69
+ list-style: none;
70
+ }
71
+
72
+ #nav ul li {
73
+
74
+ }
75
+
76
+ #nav ul li a {
77
+ color: rgb(246,200,71);
78
+ text-decoration: none;
79
+ }
80
+
81
+ #nav ul li a:hover {
82
+ color: rgb(244,156,3);
83
+ border-top: 3px solid rgb(244,156,3);
84
+ }
85
+
86
+ #nav ul li a.active {
87
+ color: rgb(244,156,3);
88
+ border-top: 6px solid rgb(244,156,3);
89
+ }
90
+
91
+ #nav ul li a:hover.active {
92
+ color: rgb(244,156,3);
93
+ border-top: 6px solid rgb(244,156,3);
94
+ }
95
+
96
+ #content {
97
+ background: rgb(246,246,246);
98
+ }
99
+
100
+ #footer {
101
+ border: 1px solid rgb(220,220,208);
102
+ background: rgb(250,250,248) url(../gfx/footer_bg.gif) repeat-x bottom left;
103
+ }
104
+
105
+ #footer .w3cbutton {
106
+ border: 0.06em solid #ccc;
107
+ }
108
+
109
+ #footer .w3cbutton .red {
110
+ color: red;
111
+ }
112
+
113
+ #footer .w3cbutton a:link,
114
+ #footer .w3cbutton a:visited,
115
+ #footer .w3cbutton a:hover {
116
+ background-color: #fc6;
117
+ color: black;
118
+ }
119
+
120
+ #footer .w3cbutton span.w3c {
121
+ background-color: white;
122
+ color: #0c479d;
123
+ }
124
+
125
+ #footer .w3cbutton a:link,
126
+ #footer .w3cbutton a:visited,
127
+ #footer .w3cbutton a:hover {
128
+ text-decoration: none;
129
+ }
130
+
131
+ .project {
132
+
133
+ }
134
+
135
+ .project img {
136
+
137
+ }
138
+
139
+ .project a.img {
140
+ border: 1px solid rgb(220,220,208);
141
+ background: #fff;
142
+ }
143
+
144
+ .project a:hover.img {
145
+ border: 1px solid rgb(80,80,80);
146
+ }
147
+
148
+ #download {
149
+ background: url(../gfx/button_bg.jpg) repeat-x top left;
150
+ color: white;
151
+ font-size: 1.5em;
152
+ text-decoration: none;
153
+ }
@@ -0,0 +1,3 @@
1
+ .clearer {
2
+ clear: both;
3
+ }
@@ -0,0 +1,179 @@
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ }
5
+
6
+ a {
7
+
8
+ }
9
+
10
+ a:hover {
11
+
12
+ }
13
+
14
+ body {
15
+ padding: 2em;
16
+ }
17
+
18
+ /*
19
+ .left {
20
+ float: left;
21
+ }
22
+
23
+ .right {
24
+ float: right;
25
+ }
26
+ */
27
+
28
+ table th, table td {
29
+ padding: 0.2em 0.8em;
30
+ }
31
+
32
+ #container {
33
+ margin: 0 auto;
34
+ width: 100%;
35
+ }
36
+
37
+ #header {
38
+ width: 100%;
39
+ height: 193px;
40
+ position: relative;
41
+ overflow: hidden;
42
+ }
43
+
44
+ #header #leftSlice {
45
+ position: absolute;
46
+ top: 0;
47
+ left: 0;
48
+ width: 269px;
49
+ height: 193px;
50
+ }
51
+
52
+ #header #rightSlice {
53
+ position: absolute;
54
+ top: 0;
55
+ right: 0;
56
+ width: 492px;
57
+ height: 193px;
58
+ }
59
+
60
+ #header h1 {
61
+ position: absolute;
62
+ left: 170px;
63
+ top: 20px;
64
+ }
65
+
66
+ #header #tagline {
67
+ position: absolute;
68
+ left: 255px;
69
+ top: 60px;
70
+ }
71
+
72
+ #nav {
73
+ height: 121px;
74
+ overflow: auto;
75
+ }
76
+
77
+ #nav ul {
78
+ height: 90px;
79
+ overflow: auto;
80
+ text-align: center;
81
+ }
82
+
83
+ #nav ul li {
84
+ display: inline;
85
+ white-space: nowrap;
86
+ }
87
+
88
+ #nav ul li a {
89
+ display: inline;
90
+ margin: 0 0.6em;
91
+ height: 40px;
92
+ line-height: 2.05em;
93
+ white-space: nowrap;
94
+ padding-top: 6px;
95
+ }
96
+
97
+ #nav ul li a:hover {
98
+ padding-top: 3px;
99
+ }
100
+
101
+ #nav ul li a.active {
102
+ padding-top: 0;
103
+ }
104
+
105
+ #nav ul li a:hover.active {
106
+ padding-top: 0;
107
+ }
108
+
109
+ #content {
110
+ padding: 0 1em 1em 1em;
111
+ }
112
+
113
+ #content ul {
114
+ list-style-position: inside;
115
+ }
116
+
117
+ #content ul li {
118
+ margin: 0.2em;
119
+ }
120
+
121
+ #content ul li ul li {
122
+ margin-left: 1.5em;
123
+ }
124
+
125
+ #footer {
126
+ margin-top: 1.25em;
127
+ padding: 1em;
128
+ }
129
+
130
+ #footer .w3cbutton {
131
+ line-height: 2em;
132
+ }
133
+
134
+ #footer .w3cbutton span.w3c {
135
+ padding: 0 0.4em;
136
+ }
137
+
138
+ #footer .w3cbutton span.spec {
139
+ padding: 0 0.2em;
140
+ }
141
+
142
+
143
+ ul.projectlist {
144
+ width: 100%;
145
+ list-style: none;
146
+ }
147
+
148
+ .project {
149
+ float: left;
150
+ width: 100%;
151
+ display: block;
152
+ padding-bottom: 1em;
153
+ }
154
+
155
+ .project img {
156
+ float: left;
157
+ }
158
+
159
+ .project a.img {
160
+ padding: 0.5em;
161
+ }
162
+
163
+
164
+ .project.left a.img {
165
+ float: left;
166
+ margin: 0 1em 0 0;
167
+ }
168
+
169
+ .project.right a.img {
170
+ float: right;
171
+ margin: 0 0 0 1em;
172
+ }
173
+
174
+ #download {
175
+ display: block;
176
+ padding: 0.2em 0.4em;
177
+ float: right;
178
+ margin: 0 0 1em 1em;
179
+ }
@@ -0,0 +1,5 @@
1
+ @import url(layout.css);
2
+ @import url(color.css);
3
+ @import url(typography.css);
4
+ @import url(hacks.css);
5
+ @import url(textmate.css);
@@ -0,0 +1,226 @@
1
+ /* Stylesheet generated from TextMate theme
2
+ *
3
+ * Mac Classic
4
+ *
5
+ *
6
+ */
7
+
8
+ /* Mostly to improve view within the TextMate HTML viewer */
9
+ body {
10
+ margin: 0;
11
+ padding: 0;
12
+ }
13
+
14
+ pre.textmate-source {
15
+ margin: 0;
16
+ padding: 0 0 0 2px;
17
+ font-family: "DejaVu Sans Mono", monospace;
18
+ font-size: 14px;
19
+ line-height: 1.3em;
20
+ word-wrap: break-word;
21
+ white-space: pre;
22
+ white-space: pre-wrap;
23
+ white-space: -moz-pre-wrap;
24
+ white-space: -o-pre-wrap;
25
+ }
26
+
27
+ pre.textmate-source.mac_classic {
28
+ color: #000000;
29
+ background: rgb(249,249,247)
30
+ }
31
+
32
+ pre.textmate-source .linenum {
33
+ width: 75px;
34
+ padding: 0.1em 1em 0.2em 0;
35
+ color: #888;
36
+ background-color: #eee;
37
+ }
38
+ pre.textmate-source.mac_classic span {
39
+ padding-top: 0.2em;
40
+ padding-bottom: 0.1em;
41
+ }
42
+ pre.textmate-source.mac_classic ::selection {
43
+ background-color: rgba(77, 151, 255, 0.33);
44
+ }
45
+ /* Comment */
46
+ pre.textmate-source.mac_classic .comment {
47
+ color: #0066FF;
48
+ font-style: italic;
49
+ }
50
+
51
+ /* Keyword */
52
+ pre.textmate-source.mac_classic .keyword, pre.textmate-source.mac_classic .storage {
53
+ color: #0000FF;
54
+ font-weight: bold;
55
+ }
56
+
57
+ /* Number */
58
+ pre.textmate-source.mac_classic .constant_numeric {
59
+ color: #0000CD;
60
+ }
61
+
62
+ /* User-defined constant */
63
+ pre.textmate-source.mac_classic .constant {
64
+ color: #C5060B;
65
+ font-weight: bold;
66
+ }
67
+
68
+ /* Built-in constant */
69
+ pre.textmate-source.mac_classic .constant_language {
70
+ color: #585CF6;
71
+ font-weight: bold;
72
+ }
73
+
74
+ /* Variable */
75
+ pre.textmate-source.mac_classic .variable_language, pre.textmate-source.mac_classic .variable_other {
76
+ color: #318495;
77
+ }
78
+
79
+ /* String */
80
+ pre.textmate-source.mac_classic .string {
81
+ color: #036A07;
82
+ }
83
+
84
+ /* String interpolation */
85
+ pre.textmate-source.mac_classic .constant_character_escape, pre.textmate-source.mac_classic .string .source {
86
+ color: #26B31A;
87
+ }
88
+
89
+ /* Preprocessor line */
90
+ pre.textmate-source.mac_classic .meta_preprocessor {
91
+ color: #1A921C;
92
+ }
93
+
94
+ /* Preprocessor directive */
95
+ pre.textmate-source.mac_classic .keyword_control_import {
96
+ color: #0C450D;
97
+ font-weight: bold;
98
+ }
99
+
100
+ /* Function name */
101
+ pre.textmate-source.mac_classic .entity_name_function, pre.textmate-source.mac_classic .support_function_any-method {
102
+ color: #0000A2;
103
+ font-weight: bold;
104
+ }
105
+
106
+ /* Type name */
107
+ pre.textmate-source.mac_classic .entity_name_type {
108
+ text-decoration: underline;
109
+ }
110
+
111
+ /* Inherited class name */
112
+ pre.textmate-source.mac_classic .entity_other_inherited-class {
113
+ font-style: italic;
114
+ }
115
+
116
+ /* Function parameter */
117
+ pre.textmate-source.mac_classic .variable_parameter {
118
+ font-style: italic;
119
+ }
120
+
121
+ /* Function argument and result types */
122
+ pre.textmate-source.mac_classic .storage_type_method {
123
+ color: #70727E;
124
+ }
125
+
126
+ /* Section */
127
+ pre.textmate-source.mac_classic .meta_section .entity_name_section, pre.textmate-source.mac_classic .declaration_section .entity_name_section {
128
+ font-style: italic;
129
+ }
130
+
131
+ /* Library function */
132
+ pre.textmate-source.mac_classic .support_function {
133
+ color: #3C4C72;
134
+ font-weight: bold;
135
+ }
136
+
137
+ /* Library object */
138
+ pre.textmate-source.mac_classic .support_class, pre.textmate-source.mac_classic .support_type {
139
+ color: #6D79DE;
140
+ font-weight: bold;
141
+ }
142
+
143
+ /* Library constant */
144
+ pre.textmate-source.mac_classic .support_constant {
145
+ color: #06960E;
146
+ font-weight: bold;
147
+ }
148
+
149
+ /* Library variable */
150
+ pre.textmate-source.mac_classic .support_variable {
151
+ color: #21439C;
152
+ font-weight: bold;
153
+ }
154
+
155
+ /* JS: Operator */
156
+ pre.textmate-source.mac_classic .keyword_operator_js {
157
+ color: #687687;
158
+ }
159
+
160
+ /* Invalid */
161
+ pre.textmate-source.mac_classic .invalid {
162
+ color: #FFFFFF;
163
+ background-color: #990000;
164
+ }
165
+
166
+ /* Invalid trailing whitespace */
167
+ pre.textmate-source.mac_classic .invalid_deprecated_trailing-whitespace {
168
+ background-color: #FFD0D0;
169
+ }
170
+
171
+ /* Embedded source */
172
+ pre.textmate-source.mac_classic .text .source, pre.textmate-source.mac_classic .string_unquoted {
173
+ background-color: rgba(0, 0, 0, 0.05);
174
+ }
175
+
176
+ /* Embedded embedded source */
177
+ pre.textmate-source.mac_classic .text .source .string_unquoted, pre.textmate-source.mac_classic .text .source .text .source {
178
+ background-color: rgba(0, 0, 0, 0.06);
179
+ }
180
+
181
+ /* Markup XML declaration */
182
+ pre.textmate-source.mac_classic .meta_tag_preprocessor_xml {
183
+ color: #68685B;
184
+ }
185
+
186
+ /* Markup DOCTYPE */
187
+ pre.textmate-source.mac_classic .meta_tag_sgml_doctype, pre.textmate-source.mac_classic .meta_tag_sgml_doctype .entity, pre.textmate-source.mac_classic .meta_tag_sgml_doctype .string, pre.textmate-source.mac_classic .meta_tag_preprocessor_xml, pre.textmate-source.mac_classic .meta_tag_preprocessor_xml .entity, pre.textmate-source.mac_classic .meta_tag_preprocessor_xml .string {
188
+ color: #888888;
189
+ }
190
+
191
+ /* Markup DTD */
192
+ pre.textmate-source.mac_classic .string_quoted_docinfo_doctype_DTD {
193
+ font-style: italic;
194
+ }
195
+
196
+ /* Markup tag */
197
+ pre.textmate-source.mac_classic .meta_tag, pre.textmate-source.mac_classic .declaration_tag {
198
+ color: #1C02FF;
199
+ }
200
+
201
+ /* Markup name of tag */
202
+ pre.textmate-source.mac_classic .entity_name_tag {
203
+ font-weight: bold;
204
+ }
205
+
206
+ /* Markup tag attribute */
207
+ pre.textmate-source.mac_classic .entity_other_attribute-name {
208
+ font-style: italic;
209
+ }
210
+
211
+ /* Markup: Heading */
212
+ pre.textmate-source.mac_classic .markup_heading {
213
+ color: #0C07FF;
214
+ font-weight: bold;
215
+ }
216
+
217
+ /* Markup: Quote */
218
+ pre.textmate-source.mac_classic .markup_quote {
219
+ color: #000000;
220
+ font-style: italic;
221
+ }
222
+
223
+ /* Markup: List */
224
+ pre.textmate-source.mac_classic .markup_list {
225
+ color: #B90690;
226
+ }