watir 6.10.0 → 6.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (280) hide show
  1. checksums.yaml +4 -4
  2. data/.document +5 -5
  3. data/.github/ISSUE_TEMPLATE.md +16 -16
  4. data/.gitignore +21 -21
  5. data/.travis.yml +72 -72
  6. data/CHANGES.md +6 -0
  7. data/Gemfile +16 -16
  8. data/LICENSE +23 -23
  9. data/README.md +106 -106
  10. data/Rakefile +153 -153
  11. data/appveyor.yml +13 -13
  12. data/lib/watir-webdriver.rb +2 -2
  13. data/lib/watir.rb +158 -158
  14. data/lib/watir/adjacent.rb +126 -126
  15. data/lib/watir/after_hooks.rb +132 -132
  16. data/lib/watir/alert.rb +120 -120
  17. data/lib/watir/aliases.rb +6 -6
  18. data/lib/watir/attribute_helper.rb +96 -96
  19. data/lib/watir/browser.rb +349 -349
  20. data/lib/watir/capabilities.rb +123 -123
  21. data/lib/watir/cell_container.rb +25 -25
  22. data/lib/watir/container.rb +51 -51
  23. data/lib/watir/cookies.rb +134 -134
  24. data/lib/watir/element_collection.rb +138 -138
  25. data/lib/watir/elements/area.rb +12 -12
  26. data/lib/watir/elements/button.rb +37 -37
  27. data/lib/watir/elements/cell.rb +17 -17
  28. data/lib/watir/elements/checkbox.rb +56 -56
  29. data/lib/watir/elements/dlist.rb +12 -12
  30. data/lib/watir/elements/element.rb +6 -5
  31. data/lib/watir/elements/file_field.rb +41 -41
  32. data/lib/watir/elements/font.rb +25 -25
  33. data/lib/watir/elements/form.rb +16 -16
  34. data/lib/watir/elements/hidden.rb +25 -25
  35. data/lib/watir/elements/html_elements.rb +2035 -2035
  36. data/lib/watir/elements/iframe.rb +166 -166
  37. data/lib/watir/elements/image.rb +21 -21
  38. data/lib/watir/elements/input.rb +15 -15
  39. data/lib/watir/elements/link.rb +18 -18
  40. data/lib/watir/elements/list.rb +49 -49
  41. data/lib/watir/elements/option.rb +72 -72
  42. data/lib/watir/elements/radio.rb +60 -60
  43. data/lib/watir/elements/row.rb +17 -17
  44. data/lib/watir/elements/select.rb +250 -250
  45. data/lib/watir/elements/svg_elements.rb +613 -613
  46. data/lib/watir/elements/table.rb +76 -76
  47. data/lib/watir/elements/table_cell.rb +31 -31
  48. data/lib/watir/elements/table_row.rb +32 -32
  49. data/lib/watir/elements/table_section.rb +15 -15
  50. data/lib/watir/elements/text_area.rb +5 -5
  51. data/lib/watir/elements/text_field.rb +39 -39
  52. data/lib/watir/exception.rb +16 -16
  53. data/lib/watir/extensions/nokogiri.rb +14 -14
  54. data/lib/watir/generator.rb +3 -3
  55. data/lib/watir/generator/base.rb +11 -11
  56. data/lib/watir/generator/base/generator.rb +115 -115
  57. data/lib/watir/generator/base/idl_sorter.rb +47 -47
  58. data/lib/watir/generator/base/spec_extractor.rb +138 -138
  59. data/lib/watir/generator/base/util.rb +21 -21
  60. data/lib/watir/generator/base/visitor.rb +162 -162
  61. data/lib/watir/generator/html.rb +15 -15
  62. data/lib/watir/generator/html/generator.rb +36 -36
  63. data/lib/watir/generator/html/spec_extractor.rb +50 -50
  64. data/lib/watir/generator/html/visitor.rb +21 -21
  65. data/lib/watir/generator/svg.rb +7 -7
  66. data/lib/watir/generator/svg/generator.rb +38 -38
  67. data/lib/watir/generator/svg/spec_extractor.rb +53 -53
  68. data/lib/watir/generator/svg/visitor.rb +21 -21
  69. data/lib/watir/has_window.rb +68 -68
  70. data/lib/watir/js_execution.rb +143 -143
  71. data/lib/watir/js_snippets.rb +16 -16
  72. data/lib/watir/js_snippets/backgroundColor.js +7 -7
  73. data/lib/watir/js_snippets/fireEvent.js +31 -31
  74. data/lib/watir/js_snippets/focus.js +3 -3
  75. data/lib/watir/js_snippets/getInnerHtml.js +19 -19
  76. data/lib/watir/js_snippets/getInnerText.js +19 -19
  77. data/lib/watir/js_snippets/getOuterHtml.js +20 -20
  78. data/lib/watir/js_snippets/getTextContent.js +19 -19
  79. data/lib/watir/js_snippets/isImageLoaded.js +3 -3
  80. data/lib/watir/js_snippets/selectOptionsLabel.js +10 -10
  81. data/lib/watir/js_snippets/selectOptionsText.js +10 -10
  82. data/lib/watir/js_snippets/selectOptionsValue.js +10 -10
  83. data/lib/watir/js_snippets/selectText.js +64 -64
  84. data/lib/watir/js_snippets/selectedOptions.js +11 -11
  85. data/lib/watir/js_snippets/setValue.js +3 -3
  86. data/lib/watir/legacy_wait.rb +126 -126
  87. data/lib/watir/locators.rb +60 -60
  88. data/lib/watir/locators/button/locator.rb +31 -31
  89. data/lib/watir/locators/button/selector_builder.rb +30 -30
  90. data/lib/watir/locators/button/selector_builder/xpath.rb +29 -29
  91. data/lib/watir/locators/button/validator.rb +15 -15
  92. data/lib/watir/locators/cell/locator.rb +15 -15
  93. data/lib/watir/locators/cell/selector_builder.rb +24 -24
  94. data/lib/watir/locators/element/locator.rb +1 -0
  95. data/lib/watir/locators/element/selector_builder.rb +150 -150
  96. data/lib/watir/locators/element/selector_builder/xpath.rb +119 -119
  97. data/lib/watir/locators/element/validator.rb +18 -18
  98. data/lib/watir/locators/row/locator.rb +15 -15
  99. data/lib/watir/locators/row/selector_builder.rb +29 -29
  100. data/lib/watir/locators/text_area/locator.rb +13 -13
  101. data/lib/watir/locators/text_area/selector_builder.rb +22 -22
  102. data/lib/watir/locators/text_field/locator.rb +30 -30
  103. data/lib/watir/locators/text_field/selector_builder.rb +31 -31
  104. data/lib/watir/locators/text_field/selector_builder/xpath.rb +17 -17
  105. data/lib/watir/locators/text_field/validator.rb +12 -12
  106. data/lib/watir/logger.rb +109 -109
  107. data/lib/watir/radio_set.rb +231 -231
  108. data/lib/watir/row_container.rb +36 -36
  109. data/lib/watir/screenshot.rb +50 -50
  110. data/lib/watir/user_editable.rb +56 -56
  111. data/lib/watir/wait.rb +200 -200
  112. data/lib/watir/wait/timer.rb +52 -52
  113. data/lib/watir/window.rb +257 -257
  114. data/lib/watir/xpath_support.rb +20 -20
  115. data/lib/watirspec.rb +86 -86
  116. data/lib/watirspec/guards.rb +60 -60
  117. data/lib/watirspec/implementation.rb +51 -51
  118. data/lib/watirspec/rake_tasks.rb +115 -115
  119. data/lib/watirspec/remote_server.rb +38 -38
  120. data/lib/watirspec/runner.rb +53 -53
  121. data/lib/watirspec/server.rb +99 -99
  122. data/lib/watirspec/server/app.rb +76 -76
  123. data/spec/browser_spec.rb +278 -278
  124. data/spec/click_spec.rb +19 -19
  125. data/spec/container_spec.rb +34 -34
  126. data/spec/element_locator_spec.rb +517 -517
  127. data/spec/element_spec.rb +158 -158
  128. data/spec/implementation_spec.rb +24 -24
  129. data/spec/input_spec.rb +14 -14
  130. data/spec/locator_spec_helper.rb +55 -55
  131. data/spec/logger_spec.rb +46 -46
  132. data/spec/spec_helper.rb +22 -22
  133. data/spec/special_chars_spec.rb +13 -13
  134. data/spec/watirspec/adjacent_spec.rb +227 -227
  135. data/spec/watirspec/after_hooks_spec.rb +182 -182
  136. data/spec/watirspec/alert_spec.rb +108 -108
  137. data/spec/watirspec/attributes_spec.rb +16 -16
  138. data/spec/watirspec/browser_spec.rb +281 -281
  139. data/spec/watirspec/cookies_spec.rb +154 -154
  140. data/spec/watirspec/drag_and_drop_spec.rb +49 -49
  141. data/spec/watirspec/element_hidden_spec.rb +75 -75
  142. data/spec/watirspec/elements/area_spec.rb +72 -72
  143. data/spec/watirspec/elements/areas_spec.rb +42 -42
  144. data/spec/watirspec/elements/button_spec.rb +277 -277
  145. data/spec/watirspec/elements/buttons_spec.rb +55 -55
  146. data/spec/watirspec/elements/checkbox_spec.rb +275 -275
  147. data/spec/watirspec/elements/checkboxes_spec.rb +44 -44
  148. data/spec/watirspec/elements/collections_spec.rb +52 -52
  149. data/spec/watirspec/elements/dd_spec.rb +124 -124
  150. data/spec/watirspec/elements/dds_spec.rb +42 -42
  151. data/spec/watirspec/elements/del_spec.rb +126 -126
  152. data/spec/watirspec/elements/dels_spec.rb +40 -40
  153. data/spec/watirspec/elements/div_spec.rb +245 -245
  154. data/spec/watirspec/elements/divs_spec.rb +42 -42
  155. data/spec/watirspec/elements/dl_spec.rb +142 -142
  156. data/spec/watirspec/elements/dls_spec.rb +43 -43
  157. data/spec/watirspec/elements/dt_spec.rb +122 -122
  158. data/spec/watirspec/elements/dts_spec.rb +42 -42
  159. data/spec/watirspec/elements/element_spec.rb +483 -483
  160. data/spec/watirspec/elements/elements_spec.rb +47 -47
  161. data/spec/watirspec/elements/em_spec.rb +96 -96
  162. data/spec/watirspec/elements/ems_spec.rb +43 -43
  163. data/spec/watirspec/elements/filefield_spec.rb +170 -170
  164. data/spec/watirspec/elements/filefields_spec.rb +43 -43
  165. data/spec/watirspec/elements/font_spec.rb +29 -29
  166. data/spec/watirspec/elements/form_spec.rb +66 -66
  167. data/spec/watirspec/elements/forms_spec.rb +46 -46
  168. data/spec/watirspec/elements/frame_spec.rb +123 -123
  169. data/spec/watirspec/elements/frames_spec.rb +41 -41
  170. data/spec/watirspec/elements/hidden_spec.rb +104 -104
  171. data/spec/watirspec/elements/hiddens_spec.rb +43 -43
  172. data/spec/watirspec/elements/hn_spec.rb +92 -92
  173. data/spec/watirspec/elements/hns_spec.rb +38 -38
  174. data/spec/watirspec/elements/iframe_spec.rb +10 -0
  175. data/spec/watirspec/elements/iframes_spec.rb +47 -47
  176. data/spec/watirspec/elements/image_spec.rb +158 -158
  177. data/spec/watirspec/elements/images_spec.rb +40 -40
  178. data/spec/watirspec/elements/ins_spec.rb +127 -127
  179. data/spec/watirspec/elements/inses_spec.rb +40 -40
  180. data/spec/watirspec/elements/label_spec.rb +75 -75
  181. data/spec/watirspec/elements/labels_spec.rb +40 -40
  182. data/spec/watirspec/elements/li_spec.rb +111 -111
  183. data/spec/watirspec/elements/link_spec.rb +171 -171
  184. data/spec/watirspec/elements/links_spec.rb +44 -44
  185. data/spec/watirspec/elements/lis_spec.rb +42 -42
  186. data/spec/watirspec/elements/list_spec.rb +32 -32
  187. data/spec/watirspec/elements/map_spec.rb +75 -75
  188. data/spec/watirspec/elements/maps_spec.rb +41 -41
  189. data/spec/watirspec/elements/meta_spec.rb +23 -23
  190. data/spec/watirspec/elements/metas_spec.rb +40 -40
  191. data/spec/watirspec/elements/ol_spec.rb +87 -87
  192. data/spec/watirspec/elements/ols_spec.rb +40 -40
  193. data/spec/watirspec/elements/option_spec.rb +121 -121
  194. data/spec/watirspec/elements/p_spec.rb +111 -111
  195. data/spec/watirspec/elements/pre_spec.rb +111 -111
  196. data/spec/watirspec/elements/pres_spec.rb +40 -40
  197. data/spec/watirspec/elements/ps_spec.rb +40 -40
  198. data/spec/watirspec/elements/radio_spec.rb +273 -273
  199. data/spec/watirspec/elements/radios_spec.rb +43 -43
  200. data/spec/watirspec/elements/select_list_spec.rb +553 -553
  201. data/spec/watirspec/elements/select_lists_spec.rb +46 -46
  202. data/spec/watirspec/elements/span_spec.rb +128 -128
  203. data/spec/watirspec/elements/spans_spec.rb +40 -40
  204. data/spec/watirspec/elements/strong_spec.rb +88 -88
  205. data/spec/watirspec/elements/strongs_spec.rb +43 -43
  206. data/spec/watirspec/elements/table_nesting_spec.rb +51 -51
  207. data/spec/watirspec/elements/table_spec.rb +156 -156
  208. data/spec/watirspec/elements/tables_spec.rb +42 -42
  209. data/spec/watirspec/elements/tbody_spec.rb +93 -93
  210. data/spec/watirspec/elements/tbodys_spec.rb +62 -62
  211. data/spec/watirspec/elements/td_spec.rb +93 -93
  212. data/spec/watirspec/elements/tds_spec.rb +53 -53
  213. data/spec/watirspec/elements/text_field_spec.rb +360 -360
  214. data/spec/watirspec/elements/text_fields_spec.rb +44 -44
  215. data/spec/watirspec/elements/textarea_spec.rb +26 -26
  216. data/spec/watirspec/elements/textareas_spec.rb +24 -24
  217. data/spec/watirspec/elements/tfoot_spec.rb +86 -86
  218. data/spec/watirspec/elements/tfoots_spec.rb +68 -68
  219. data/spec/watirspec/elements/thead_spec.rb +86 -86
  220. data/spec/watirspec/elements/theads_spec.rb +68 -68
  221. data/spec/watirspec/elements/tr_spec.rb +78 -78
  222. data/spec/watirspec/elements/trs_spec.rb +61 -61
  223. data/spec/watirspec/elements/ul_spec.rb +76 -76
  224. data/spec/watirspec/elements/uls_spec.rb +39 -39
  225. data/spec/watirspec/html/alerts.html +12 -12
  226. data/spec/watirspec/html/aria_attributes.html +9 -9
  227. data/spec/watirspec/html/class_locator.html +8 -8
  228. data/spec/watirspec/html/clicks.html +19 -19
  229. data/spec/watirspec/html/closeable.html +12 -12
  230. data/spec/watirspec/html/collections.html +14 -14
  231. data/spec/watirspec/html/css/jquery-ui-1.8.17.custom.css +286 -286
  232. data/spec/watirspec/html/data_attributes.html +9 -9
  233. data/spec/watirspec/html/definition_lists.html +47 -47
  234. data/spec/watirspec/html/drag_and_drop.html +106 -106
  235. data/spec/watirspec/html/font.html +10 -10
  236. data/spec/watirspec/html/forms_with_input_elements.html +174 -174
  237. data/spec/watirspec/html/frame_1.html +22 -22
  238. data/spec/watirspec/html/frame_2.html +15 -15
  239. data/spec/watirspec/html/frames.html +10 -10
  240. data/spec/watirspec/html/hover.html +11 -11
  241. data/spec/watirspec/html/iframe_1.html +22 -22
  242. data/spec/watirspec/html/iframes.html +12 -12
  243. data/spec/watirspec/html/images.html +27 -27
  244. data/spec/watirspec/html/inner_outer.html +4 -4
  245. data/spec/watirspec/html/javascript/angular.min.js +331 -331
  246. data/spec/watirspec/html/javascript/helpers.js +16 -16
  247. data/spec/watirspec/html/javascript/jquery-1.7.1.min.js +3 -3
  248. data/spec/watirspec/html/javascript/jquery-ui-1.8.17.custom.min.js +67 -67
  249. data/spec/watirspec/html/keylogger.html +14 -14
  250. data/spec/watirspec/html/modal_dialog.html +9 -9
  251. data/spec/watirspec/html/multiple_ids.html +14 -14
  252. data/spec/watirspec/html/nested_elements.html +33 -33
  253. data/spec/watirspec/html/nested_frame_2.html +9 -9
  254. data/spec/watirspec/html/nested_frame_3.html +14 -14
  255. data/spec/watirspec/html/nested_frames.html +10 -10
  256. data/spec/watirspec/html/nested_iframe_2.html +12 -12
  257. data/spec/watirspec/html/nested_iframes.html +13 -13
  258. data/spec/watirspec/html/nested_tables.html +202 -202
  259. data/spec/watirspec/html/non_control_elements.html +140 -140
  260. data/spec/watirspec/html/removed_element.html +24 -24
  261. data/spec/watirspec/html/right_click.html +10 -10
  262. data/spec/watirspec/html/special_chars.html +11 -11
  263. data/spec/watirspec/html/tables.html +120 -120
  264. data/spec/watirspec/html/timeout_window_location.html +19 -19
  265. data/spec/watirspec/html/uneven_table.html +20 -20
  266. data/spec/watirspec/html/wait.html +84 -84
  267. data/spec/watirspec/html/window_switching.html +11 -11
  268. data/spec/watirspec/radio_set_spec.rb +336 -336
  269. data/spec/watirspec/relaxed_locate_spec.rb +99 -99
  270. data/spec/watirspec/screenshot_spec.rb +29 -29
  271. data/spec/watirspec/support/raise_exception_matchers.rb +36 -36
  272. data/spec/watirspec/wait_spec.rb +381 -381
  273. data/spec/watirspec/window_switching_spec.rb +415 -415
  274. data/spec/watirspec_helper.rb +161 -161
  275. data/support/appveyor.cmd +9 -9
  276. data/support/doctest_helper.rb +101 -101
  277. data/support/travis.sh +11 -11
  278. data/support/version_differ.rb +59 -59
  279. data/watir.gemspec +1 -1
  280. metadata +4 -170
@@ -1,20 +1,20 @@
1
- // Copyright 2011 Software Freedom Conservatory
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
-
14
- // This code was built by the Selenium code base
15
- // See https://github.com/SeleniumHQ/selenium/tree/master/javascript/watir-atoms
16
-
17
- function(){return function(){var d=this;function e(a,b){function c(){}c.prototype=b.prototype;a.b=b.prototype;a.prototype=new c};function f(a){this.stack=Error().stack||"";if(a)this.message=String(a)}e(f,Error);function i(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a}
18
- function j(a,b){var c=0,A=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),B=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),H=Math.max(A.length,B.length);for(var l=0;c==0&&l<H;l++){var I=A[l]||"",J=B[l]||"",K=RegExp("(\\d*)(\\D*)","g"),L=RegExp("(\\d*)(\\D*)","g");do{var g=K.exec(I)||["","",""],h=L.exec(J)||["","",""];if(g[0].length==0&&h[0].length==0)break;c=k(g[1].length==0?0:parseInt(g[1],10),h[1].length==0?0:parseInt(h[1],10))||k(g[2].length==0,h[2].length==0)||k(g[2],h[2])}while(c==
19
- 0)}return c}function k(a,b){if(a<b)return-1;else if(a>b)return 1;return 0};e(function(a,b){b.unshift(a);f.call(this,i.apply(null,b));b.shift();this.a=a},f);var m,n,o,p;function q(){return d.navigator?d.navigator.userAgent:null}p=o=n=m=false;var r;if(r=q()){var s=d.navigator;m=r.indexOf("Opera")==0;n=!m&&r.indexOf("MSIE")!=-1;o=!m&&r.indexOf("WebKit")!=-1;p=!m&&!o&&s.product=="Gecko"}var t=n,u=p,v=o,w;
20
- a:{var x="",y;if(m&&d.opera){var z=d.opera.version;x=typeof z=="function"?z():z}else{if(u)y=/rv\:([^\);]+)(\)|;)/;else if(t)y=/MSIE\s+([^\);]+)(\)|;)/;else if(v)y=/WebKit\/(\S+)/;if(y){var C=y.exec(q());x=C?C[1]:""}}if(t){var D,E=d.document;D=E?E.documentMode:undefined;if(D>parseFloat(x)){w=String(D);break a}}w=x}var F={};!t||F["9"]||(F["9"]=j(w,"9")>=0);t&&(F["9"]||(F["9"]=j(w,"9")>=0));function G(a){if("outerHTML"in a)return a.outerHTML;else{var b=(a.nodeType==9?a:a.ownerDocument||a.document).createElement("div");b.appendChild(a.cloneNode(true));return b.innerHTML}}var M="_".split("."),N=d;!(M[0]in N)&&N.execScript&&N.execScript("var "+M[0]);for(var O;M.length&&(O=M.shift());)if(!M.length&&G!==undefined)N[O]=G;else N=N[O]?N[O]:N[O]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
1
+ // Copyright 2011 Software Freedom Conservatory
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+
14
+ // This code was built by the Selenium code base
15
+ // See https://github.com/SeleniumHQ/selenium/tree/master/javascript/watir-atoms
16
+
17
+ function(){return function(){var d=this;function e(a,b){function c(){}c.prototype=b.prototype;a.b=b.prototype;a.prototype=new c};function f(a){this.stack=Error().stack||"";if(a)this.message=String(a)}e(f,Error);function i(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a}
18
+ function j(a,b){var c=0,A=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),B=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),H=Math.max(A.length,B.length);for(var l=0;c==0&&l<H;l++){var I=A[l]||"",J=B[l]||"",K=RegExp("(\\d*)(\\D*)","g"),L=RegExp("(\\d*)(\\D*)","g");do{var g=K.exec(I)||["","",""],h=L.exec(J)||["","",""];if(g[0].length==0&&h[0].length==0)break;c=k(g[1].length==0?0:parseInt(g[1],10),h[1].length==0?0:parseInt(h[1],10))||k(g[2].length==0,h[2].length==0)||k(g[2],h[2])}while(c==
19
+ 0)}return c}function k(a,b){if(a<b)return-1;else if(a>b)return 1;return 0};e(function(a,b){b.unshift(a);f.call(this,i.apply(null,b));b.shift();this.a=a},f);var m,n,o,p;function q(){return d.navigator?d.navigator.userAgent:null}p=o=n=m=false;var r;if(r=q()){var s=d.navigator;m=r.indexOf("Opera")==0;n=!m&&r.indexOf("MSIE")!=-1;o=!m&&r.indexOf("WebKit")!=-1;p=!m&&!o&&s.product=="Gecko"}var t=n,u=p,v=o,w;
20
+ a:{var x="",y;if(m&&d.opera){var z=d.opera.version;x=typeof z=="function"?z():z}else{if(u)y=/rv\:([^\);]+)(\)|;)/;else if(t)y=/MSIE\s+([^\);]+)(\)|;)/;else if(v)y=/WebKit\/(\S+)/;if(y){var C=y.exec(q());x=C?C[1]:""}}if(t){var D,E=d.document;D=E?E.documentMode:undefined;if(D>parseFloat(x)){w=String(D);break a}}w=x}var F={};!t||F["9"]||(F["9"]=j(w,"9")>=0);t&&(F["9"]||(F["9"]=j(w,"9")>=0));function G(a){if("outerHTML"in a)return a.outerHTML;else{var b=(a.nodeType==9?a:a.ownerDocument||a.document).createElement("div");b.appendChild(a.cloneNode(true));return b.innerHTML}}var M="_".split("."),N=d;!(M[0]in N)&&N.execScript&&N.execScript("var "+M[0]);for(var O;M.length&&(O=M.shift());)if(!M.length&&G!==undefined)N[O]=G;else N=N[O]?N[O]:N[O]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
@@ -1,19 +1,19 @@
1
- // Copyright 2011 Software Freedom Conservatory
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
-
14
- // This code is a modification getOuterHtml.js which was built by the Selenium code base
15
-
16
- function(){return function(){var d=this;function e(a,b){function c(){}c.prototype=b.prototype;a.b=b.prototype;a.prototype=new c};function f(a){this.stack=Error().stack||"";if(a)this.message=String(a)}e(f,Error);function i(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a}
17
- function j(a,b){var c=0,A=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),B=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),H=Math.max(A.length,B.length);for(var l=0;c==0&&l<H;l++){var I=A[l]||"",J=B[l]||"",K=RegExp("(\\d*)(\\D*)","g"),L=RegExp("(\\d*)(\\D*)","g");do{var g=K.exec(I)||["","",""],h=L.exec(J)||["","",""];if(g[0].length==0&&h[0].length==0)break;c=k(g[1].length==0?0:parseInt(g[1],10),h[1].length==0?0:parseInt(h[1],10))||k(g[2].length==0,h[2].length==0)||k(g[2],h[2])}while(c==
18
- 0)}return c}function k(a,b){if(a<b)return-1;else if(a>b)return 1;return 0};e(function(a,b){b.unshift(a);f.call(this,i.apply(null,b));b.shift();this.a=a},f);var m,n,o,p;function q(){return d.navigator?d.navigator.userAgent:null}p=o=n=m=false;var r;if(r=q()){var s=d.navigator;m=r.indexOf("Opera")==0;n=!m&&r.indexOf("MSIE")!=-1;o=!m&&r.indexOf("WebKit")!=-1;p=!m&&!o&&s.product=="Gecko"}var t=n,u=p,v=o,w;
19
- a:{var x="",y;if(m&&d.opera){var z=d.opera.version;x=typeof z=="function"?z():z}else{if(u)y=/rv\:([^\);]+)(\)|;)/;else if(t)y=/MSIE\s+([^\);]+)(\)|;)/;else if(v)y=/WebKit\/(\S+)/;if(y){var C=y.exec(q());x=C?C[1]:""}}if(t){var D,E=d.document;D=E?E.documentMode:undefined;if(D>parseFloat(x)){w=String(D);break a}}w=x}var F={};!t||F["9"]||(F["9"]=j(w,"9")>=0);t&&(F["9"]||(F["9"]=j(w,"9")>=0));function G(a){if("textcontent"in a)return a.textContent;else{var b=(a.nodeType==9?a:a.ownerDocument||a.document).createElement("div");b.appendChild(a.cloneNode(true));return b.textContent}}var M="_".split("."),N=d;!(M[0]in N)&&N.execScript&&N.execScript("var "+M[0]);for(var O;M.length&&(O=M.shift());)if(!M.length&&G!==undefined)N[O]=G;else N=N[O]?N[O]:N[O]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
1
+ // Copyright 2011 Software Freedom Conservatory
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+
14
+ // This code is a modification getOuterHtml.js which was built by the Selenium code base
15
+
16
+ function(){return function(){var d=this;function e(a,b){function c(){}c.prototype=b.prototype;a.b=b.prototype;a.prototype=new c};function f(a){this.stack=Error().stack||"";if(a)this.message=String(a)}e(f,Error);function i(a){for(var b=1;b<arguments.length;b++){var c=String(arguments[b]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,c)}return a}
17
+ function j(a,b){var c=0,A=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),B=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),H=Math.max(A.length,B.length);for(var l=0;c==0&&l<H;l++){var I=A[l]||"",J=B[l]||"",K=RegExp("(\\d*)(\\D*)","g"),L=RegExp("(\\d*)(\\D*)","g");do{var g=K.exec(I)||["","",""],h=L.exec(J)||["","",""];if(g[0].length==0&&h[0].length==0)break;c=k(g[1].length==0?0:parseInt(g[1],10),h[1].length==0?0:parseInt(h[1],10))||k(g[2].length==0,h[2].length==0)||k(g[2],h[2])}while(c==
18
+ 0)}return c}function k(a,b){if(a<b)return-1;else if(a>b)return 1;return 0};e(function(a,b){b.unshift(a);f.call(this,i.apply(null,b));b.shift();this.a=a},f);var m,n,o,p;function q(){return d.navigator?d.navigator.userAgent:null}p=o=n=m=false;var r;if(r=q()){var s=d.navigator;m=r.indexOf("Opera")==0;n=!m&&r.indexOf("MSIE")!=-1;o=!m&&r.indexOf("WebKit")!=-1;p=!m&&!o&&s.product=="Gecko"}var t=n,u=p,v=o,w;
19
+ a:{var x="",y;if(m&&d.opera){var z=d.opera.version;x=typeof z=="function"?z():z}else{if(u)y=/rv\:([^\);]+)(\)|;)/;else if(t)y=/MSIE\s+([^\);]+)(\)|;)/;else if(v)y=/WebKit\/(\S+)/;if(y){var C=y.exec(q());x=C?C[1]:""}}if(t){var D,E=d.document;D=E?E.documentMode:undefined;if(D>parseFloat(x)){w=String(D);break a}}w=x}var F={};!t||F["9"]||(F["9"]=j(w,"9")>=0);t&&(F["9"]||(F["9"]=j(w,"9")>=0));function G(a){if("textcontent"in a)return a.textContent;else{var b=(a.nodeType==9?a:a.ownerDocument||a.document).createElement("div");b.appendChild(a.cloneNode(true));return b.textContent}}var M="_".split("."),N=d;!(M[0]in N)&&N.execScript&&N.execScript("var "+M[0]);for(var O;M.length&&(O=M.shift());)if(!M.length&&G!==undefined)N[O]=G;else N=N[O]?N[O]:N[O]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
@@ -1,3 +1,3 @@
1
- function(){
2
- return typeof arguments[0].naturalWidth != "undefined" && arguments[0].naturalWidth > 0
3
- }
1
+ function(){
2
+ return typeof arguments[0].naturalWidth != "undefined" && arguments[0].naturalWidth > 0
3
+ }
@@ -1,10 +1,10 @@
1
- function(){
2
- for(var i=0; i<arguments[0].options.length; i++) {
3
- if ( arguments[0].options[i].label.match(arguments[1]) ) {
4
- arguments[0].options[i].selected = true;
5
- if ( arguments[2] == 'single' ) {
6
- break;
7
- }
8
- }
9
- }
10
- }
1
+ function(){
2
+ for(var i=0; i<arguments[0].options.length; i++) {
3
+ if ( arguments[0].options[i].label.match(arguments[1]) ) {
4
+ arguments[0].options[i].selected = true;
5
+ if ( arguments[2] == 'single' ) {
6
+ break;
7
+ }
8
+ }
9
+ }
10
+ }
@@ -1,10 +1,10 @@
1
- function(){
2
- for(var i=0; i<arguments[0].options.length; i++) {
3
- if ( arguments[0].options[i].text.match(arguments[1]) ) {
4
- arguments[0].options[i].selected = true;
5
- if ( arguments[2] == 'single' ) {
6
- break;
7
- }
8
- }
9
- }
10
- }
1
+ function(){
2
+ for(var i=0; i<arguments[0].options.length; i++) {
3
+ if ( arguments[0].options[i].text.match(arguments[1]) ) {
4
+ arguments[0].options[i].selected = true;
5
+ if ( arguments[2] == 'single' ) {
6
+ break;
7
+ }
8
+ }
9
+ }
10
+ }
@@ -1,10 +1,10 @@
1
- function(){
2
- for(var i=0; i<arguments[0].options.length; i++) {
3
- if ( arguments[0].options[i].value.match(arguments[1]) ) {
4
- arguments[0].options[i].selected = true;
5
- if ( arguments[2] == 'single' ) {
6
- break;
7
- }
8
- }
9
- }
10
- }
1
+ function(){
2
+ for(var i=0; i<arguments[0].options.length; i++) {
3
+ if ( arguments[0].options[i].value.match(arguments[1]) ) {
4
+ arguments[0].options[i].selected = true;
5
+ if ( arguments[2] == 'single' ) {
6
+ break;
7
+ }
8
+ }
9
+ }
10
+ }
@@ -1,64 +1,64 @@
1
- // Copyright 2011 Software Freedom Conservatory
2
- // Licensed under the Apache License, Version 2.0 (the "License");
3
- // you may not use this file except in compliance with the License.
4
- // You may obtain a copy of the License at
5
- //
6
- // http://www.apache.org/licenses/LICENSE-2.0
7
- //
8
- // Unless required by applicable law or agreed to in writing, software
9
- // distributed under the License is distributed on an "AS IS" BASIS,
10
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- // See the License for the specific language governing permissions and
12
- // limitations under the License.
13
-
14
- // This code was built by the Selenium code base
15
- // See https://github.com/SeleniumHQ/selenium/tree/master/javascript/watir-atoms
16
-
17
- function(){return function(){function f(a){throw a;}var h=void 0,l=null;function m(a){return function(){return this[a]}}function o(a){return function(){return a}}var p,r=this;
18
- function s(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
19
- else if(b=="function"&&typeof a.call=="undefined")return"object";return b}function t(a){var b=s(a);return b=="array"||b=="object"&&typeof a.length=="number"}function u(a){return typeof a=="string"}function aa(a){a=s(a);return a=="object"||a=="array"||a=="function"}var ba="closure_uid_"+Math.floor(Math.random()*2147483648).toString(36),ca=0,da=Date.now||function(){return+new Date};function v(a,b){function c(){}c.prototype=b.prototype;a.Q=b.prototype;a.prototype=new c};function ea(a){this.stack=Error().stack||"";if(a)this.message=String(a)}v(ea,Error);ea.prototype.name="CustomError";function fa(a){for(var b=1;b<arguments.length;b++)var c=String(arguments[b]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,c);return a}function w(a){if(!ga.test(a))return a;a.indexOf("&")!=-1&&(a=a.replace(ha,"&amp;"));a.indexOf("<")!=-1&&(a=a.replace(ia,"&lt;"));a.indexOf(">")!=-1&&(a=a.replace(ja,"&gt;"));a.indexOf('"')!=-1&&(a=a.replace(ka,"&quot;"));return a}var ha=/&/g,ia=/</g,ja=/>/g,ka=/\"/g,ga=/[&<>\"]/;function la(a,b){if(a<b)return-1;else if(a>b)return 1;return 0}
20
- var ma=Math.random()*2147483648|0;function na(a,b){b.unshift(a);ea.call(this,fa.apply(l,b));b.shift();this.ra=a}v(na,ea);na.prototype.name="AssertionError";function oa(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b){d+=": "+b;var e=c}f(new na(""+d,e||[]))}}function pa(a){f(new na("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1)))};function x(a){return a[a.length-1]}var qa=Array.prototype;function z(a,b){if(u(a)){if(!u(b)||b.length!=1)return-1;return a.indexOf(b,0)}for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1}function ra(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,g=0;g<d;g++)g in e&&b.call(c,e[g],g,a)}function sa(a,b){for(var c=a.length,d=Array(c),e=u(a)?a.split(""):a,g=0;g<c;g++)g in e&&(d[g]=b.call(h,e[g],g,a));return d}
21
- function ta(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,g=0;g<d;g++)if(g in e&&b.call(c,e[g],g,a))return!0;return!1}function ua(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,g=0;g<d;g++)if(g in e&&!b.call(c,e[g],g,a))return!1;return!0}function va(a,b){var c;a:{c=a.length;for(var d=u(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(h,d[e],e,a)){c=e;break a}c=-1}return c<0?l:u(a)?a.charAt(c):a[c]}function wa(){return qa.concat.apply(qa,arguments)}
22
- function xa(a){if(s(a)=="array")return wa(a);else{for(var b=[],c=0,d=a.length;c<d;c++)b[c]=a[c];return b}}function ya(a){if(s(a)=="array")return wa(a);return xa(a)}function za(a,b,c){oa(a.length!=l);return arguments.length<=2?qa.slice.call(a,b):qa.slice.call(a,b,c)};var A,Aa,Ba,Ca;function Da(){return r.navigator?r.navigator.userAgent:l}Ca=Ba=Aa=A=!1;var Ea;if(Ea=Da()){var Fa=r.navigator;A=Ea.indexOf("Opera")==0;Aa=!A&&Ea.indexOf("MSIE")!=-1;Ba=!A&&Ea.indexOf("WebKit")!=-1;Ca=!A&&!Ba&&Fa.product=="Gecko"}var Ga=A,B=Aa,C=Ca,Ha=Ba,Ia;
23
- a:{var Ja="",D;if(Ga&&r.opera)var Ka=r.opera.version,Ja=typeof Ka=="function"?Ka():Ka;else if(C?D=/rv\:([^\);]+)(\)|;)/:B?D=/MSIE\s+([^\);]+)(\)|;)/:Ha&&(D=/WebKit\/(\S+)/),D)var La=D.exec(Da()),Ja=La?La[1]:"";if(B){var Ma,Na=r.document;Ma=Na?Na.documentMode:h;if(Ma>parseFloat(Ja)){Ia=String(Ma);break a}}Ia=Ja}var Pa={};
24
- function E(a){var b;if(!(b=Pa[a])){b=0;for(var c=String(Ia).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=Math.max(c.length,d.length),g=0;b==0&&g<e;g++){var i=c[g]||"",j=d[g]||"",k=RegExp("(\\d*)(\\D*)","g"),q=RegExp("(\\d*)(\\D*)","g");do{var n=k.exec(i)||["","",""],y=q.exec(j)||["","",""];if(n[0].length==0&&y[0].length==0)break;b=la(n[1].length==0?0:parseInt(n[1],10),y[1].length==0?0:parseInt(y[1],10))||la(n[2].length==0,y[2].length==
25
- 0)||la(n[2],y[2])}while(b==0)}b=Pa[a]=b>=0}return b}var Qa={};function Ra(){return Qa[9]||(Qa[9]=B&&document.documentMode&&document.documentMode>=9)};var Sa,Ta=!B||E("9");!C&&!B||B&&E("9")||C&&E("1.9.1");B&&E("9");function Ua(a){var b;b=(b=a.className)&&typeof b.split=="function"?b.split(/\s+/):[];var c=za(arguments,1),d;d=b;for(var e=0,g=0;g<c.length;g++)z(d,c[g])>=0||(d.push(c[g]),e++);d=e==c.length;a.className=b.join(" ");return d};function Va(a,b){for(var c in a)b.call(h,a[c],c,a)}var Wa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];function Xa(a){for(var b,c,d=1;d<arguments.length;d++){c=arguments[d];for(b in c)a[b]=c[b];for(var e=0;e<Wa.length;e++)b=Wa[e],Object.prototype.hasOwnProperty.call(c,b)&&(a[b]=c[b])}};function Ya(a){return a?new Za(F(a)):Sa||(Sa=new Za)}function $a(a,b){Va(b,function(b,d){d=="style"?a.style.cssText=b:d=="class"?a.className=b:d=="for"?a.htmlFor=b:d in ab?a.setAttribute(ab[d],b):a[d]=b})}var ab={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder",maxlength:"maxLength",type:"type"};function bb(a){return a?a.parentWindow||a.defaultView:window}
26
- function cb(a,b,c){function d(c){c&&b.appendChild(u(c)?a.createTextNode(c):c)}for(var e=2;e<c.length;e++){var g=c[e];t(g)&&!(aa(g)&&g.nodeType>0)?ra(db(g)?xa(g):g,d):d(g)}}function eb(a){return a&&a.parentNode?a.parentNode.removeChild(a):l}function G(a,b){if(a.contains&&b.nodeType==1)return a==b||a.contains(b);if(typeof a.compareDocumentPosition!="undefined")return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}
27
- function fb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if("sourceIndex"in a||a.parentNode&&"sourceIndex"in a.parentNode){var c=a.nodeType==1,d=b.nodeType==1;if(c&&d)return a.sourceIndex-b.sourceIndex;else{var e=a.parentNode,g=b.parentNode;if(e==g)return gb(a,b);if(!c&&G(e,b))return-1*hb(a,b);if(!d&&G(g,a))return hb(b,a);return(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:g.sourceIndex)}}d=F(a);c=d.createRange();c.selectNode(a);c.collapse(!0);d=
28
- d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function hb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return gb(d,a)}function gb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}
29
- function ib(){var a,b=arguments.length;if(b){if(b==1)return arguments[0]}else return l;var c=[],d=Infinity;for(a=0;a<b;a++){for(var e=[],g=arguments[a];g;)e.unshift(g),g=g.parentNode;c.push(e);d=Math.min(d,e.length)}e=l;for(a=0;a<d;a++){for(var g=c[0][a],i=1;i<b;i++)if(g!=c[i][a])return e;e=g}return e}function F(a){return a.nodeType==9?a:a.ownerDocument||a.document}
30
- function db(a){if(a&&typeof a.length=="number")if(aa(a))return typeof a.item=="function"||typeof a.item=="string";else if(s(a)=="function")return typeof a.item=="function";return!1}function Za(a){this.v=a||r.document||document}p=Za.prototype;p.T=m("v");
31
- p.S=function(){var a=this.v,b=arguments,c=b[0],d=b[1];if(!Ta&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',w(d.name),'"');if(d.type){c.push(' type="',w(d.type),'"');var e={};Xa(e,d);d=e;delete d.type}c.push(">");c=c.join("")}c=a.createElement(c);if(d)u(d)?c.className=d:s(d)=="array"?Ua.apply(l,[c].concat(d)):$a(c,d);b.length>2&&cb(a,c,b);return c};p.createElement=function(a){return this.v.createElement(a)};p.createTextNode=function(a){return this.v.createTextNode(a)};
32
- p.$=function(){return this.v.parentWindow||this.v.defaultView};p.appendChild=function(a,b){a.appendChild(b)};p.removeNode=eb;p.contains=G;function jb(){kb&&(this[ba]||(this[ba]=++ca))}var kb=!1;var H="StopIteration"in r?r.StopIteration:Error("StopIteration");function I(){}I.prototype.next=function(){f(H)};I.prototype.w=function(){return this};function lb(a){if(a instanceof I)return a;if(typeof a.w=="function")return a.w(!1);if(t(a)){var b=0,c=new I;c.next=function(){for(;;)if(b>=a.length&&f(H),b in a)return a[b++];else b++};return c}f(Error("Not implemented"))}
33
- function mb(a,b){if(t(a))try{ra(a,b,h)}catch(c){c!==H&&f(c)}else{a=lb(a);try{for(;;)b.call(h,a.next(),h,a)}catch(d){d!==H&&f(d)}}}function nb(a){if(t(a))return ya(a);var a=lb(a),b=[];mb(a,function(a){b.push(a)});return b};function ob(a){return pb(a||arguments.callee.caller,[])}
34
- function pb(a,b){var c=[];if(z(b,a)>=0)c.push("[...circular reference...]");else if(a&&b.length<50){c.push(qb(a)+"(");for(var d=a.arguments,e=0;e<d.length;e++){e>0&&c.push(", ");var g;g=d[e];switch(typeof g){case "object":g=g?"object":"null";break;case "string":break;case "number":g=String(g);break;case "boolean":g=g?"true":"false";break;case "function":g=(g=qb(g))?g:"[fn]";break;default:g=typeof g}g.length>40&&(g=g.substr(0,40)+"...");c.push(g)}b.push(a);c.push(")\n");try{c.push(pb(a.caller,b))}catch(i){c.push("[exception trying to get caller]\n")}}else a?
35
- c.push("[...long stack...]"):c.push("[end]");return c.join("")}function qb(a){a=String(a);if(!rb[a]){var b=/function ([^\(]+)/.exec(a);rb[a]=b?b[1]:"[Anonymous]"}return rb[a]}var rb={};function J(a,b,c,d,e){this.reset(a,b,c,d,e)}J.prototype.ia=0;J.prototype.Z=l;J.prototype.Y=l;var sb=0;J.prototype.reset=function(a,b,c,d,e){this.ia=typeof e=="number"?e:sb++;this.ta=d||da();this.H=a;this.ga=b;this.qa=c;delete this.Z;delete this.Y};J.prototype.ba=function(a){this.H=a};function K(a){this.ha=a}K.prototype.O=l;K.prototype.H=l;K.prototype.R=l;K.prototype.aa=l;function tb(a,b){this.name=a;this.value=b}tb.prototype.toString=m("name");var ub=new tb("SEVERE",1E3),vb=new tb("WARNING",900),wb=new tb("CONFIG",700);K.prototype.getParent=m("O");K.prototype.ba=function(a){this.H=a};function xb(a){if(a.H)return a.H;if(a.O)return xb(a.O);pa("Root logger has no level set.");return l}
36
- K.prototype.log=function(a,b,c){if(a.value>=xb(this).value){a=this.ea(a,b,c);r.console&&r.console.markTimeline&&r.console.markTimeline("log:"+a.ga);for(b=this;b;){var c=b,d=a;if(c.aa)for(var e=0,g=h;g=c.aa[e];e++)g(d);b=b.getParent()}}};
37
- K.prototype.ea=function(a,b,c){var d=new J(a,String(b),this.ha);if(c){d.Z=c;var e;var g=arguments.callee.caller;try{var i;var j;c:{for(var k="window.location.href".split("."),q=r,n;n=k.shift();)if(q[n]!=l)q=q[n];else{j=l;break c}j=q}if(u(c))i={message:c,name:"Unknown error",lineNumber:"Not available",fileName:j,stack:"Not available"};else{var y,Oa,k=!1;try{y=c.lineNumber||c.pa||"Not available"}catch(hc){y="Not available",k=!0}try{Oa=c.fileName||c.filename||c.sourceURL||j}catch(ic){Oa="Not available",
38
- k=!0}i=k||!c.lineNumber||!c.fileName||!c.stack?{message:c.message,name:c.name,lineNumber:y,fileName:Oa,stack:c.stack||"Not available"}:c}e="Message: "+w(i.message)+'\nUrl: <a href="view-source:'+i.fileName+'" target="_new">'+i.fileName+"</a>\nLine: "+i.lineNumber+"\n\nBrowser stack:\n"+w(i.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+w(ob(g)+"-> ")}catch(fc){e="Exception trying to expose exception! You win, we lose. "+fc}d.Y=e}return d};var yb={},zb=l;
39
- function Ab(a){zb||(zb=new K(""),yb[""]=zb,zb.ba(wb));var b;if(!(b=yb[a])){b=new K(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Ab(a.substr(0,c));if(!c.R)c.R={};c.R[d]=b;b.O=c;yb[a]=b}return b};function L(){jb.call(this)}v(L,jb);Ab("goog.dom.SavedRange");v(function(a){jb.call(this);this.ja="goog_"+ma++;this.da="goog_"+ma++;this.X=Ya(a.T());a.K(this.X.S("SPAN",{id:this.ja}),this.X.S("SPAN",{id:this.da}))},L);function M(a,b,c,d,e){this.l=!!b;a&&N(this,a,d);this.r=e!=h?e:this.n||0;this.l&&(this.r*=-1);this.ca=!c}v(M,I);p=M.prototype;p.m=l;p.n=0;p.W=!1;function N(a,b,c,d){if(a.m=b)a.n=typeof c=="number"?c:a.m.nodeType!=1?0:a.l?-1:1;if(typeof d=="number")a.r=d}
40
- p.next=function(){var a;if(this.W){(!this.m||this.ca&&this.r==0)&&f(H);a=this.m;var b=this.l?-1:1;if(this.n==b){var c=this.l?a.lastChild:a.firstChild;c?N(this,c):N(this,a,b*-1)}else(c=this.l?a.previousSibling:a.nextSibling)?N(this,c):N(this,a.parentNode,b*-1);this.r+=this.n*(this.l?-1:1)}else this.W=!0;(a=this.m)||f(H);return a};
41
- p.splice=function(){var a=this.m,b=this.l?1:-1;if(this.n==b)this.n=b*-1,this.r+=this.n*(this.l?-1:1);this.l=!this.l;M.prototype.next.call(this);this.l=!this.l;for(var b=t(arguments[0])?arguments[0]:arguments,c=b.length-1;c>=0;c--)a.parentNode&&a.parentNode.insertBefore(b[c],a.nextSibling);eb(a)};function O(){}function Bb(a){if(a.getSelection)return a.getSelection();else{var a=a.document,b=a.selection;if(b){try{var c=b.createRange();if(c.parentElement){if(c.parentElement().document!=a)return l}else if(!c.length||c.item(0).document!=a)return l}catch(d){return l}return b}return l}}function Cb(a){for(var b=[],c=0,d=a.z();c<d;c++)b.push(a.t(c));return b}O.prototype.A=o(!1);O.prototype.T=function(){return F(B?this.s():this.b())};O.prototype.$=function(){return bb(this.T())};
42
- O.prototype.containsNode=function(a,b){return this.q(Db(a),b)};function P(a,b){M.call(this,a,b,!0)}v(P,M);function Q(){}v(Q,O);Q.prototype.q=function(a,b){var c=Cb(this),d=Cb(a);return(b?ta:ua)(d,function(a){return ta(c,function(c){return c.q(a,b)})})};Q.prototype.insertNode=function(a,b){if(b){var c=this.b();c.parentNode&&c.parentNode.insertBefore(a,c)}else c=this.g(),c.parentNode&&c.parentNode.insertBefore(a,c.nextSibling);return a};Q.prototype.K=function(a,b){this.insertNode(a,!0);this.insertNode(b,!1)};function R(a,b,c,d,e){var g;if(a){this.d=a;this.f=b;this.c=c;this.e=d;if(a.nodeType==1&&a.tagName!="BR")if(a=a.childNodes,b=a[b])this.d=b,this.f=0;else{if(a.length)this.d=x(a);g=!0}if(c.nodeType==1)(this.c=c.childNodes[d])?this.e=0:this.c=c}P.call(this,e?this.c:this.d,e);if(g)try{this.next()}catch(i){i!=H&&f(i)}}v(R,P);p=R.prototype;p.d=l;p.c=l;p.f=0;p.e=0;p.b=m("d");p.g=m("c");p.G=function(){return this.W&&this.m==this.c&&(!this.e||this.n!=1)};p.next=function(){this.G()&&f(H);return R.Q.next.call(this)};"ScriptEngine"in r&&r.ScriptEngine()=="JScript"&&(r.ScriptEngineMajorVersion(),r.ScriptEngineMinorVersion(),r.ScriptEngineBuildVersion());function S(){}S.prototype.q=function(a,b){var c=b&&!a.isCollapsed(),d=a.a;try{return c?this.j(d,0,1)>=0&&this.j(d,1,0)<=0:this.j(d,0,0)>=0&&this.j(d,1,1)<=0}catch(e){return B||f(e),!1}};S.prototype.containsNode=function(a,b){return this.q(T(a),b)};S.prototype.w=function(){return new R(this.b(),this.h(),this.g(),this.i())};function U(a){this.a=a}v(U,S);function Eb(a){var b=F(a).createRange();if(a.nodeType==3)b.setStart(a,0),b.setEnd(a,a.length);else if(V(a)){for(var c,d=a;(c=d.firstChild)&&V(c);)d=c;b.setStart(d,0);for(d=a;(c=d.lastChild)&&V(c);)d=c;b.setEnd(d,d.nodeType==1?d.childNodes.length:d.length)}else c=a.parentNode,a=z(c.childNodes,a),b.setStart(c,a),b.setEnd(c,a+1);return b}function Fb(a,b,c,d){var e=F(a).createRange();e.setStart(a,b);e.setEnd(c,d);return e}p=U.prototype;p.s=function(){return this.a.commonAncestorContainer};
43
- p.b=function(){return this.a.startContainer};p.h=function(){return this.a.startOffset};p.g=function(){return this.a.endContainer};p.i=function(){return this.a.endOffset};p.j=function(a,b,c){return this.a.compareBoundaryPoints(c==1?b==1?r.Range.START_TO_START:r.Range.START_TO_END:b==1?r.Range.END_TO_START:r.Range.END_TO_END,a)};p.isCollapsed=function(){return this.a.collapsed};p.select=function(a){this.P(bb(F(this.b())).getSelection(),a)};p.P=function(a){a.removeAllRanges();a.addRange(this.a)};
44
- p.insertNode=function(a,b){var c=this.a.cloneRange();c.collapse(b);c.insertNode(a);c.detach();return a};
45
- p.K=function(a,b){var c=bb(F(this.b()));if(c=(c=Bb(c||window))&&Gb(c))var d=c.b(),e=c.g(),g=c.h(),i=c.i();var j=this.a.cloneRange(),k=this.a.cloneRange();j.collapse(!1);k.collapse(!0);j.insertNode(b);k.insertNode(a);j.detach();k.detach();if(c){if(d.nodeType==3)for(;g>d.length;){g-=d.length;do d=d.nextSibling;while(d==a||d==b)}if(e.nodeType==3)for(;i>e.length;){i-=e.length;do e=e.nextSibling;while(e==a||e==b)}Hb(d,g,e,i).select()}};p.collapse=function(a){this.a.collapse(a)};function W(a){this.a=a}v(W,U);W.prototype.P=function(a,b){var c=b?this.g():this.b(),d=b?this.i():this.h(),e=b?this.b():this.g(),g=b?this.h():this.i();a.collapse(c,d);(c!=e||d!=g)&&a.extend(e,g)};function Ib(a,b,c,d){M.call(this,a,b,c,l,d)}v(Ib,M);Ib.prototype.next=function(){do Ib.Q.next.call(this);while(this.n==-1);return this.m};function X(a,b){this.a=a;this.ma=b}v(X,S);var Jb=Ab("goog.dom.browserrange.IeRange");function Kb(a){var b=F(a).body.createTextRange();if(a.nodeType==1)b.moveToElementText(a),V(a)&&!a.childNodes.length&&b.collapse(!1);else{for(var c=0,d=a;d=d.previousSibling;){var e=d.nodeType;if(e==3)c+=d.length;else if(e==1){b.moveToElementText(d);break}}d||b.moveToElementText(a.parentNode);b.collapse(!d);c&&b.move("character",c);b.moveEnd("character",a.length)}return b}p=X.prototype;p.u=l;p.d=l;p.c=l;p.f=-1;
46
- p.e=-1;p.o=function(){this.u=this.d=this.c=l;this.f=this.e=-1};
47
- p.s=function(){if(!this.u){var a=this.a.text,b=this.a.duplicate(),c=a.replace(/ +$/,"");(c=a.length-c.length)&&b.moveEnd("character",-c);c=b.parentElement();b=b.htmlText.replace(/(\r\n|\r|\n)+/g," ").length;if(this.isCollapsed()&&b>0)return this.u=c;for(;b>c.outerHTML.replace(/(\r\n|\r|\n)+/g," ").length;)c=c.parentNode;for(;c.childNodes.length==1&&c.innerText==(c.firstChild.nodeType==3?c.firstChild.nodeValue:c.firstChild.innerText);){if(!V(c.firstChild))break;c=c.firstChild}a.length==0&&(c=Lb(this,
48
- c));this.u=c}return this.u};function Lb(a,b){for(var c=b.childNodes,d=0,e=c.length;d<e;d++){var g=c[d];if(V(g)){var i=Kb(g),j=i.htmlText!=g.outerHTML;if(a.isCollapsed()&&j?a.j(i,1,1)>=0&&a.j(i,1,0)<=0:a.a.inRange(i))return Lb(a,g)}}return b}p.b=function(){if(!this.d&&(this.d=Mb(this,1),this.isCollapsed()))this.c=this.d;return this.d};p.h=function(){if(this.f<0&&(this.f=Nb(this,1),this.isCollapsed()))this.e=this.f;return this.f};
49
- p.g=function(){if(this.isCollapsed())return this.b();if(!this.c)this.c=Mb(this,0);return this.c};p.i=function(){if(this.isCollapsed())return this.h();if(this.e<0&&(this.e=Nb(this,0),this.isCollapsed()))this.f=this.e;return this.e};p.j=function(a,b,c){return this.a.compareEndPoints((b==1?"Start":"End")+"To"+(c==1?"Start":"End"),a)};
50
- function Mb(a,b,c){c=c||a.s();if(!c||!c.firstChild)return c;for(var d=b==1,e=0,g=c.childNodes.length;e<g;e++){var i=d?e:g-e-1,j=c.childNodes[i],k;try{k=T(j)}catch(q){continue}var n=k.a;if(a.isCollapsed())if(V(j)){if(k.q(a))return Mb(a,b,j)}else{if(a.j(n,1,1)==0){a.f=a.e=i;break}}else if(a.q(k)){if(!V(j)){d?a.f=i:a.e=i+1;break}return Mb(a,b,j)}else if(a.j(n,1,0)<0&&a.j(n,0,1)>0)return Mb(a,b,j)}return c}
51
- function Nb(a,b){var c=b==1,d=c?a.b():a.g();if(d.nodeType==1){for(var d=d.childNodes,e=d.length,g=c?1:-1,i=c?0:e-1;i>=0&&i<e;i+=g){var j=d[i];if(!V(j)&&a.a.compareEndPoints((b==1?"Start":"End")+"To"+(b==1?"Start":"End"),T(j).a)==0)return c?i:i+1}return i==-1?0:i}else return e=a.a.duplicate(),g=Kb(d),e.setEndPoint(c?"EndToEnd":"StartToStart",g),e=e.text.length,c?d.length-e:e}p.isCollapsed=function(){return this.a.compareEndPoints("StartToEnd",this.a)==0};p.select=function(){this.a.select()};
52
- function Ob(a,b,c){var d;d=d||Ya(a.parentElement());var e;b.nodeType!=1&&(e=!0,b=d.S("DIV",l,b));a.collapse(c);d=d||Ya(a.parentElement());var g=c=b.id;if(!c)c=b.id="goog_"+ma++;a.pasteHTML(b.outerHTML);(b=u(c)?d.v.getElementById(c):c)&&(g||b.removeAttribute("id"));if(e){a=b.firstChild;e=b;if((d=e.parentNode)&&d.nodeType!=11)if(e.removeNode)e.removeNode(!1);else{for(;b=e.firstChild;)d.insertBefore(b,e);eb(e)}b=a}return b}p.insertNode=function(a,b){var c=Ob(this.a.duplicate(),a,b);this.o();return c};
53
- p.K=function(a,b){var c=this.a.duplicate(),d=this.a.duplicate();Ob(c,a,!0);Ob(d,b,!1);this.o()};p.collapse=function(a){this.a.collapse(a);a?(this.c=this.d,this.e=this.f):(this.d=this.c,this.f=this.e)};function Pb(a){this.a=a}v(Pb,U);Pb.prototype.P=function(a){a.collapse(this.b(),this.h());(this.g()!=this.b()||this.i()!=this.h())&&a.extend(this.g(),this.i());a.rangeCount==0&&a.addRange(this.a)};function Y(a){this.a=a}v(Y,U);Y.prototype.j=function(a,b,c){if(E("528"))return Y.Q.j.call(this,a,b,c);return this.a.compareBoundaryPoints(c==1?b==1?r.Range.START_TO_START:r.Range.END_TO_START:b==1?r.Range.START_TO_END:r.Range.END_TO_END,a)};Y.prototype.P=function(a,b){a.removeAllRanges();b?a.setBaseAndExtent(this.g(),this.i(),this.b(),this.h()):a.setBaseAndExtent(this.b(),this.h(),this.g(),this.i())};function Qb(a){return B&&!Ra()?new X(a,F(a.parentElement())):Ha?new Y(a):C?new W(a):Ga?new Pb(a):new U(a)}function T(a){if(B&&!Ra()){var b=new X(Kb(a),F(a));if(V(a)){for(var c,d=a;(c=d.firstChild)&&V(c);)d=c;b.d=d;b.f=0;for(d=a;(c=d.lastChild)&&V(c);)d=c;b.c=d;b.e=d.nodeType==1?d.childNodes.length:d.length;b.u=a}else b.d=b.c=b.u=a.parentNode,b.f=z(b.u.childNodes,a),b.e=b.f+1;a=b}else a=Ha?new Y(Eb(a)):C?new W(Eb(a)):Ga?new Pb(Eb(a)):new U(Eb(a));return a}
54
- function V(a){var b;a:if(a.nodeType!=1)b=!1;else{switch(a.tagName){case "APPLET":case "AREA":case "BASE":case "BR":case "COL":case "FRAME":case "HR":case "IMG":case "INPUT":case "IFRAME":case "ISINDEX":case "LINK":case "NOFRAMES":case "NOSCRIPT":case "META":case "OBJECT":case "PARAM":case "SCRIPT":case "STYLE":b=!1;break a}b=!0}return b||a.nodeType==3};function Rb(){}v(Rb,O);function Sb(a,b){var c=new Rb;c.F=a;c.B=!!b;return c}function Hb(a,b,c,d){var e=new Rb;e.B=Tb(a,b,c,d);if(a.tagName=="BR")var g=a.parentNode,b=z(g.childNodes,a),a=g;if(c.tagName=="BR")g=c.parentNode,d=z(g.childNodes,c),c=g;e.B?(e.d=c,e.f=d,e.c=a,e.e=b):(e.d=a,e.f=b,e.c=c,e.e=d);return e}p=Rb.prototype;p.F=l;p.d=l;p.f=l;p.c=l;p.e=l;p.B=!1;p.U=o("text");p.N=function(){return Z(this).a};p.o=function(){this.d=this.f=this.c=this.e=l};p.z=o(1);p.t=function(){return this};
55
- function Z(a){var y;var b;if(!(b=a.F)){b=a.b();var c=a.h(),d=a.g(),e=a.i();if(B&&!Ra()){var g=b,i=c,j=d,k=e,q=!1;g.nodeType==1&&(i>g.childNodes.length&&Jb.log(ub,"Cannot have startOffset > startNode child count",h),i=g.childNodes[i],q=!i,g=i||g.lastChild||g,i=0);var n=Kb(g);i&&n.move("character",i);g==j&&i==k?n.collapse(!0):(q&&n.collapse(!1),q=!1,j.nodeType==1&&(k>j.childNodes.length&&Jb.log(ub,"Cannot have endOffset > endNode child count",h),y=(i=j.childNodes[k])||j.lastChild||j,j=y,k=0,q=!i),g=
56
- Kb(j),g.collapse(!q),k&&g.moveEnd("character",k),n.setEndPoint("EndToEnd",g));k=new X(n,F(b));k.d=b;k.f=c;k.c=d;k.e=e;b=k}else b=Ha?new Y(Fb(b,c,d,e)):C?new W(Fb(b,c,d,e)):Ga?new Pb(Fb(b,c,d,e)):new U(Fb(b,c,d,e));b=a.F=b}return b}p.s=function(){return Z(this).s()};p.b=function(){return this.d||(this.d=Z(this).b())};p.h=function(){return this.f!=l?this.f:this.f=Z(this).h()};p.g=function(){return this.c||(this.c=Z(this).g())};p.i=function(){return this.e!=l?this.e:this.e=Z(this).i()};p.A=m("B");
57
- p.q=function(a,b){var c=a.U();if(c=="text")return Z(this).q(Z(a),b);else if(c=="control")return c=Ub(a),(b?ta:ua)(c,function(a){return this.containsNode(a,b)},this);return!1};p.isCollapsed=function(){return Z(this).isCollapsed()};p.w=function(){return new R(this.b(),this.h(),this.g(),this.i())};p.select=function(){Z(this).select(this.B)};p.insertNode=function(a,b){var c=Z(this).insertNode(a,b);this.o();return c};p.K=function(a,b){Z(this).K(a,b);this.o()};p.V=function(){return new Vb(this)};
58
- p.collapse=function(a){a=this.A()?!a:a;this.F&&this.F.collapse(a);a?(this.c=this.d,this.e=this.f):(this.d=this.c,this.f=this.e);this.B=!1};function Vb(a){this.ka=a.A()?a.g():a.b();this.la=a.A()?a.i():a.h();this.na=a.A()?a.b():a.g();this.oa=a.A()?a.h():a.i()}v(Vb,L);function Wb(){}v(Wb,Q);p=Wb.prototype;p.a=l;p.k=l;p.J=l;p.o=function(){this.J=this.k=l};p.U=o("control");p.N=function(){return this.a||document.body.createControlRange()};p.z=function(){return this.a?this.a.length:0};p.t=function(a){a=this.a.item(a);return Sb(T(a),h)};p.s=function(){return ib.apply(l,Ub(this))};p.b=function(){return Xb(this)[0]};p.h=o(0);p.g=function(){var a=Xb(this),b=x(a);return va(a,function(a){return G(a,b)})};p.i=function(){return this.g().childNodes.length};
59
- function Ub(a){if(!a.k&&(a.k=[],a.a))for(var b=0;b<a.a.length;b++)a.k.push(a.a.item(b));return a.k}function Xb(a){if(!a.J)a.J=Ub(a).concat(),a.J.sort(function(a,c){return a.sourceIndex-c.sourceIndex});return a.J}p.isCollapsed=function(){return!this.a||!this.a.length};p.w=function(){return new Yb(this)};p.select=function(){this.a&&this.a.select()};p.V=function(){return new Zb(this)};p.collapse=function(){this.a=l;this.o()};function Zb(a){this.k=Ub(a)}v(Zb,L);
60
- function Yb(a){if(a)this.k=Xb(a),this.d=this.k.shift(),this.c=x(this.k)||this.d;P.call(this,this.d,!1)}v(Yb,P);p=Yb.prototype;p.d=l;p.c=l;p.k=l;p.b=m("d");p.g=m("c");p.G=function(){return!this.r&&!this.k.length};p.next=function(){if(this.G())f(H);else if(!this.r){var a=this.k.shift();N(this,a,1,1);return a}return Yb.Q.next.call(this)};function $b(){this.p=[];this.I=[];this.L=this.D=l}v($b,Q);p=$b.prototype;p.fa=Ab("goog.dom.MultiRange");p.o=function(){this.I=[];this.L=this.D=l};p.U=o("mutli");p.N=function(){this.p.length>1&&this.fa.log(vb,"getBrowserRangeObject called on MultiRange with more than 1 range",h);return this.p[0]};p.z=function(){return this.p.length};p.t=function(a){this.I[a]||(this.I[a]=Sb(Qb(this.p[a]),h));return this.I[a]};
61
- p.s=function(){if(!this.L){for(var a=[],b=0,c=this.z();b<c;b++)a.push(this.t(b).s());this.L=ib.apply(l,a)}return this.L};function ac(a){if(!a.D)a.D=Cb(a),a.D.sort(function(a,c){var d=a.b(),e=a.h(),g=c.b(),i=c.h();if(d==g&&e==i)return 0;return Tb(d,e,g,i)?1:-1});return a.D}p.b=function(){return ac(this)[0].b()};p.h=function(){return ac(this)[0].h()};p.g=function(){return x(ac(this)).g()};p.i=function(){return x(ac(this)).i()};p.isCollapsed=function(){return this.p.length==0||this.p.length==1&&this.t(0).isCollapsed()};
62
- p.w=function(){return new bc(this)};p.select=function(){var a=Bb(this.$());a.removeAllRanges();for(var b=0,c=this.z();b<c;b++)a.addRange(this.t(b).N())};p.V=function(){return new cc(this)};p.collapse=function(a){if(!this.isCollapsed()){var b=a?this.t(0):this.t(this.z()-1);this.o();b.collapse(a);this.I=[b];this.D=[b];this.p=[b.N()]}};function cc(a){this.sa=sa(Cb(a),function(a){return a.V()})}v(cc,L);function bc(a){if(a)this.C=sa(ac(a),function(a){return lb(a)});P.call(this,a?this.b():l,!1)}v(bc,P);
63
- p=bc.prototype;p.C=l;p.M=0;p.b=function(){return this.C[0].b()};p.g=function(){return x(this.C).g()};p.G=function(){return this.C[this.M].G()};p.next=function(){try{var a=this.C[this.M],b=a.next();N(this,a.m,a.n,a.r);return b}catch(c){if(c!==H||this.C.length-1==this.M)f(c);else return this.M++,this.next()}};function Gb(a){var b,c=!1;if(a.createRange)try{b=a.createRange()}catch(d){return l}else if(a.rangeCount)if(a.rangeCount>1){b=new $b;for(var c=0,e=a.rangeCount;c<e;c++)b.p.push(a.getRangeAt(c));return b}else b=a.getRangeAt(0),c=Tb(a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset);else return l;b&&b.addElement?(a=new Wb,a.a=b):a=Sb(Qb(b),c);return a}function Db(a){return Sb(T(a),h)}
64
- function Tb(a,b,c,d){if(a==c)return d<b;var e;if(a.nodeType==1&&b)if(e=a.childNodes[b])a=e,b=0;else if(G(a,c))return!0;if(c.nodeType==1&&d)if(e=c.childNodes[d])c=e,d=0;else if(G(c,a))return!1;return(fb(a,c)||b-d)>0};function dc(a,b){var c=new Db(a);(c=va(nb(c),function(a){return a.nodeType==3&&a.data.indexOf(b)!=-1}))||f("could not find text node matching: "+b);var d=c.data.indexOf(b);Hb(c,d,c,d+b.length).select()}var ec="_".split("."),$=r;!(ec[0]in $)&&$.execScript&&$.execScript("var "+ec[0]);for(var gc;ec.length&&(gc=ec.shift());)!ec.length&&dc!==h?$[gc]=dc:$=$[gc]?$[gc]:$[gc]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
1
+ // Copyright 2011 Software Freedom Conservatory
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS,
10
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+ // See the License for the specific language governing permissions and
12
+ // limitations under the License.
13
+
14
+ // This code was built by the Selenium code base
15
+ // See https://github.com/SeleniumHQ/selenium/tree/master/javascript/watir-atoms
16
+
17
+ function(){return function(){function f(a){throw a;}var h=void 0,l=null;function m(a){return function(){return this[a]}}function o(a){return function(){return a}}var p,r=this;
18
+ function s(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
19
+ else if(b=="function"&&typeof a.call=="undefined")return"object";return b}function t(a){var b=s(a);return b=="array"||b=="object"&&typeof a.length=="number"}function u(a){return typeof a=="string"}function aa(a){a=s(a);return a=="object"||a=="array"||a=="function"}var ba="closure_uid_"+Math.floor(Math.random()*2147483648).toString(36),ca=0,da=Date.now||function(){return+new Date};function v(a,b){function c(){}c.prototype=b.prototype;a.Q=b.prototype;a.prototype=new c};function ea(a){this.stack=Error().stack||"";if(a)this.message=String(a)}v(ea,Error);ea.prototype.name="CustomError";function fa(a){for(var b=1;b<arguments.length;b++)var c=String(arguments[b]).replace(/\$/g,"$$$$"),a=a.replace(/\%s/,c);return a}function w(a){if(!ga.test(a))return a;a.indexOf("&")!=-1&&(a=a.replace(ha,"&amp;"));a.indexOf("<")!=-1&&(a=a.replace(ia,"&lt;"));a.indexOf(">")!=-1&&(a=a.replace(ja,"&gt;"));a.indexOf('"')!=-1&&(a=a.replace(ka,"&quot;"));return a}var ha=/&/g,ia=/</g,ja=/>/g,ka=/\"/g,ga=/[&<>\"]/;function la(a,b){if(a<b)return-1;else if(a>b)return 1;return 0}
20
+ var ma=Math.random()*2147483648|0;function na(a,b){b.unshift(a);ea.call(this,fa.apply(l,b));b.shift();this.ra=a}v(na,ea);na.prototype.name="AssertionError";function oa(a,b){if(!a){var c=Array.prototype.slice.call(arguments,2),d="Assertion failed";if(b){d+=": "+b;var e=c}f(new na(""+d,e||[]))}}function pa(a){f(new na("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1)))};function x(a){return a[a.length-1]}var qa=Array.prototype;function z(a,b){if(u(a)){if(!u(b)||b.length!=1)return-1;return a.indexOf(b,0)}for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1}function ra(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,g=0;g<d;g++)g in e&&b.call(c,e[g],g,a)}function sa(a,b){for(var c=a.length,d=Array(c),e=u(a)?a.split(""):a,g=0;g<c;g++)g in e&&(d[g]=b.call(h,e[g],g,a));return d}
21
+ function ta(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,g=0;g<d;g++)if(g in e&&b.call(c,e[g],g,a))return!0;return!1}function ua(a,b,c){for(var d=a.length,e=u(a)?a.split(""):a,g=0;g<d;g++)if(g in e&&!b.call(c,e[g],g,a))return!1;return!0}function va(a,b){var c;a:{c=a.length;for(var d=u(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(h,d[e],e,a)){c=e;break a}c=-1}return c<0?l:u(a)?a.charAt(c):a[c]}function wa(){return qa.concat.apply(qa,arguments)}
22
+ function xa(a){if(s(a)=="array")return wa(a);else{for(var b=[],c=0,d=a.length;c<d;c++)b[c]=a[c];return b}}function ya(a){if(s(a)=="array")return wa(a);return xa(a)}function za(a,b,c){oa(a.length!=l);return arguments.length<=2?qa.slice.call(a,b):qa.slice.call(a,b,c)};var A,Aa,Ba,Ca;function Da(){return r.navigator?r.navigator.userAgent:l}Ca=Ba=Aa=A=!1;var Ea;if(Ea=Da()){var Fa=r.navigator;A=Ea.indexOf("Opera")==0;Aa=!A&&Ea.indexOf("MSIE")!=-1;Ba=!A&&Ea.indexOf("WebKit")!=-1;Ca=!A&&!Ba&&Fa.product=="Gecko"}var Ga=A,B=Aa,C=Ca,Ha=Ba,Ia;
23
+ a:{var Ja="",D;if(Ga&&r.opera)var Ka=r.opera.version,Ja=typeof Ka=="function"?Ka():Ka;else if(C?D=/rv\:([^\);]+)(\)|;)/:B?D=/MSIE\s+([^\);]+)(\)|;)/:Ha&&(D=/WebKit\/(\S+)/),D)var La=D.exec(Da()),Ja=La?La[1]:"";if(B){var Ma,Na=r.document;Ma=Na?Na.documentMode:h;if(Ma>parseFloat(Ja)){Ia=String(Ma);break a}}Ia=Ja}var Pa={};
24
+ function E(a){var b;if(!(b=Pa[a])){b=0;for(var c=String(Ia).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=Math.max(c.length,d.length),g=0;b==0&&g<e;g++){var i=c[g]||"",j=d[g]||"",k=RegExp("(\\d*)(\\D*)","g"),q=RegExp("(\\d*)(\\D*)","g");do{var n=k.exec(i)||["","",""],y=q.exec(j)||["","",""];if(n[0].length==0&&y[0].length==0)break;b=la(n[1].length==0?0:parseInt(n[1],10),y[1].length==0?0:parseInt(y[1],10))||la(n[2].length==0,y[2].length==
25
+ 0)||la(n[2],y[2])}while(b==0)}b=Pa[a]=b>=0}return b}var Qa={};function Ra(){return Qa[9]||(Qa[9]=B&&document.documentMode&&document.documentMode>=9)};var Sa,Ta=!B||E("9");!C&&!B||B&&E("9")||C&&E("1.9.1");B&&E("9");function Ua(a){var b;b=(b=a.className)&&typeof b.split=="function"?b.split(/\s+/):[];var c=za(arguments,1),d;d=b;for(var e=0,g=0;g<c.length;g++)z(d,c[g])>=0||(d.push(c[g]),e++);d=e==c.length;a.className=b.join(" ");return d};function Va(a,b){for(var c in a)b.call(h,a[c],c,a)}var Wa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"];function Xa(a){for(var b,c,d=1;d<arguments.length;d++){c=arguments[d];for(b in c)a[b]=c[b];for(var e=0;e<Wa.length;e++)b=Wa[e],Object.prototype.hasOwnProperty.call(c,b)&&(a[b]=c[b])}};function Ya(a){return a?new Za(F(a)):Sa||(Sa=new Za)}function $a(a,b){Va(b,function(b,d){d=="style"?a.style.cssText=b:d=="class"?a.className=b:d=="for"?a.htmlFor=b:d in ab?a.setAttribute(ab[d],b):a[d]=b})}var ab={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder",maxlength:"maxLength",type:"type"};function bb(a){return a?a.parentWindow||a.defaultView:window}
26
+ function cb(a,b,c){function d(c){c&&b.appendChild(u(c)?a.createTextNode(c):c)}for(var e=2;e<c.length;e++){var g=c[e];t(g)&&!(aa(g)&&g.nodeType>0)?ra(db(g)?xa(g):g,d):d(g)}}function eb(a){return a&&a.parentNode?a.parentNode.removeChild(a):l}function G(a,b){if(a.contains&&b.nodeType==1)return a==b||a.contains(b);if(typeof a.compareDocumentPosition!="undefined")return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}
27
+ function fb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if("sourceIndex"in a||a.parentNode&&"sourceIndex"in a.parentNode){var c=a.nodeType==1,d=b.nodeType==1;if(c&&d)return a.sourceIndex-b.sourceIndex;else{var e=a.parentNode,g=b.parentNode;if(e==g)return gb(a,b);if(!c&&G(e,b))return-1*hb(a,b);if(!d&&G(g,a))return hb(b,a);return(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:g.sourceIndex)}}d=F(a);c=d.createRange();c.selectNode(a);c.collapse(!0);d=
28
+ d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(r.Range.START_TO_END,d)}function hb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return gb(d,a)}function gb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}
29
+ function ib(){var a,b=arguments.length;if(b){if(b==1)return arguments[0]}else return l;var c=[],d=Infinity;for(a=0;a<b;a++){for(var e=[],g=arguments[a];g;)e.unshift(g),g=g.parentNode;c.push(e);d=Math.min(d,e.length)}e=l;for(a=0;a<d;a++){for(var g=c[0][a],i=1;i<b;i++)if(g!=c[i][a])return e;e=g}return e}function F(a){return a.nodeType==9?a:a.ownerDocument||a.document}
30
+ function db(a){if(a&&typeof a.length=="number")if(aa(a))return typeof a.item=="function"||typeof a.item=="string";else if(s(a)=="function")return typeof a.item=="function";return!1}function Za(a){this.v=a||r.document||document}p=Za.prototype;p.T=m("v");
31
+ p.S=function(){var a=this.v,b=arguments,c=b[0],d=b[1];if(!Ta&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',w(d.name),'"');if(d.type){c.push(' type="',w(d.type),'"');var e={};Xa(e,d);d=e;delete d.type}c.push(">");c=c.join("")}c=a.createElement(c);if(d)u(d)?c.className=d:s(d)=="array"?Ua.apply(l,[c].concat(d)):$a(c,d);b.length>2&&cb(a,c,b);return c};p.createElement=function(a){return this.v.createElement(a)};p.createTextNode=function(a){return this.v.createTextNode(a)};
32
+ p.$=function(){return this.v.parentWindow||this.v.defaultView};p.appendChild=function(a,b){a.appendChild(b)};p.removeNode=eb;p.contains=G;function jb(){kb&&(this[ba]||(this[ba]=++ca))}var kb=!1;var H="StopIteration"in r?r.StopIteration:Error("StopIteration");function I(){}I.prototype.next=function(){f(H)};I.prototype.w=function(){return this};function lb(a){if(a instanceof I)return a;if(typeof a.w=="function")return a.w(!1);if(t(a)){var b=0,c=new I;c.next=function(){for(;;)if(b>=a.length&&f(H),b in a)return a[b++];else b++};return c}f(Error("Not implemented"))}
33
+ function mb(a,b){if(t(a))try{ra(a,b,h)}catch(c){c!==H&&f(c)}else{a=lb(a);try{for(;;)b.call(h,a.next(),h,a)}catch(d){d!==H&&f(d)}}}function nb(a){if(t(a))return ya(a);var a=lb(a),b=[];mb(a,function(a){b.push(a)});return b};function ob(a){return pb(a||arguments.callee.caller,[])}
34
+ function pb(a,b){var c=[];if(z(b,a)>=0)c.push("[...circular reference...]");else if(a&&b.length<50){c.push(qb(a)+"(");for(var d=a.arguments,e=0;e<d.length;e++){e>0&&c.push(", ");var g;g=d[e];switch(typeof g){case "object":g=g?"object":"null";break;case "string":break;case "number":g=String(g);break;case "boolean":g=g?"true":"false";break;case "function":g=(g=qb(g))?g:"[fn]";break;default:g=typeof g}g.length>40&&(g=g.substr(0,40)+"...");c.push(g)}b.push(a);c.push(")\n");try{c.push(pb(a.caller,b))}catch(i){c.push("[exception trying to get caller]\n")}}else a?
35
+ c.push("[...long stack...]"):c.push("[end]");return c.join("")}function qb(a){a=String(a);if(!rb[a]){var b=/function ([^\(]+)/.exec(a);rb[a]=b?b[1]:"[Anonymous]"}return rb[a]}var rb={};function J(a,b,c,d,e){this.reset(a,b,c,d,e)}J.prototype.ia=0;J.prototype.Z=l;J.prototype.Y=l;var sb=0;J.prototype.reset=function(a,b,c,d,e){this.ia=typeof e=="number"?e:sb++;this.ta=d||da();this.H=a;this.ga=b;this.qa=c;delete this.Z;delete this.Y};J.prototype.ba=function(a){this.H=a};function K(a){this.ha=a}K.prototype.O=l;K.prototype.H=l;K.prototype.R=l;K.prototype.aa=l;function tb(a,b){this.name=a;this.value=b}tb.prototype.toString=m("name");var ub=new tb("SEVERE",1E3),vb=new tb("WARNING",900),wb=new tb("CONFIG",700);K.prototype.getParent=m("O");K.prototype.ba=function(a){this.H=a};function xb(a){if(a.H)return a.H;if(a.O)return xb(a.O);pa("Root logger has no level set.");return l}
36
+ K.prototype.log=function(a,b,c){if(a.value>=xb(this).value){a=this.ea(a,b,c);r.console&&r.console.markTimeline&&r.console.markTimeline("log:"+a.ga);for(b=this;b;){var c=b,d=a;if(c.aa)for(var e=0,g=h;g=c.aa[e];e++)g(d);b=b.getParent()}}};
37
+ K.prototype.ea=function(a,b,c){var d=new J(a,String(b),this.ha);if(c){d.Z=c;var e;var g=arguments.callee.caller;try{var i;var j;c:{for(var k="window.location.href".split("."),q=r,n;n=k.shift();)if(q[n]!=l)q=q[n];else{j=l;break c}j=q}if(u(c))i={message:c,name:"Unknown error",lineNumber:"Not available",fileName:j,stack:"Not available"};else{var y,Oa,k=!1;try{y=c.lineNumber||c.pa||"Not available"}catch(hc){y="Not available",k=!0}try{Oa=c.fileName||c.filename||c.sourceURL||j}catch(ic){Oa="Not available",
38
+ k=!0}i=k||!c.lineNumber||!c.fileName||!c.stack?{message:c.message,name:c.name,lineNumber:y,fileName:Oa,stack:c.stack||"Not available"}:c}e="Message: "+w(i.message)+'\nUrl: <a href="view-source:'+i.fileName+'" target="_new">'+i.fileName+"</a>\nLine: "+i.lineNumber+"\n\nBrowser stack:\n"+w(i.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+w(ob(g)+"-> ")}catch(fc){e="Exception trying to expose exception! You win, we lose. "+fc}d.Y=e}return d};var yb={},zb=l;
39
+ function Ab(a){zb||(zb=new K(""),yb[""]=zb,zb.ba(wb));var b;if(!(b=yb[a])){b=new K(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Ab(a.substr(0,c));if(!c.R)c.R={};c.R[d]=b;b.O=c;yb[a]=b}return b};function L(){jb.call(this)}v(L,jb);Ab("goog.dom.SavedRange");v(function(a){jb.call(this);this.ja="goog_"+ma++;this.da="goog_"+ma++;this.X=Ya(a.T());a.K(this.X.S("SPAN",{id:this.ja}),this.X.S("SPAN",{id:this.da}))},L);function M(a,b,c,d,e){this.l=!!b;a&&N(this,a,d);this.r=e!=h?e:this.n||0;this.l&&(this.r*=-1);this.ca=!c}v(M,I);p=M.prototype;p.m=l;p.n=0;p.W=!1;function N(a,b,c,d){if(a.m=b)a.n=typeof c=="number"?c:a.m.nodeType!=1?0:a.l?-1:1;if(typeof d=="number")a.r=d}
40
+ p.next=function(){var a;if(this.W){(!this.m||this.ca&&this.r==0)&&f(H);a=this.m;var b=this.l?-1:1;if(this.n==b){var c=this.l?a.lastChild:a.firstChild;c?N(this,c):N(this,a,b*-1)}else(c=this.l?a.previousSibling:a.nextSibling)?N(this,c):N(this,a.parentNode,b*-1);this.r+=this.n*(this.l?-1:1)}else this.W=!0;(a=this.m)||f(H);return a};
41
+ p.splice=function(){var a=this.m,b=this.l?1:-1;if(this.n==b)this.n=b*-1,this.r+=this.n*(this.l?-1:1);this.l=!this.l;M.prototype.next.call(this);this.l=!this.l;for(var b=t(arguments[0])?arguments[0]:arguments,c=b.length-1;c>=0;c--)a.parentNode&&a.parentNode.insertBefore(b[c],a.nextSibling);eb(a)};function O(){}function Bb(a){if(a.getSelection)return a.getSelection();else{var a=a.document,b=a.selection;if(b){try{var c=b.createRange();if(c.parentElement){if(c.parentElement().document!=a)return l}else if(!c.length||c.item(0).document!=a)return l}catch(d){return l}return b}return l}}function Cb(a){for(var b=[],c=0,d=a.z();c<d;c++)b.push(a.t(c));return b}O.prototype.A=o(!1);O.prototype.T=function(){return F(B?this.s():this.b())};O.prototype.$=function(){return bb(this.T())};
42
+ O.prototype.containsNode=function(a,b){return this.q(Db(a),b)};function P(a,b){M.call(this,a,b,!0)}v(P,M);function Q(){}v(Q,O);Q.prototype.q=function(a,b){var c=Cb(this),d=Cb(a);return(b?ta:ua)(d,function(a){return ta(c,function(c){return c.q(a,b)})})};Q.prototype.insertNode=function(a,b){if(b){var c=this.b();c.parentNode&&c.parentNode.insertBefore(a,c)}else c=this.g(),c.parentNode&&c.parentNode.insertBefore(a,c.nextSibling);return a};Q.prototype.K=function(a,b){this.insertNode(a,!0);this.insertNode(b,!1)};function R(a,b,c,d,e){var g;if(a){this.d=a;this.f=b;this.c=c;this.e=d;if(a.nodeType==1&&a.tagName!="BR")if(a=a.childNodes,b=a[b])this.d=b,this.f=0;else{if(a.length)this.d=x(a);g=!0}if(c.nodeType==1)(this.c=c.childNodes[d])?this.e=0:this.c=c}P.call(this,e?this.c:this.d,e);if(g)try{this.next()}catch(i){i!=H&&f(i)}}v(R,P);p=R.prototype;p.d=l;p.c=l;p.f=0;p.e=0;p.b=m("d");p.g=m("c");p.G=function(){return this.W&&this.m==this.c&&(!this.e||this.n!=1)};p.next=function(){this.G()&&f(H);return R.Q.next.call(this)};"ScriptEngine"in r&&r.ScriptEngine()=="JScript"&&(r.ScriptEngineMajorVersion(),r.ScriptEngineMinorVersion(),r.ScriptEngineBuildVersion());function S(){}S.prototype.q=function(a,b){var c=b&&!a.isCollapsed(),d=a.a;try{return c?this.j(d,0,1)>=0&&this.j(d,1,0)<=0:this.j(d,0,0)>=0&&this.j(d,1,1)<=0}catch(e){return B||f(e),!1}};S.prototype.containsNode=function(a,b){return this.q(T(a),b)};S.prototype.w=function(){return new R(this.b(),this.h(),this.g(),this.i())};function U(a){this.a=a}v(U,S);function Eb(a){var b=F(a).createRange();if(a.nodeType==3)b.setStart(a,0),b.setEnd(a,a.length);else if(V(a)){for(var c,d=a;(c=d.firstChild)&&V(c);)d=c;b.setStart(d,0);for(d=a;(c=d.lastChild)&&V(c);)d=c;b.setEnd(d,d.nodeType==1?d.childNodes.length:d.length)}else c=a.parentNode,a=z(c.childNodes,a),b.setStart(c,a),b.setEnd(c,a+1);return b}function Fb(a,b,c,d){var e=F(a).createRange();e.setStart(a,b);e.setEnd(c,d);return e}p=U.prototype;p.s=function(){return this.a.commonAncestorContainer};
43
+ p.b=function(){return this.a.startContainer};p.h=function(){return this.a.startOffset};p.g=function(){return this.a.endContainer};p.i=function(){return this.a.endOffset};p.j=function(a,b,c){return this.a.compareBoundaryPoints(c==1?b==1?r.Range.START_TO_START:r.Range.START_TO_END:b==1?r.Range.END_TO_START:r.Range.END_TO_END,a)};p.isCollapsed=function(){return this.a.collapsed};p.select=function(a){this.P(bb(F(this.b())).getSelection(),a)};p.P=function(a){a.removeAllRanges();a.addRange(this.a)};
44
+ p.insertNode=function(a,b){var c=this.a.cloneRange();c.collapse(b);c.insertNode(a);c.detach();return a};
45
+ p.K=function(a,b){var c=bb(F(this.b()));if(c=(c=Bb(c||window))&&Gb(c))var d=c.b(),e=c.g(),g=c.h(),i=c.i();var j=this.a.cloneRange(),k=this.a.cloneRange();j.collapse(!1);k.collapse(!0);j.insertNode(b);k.insertNode(a);j.detach();k.detach();if(c){if(d.nodeType==3)for(;g>d.length;){g-=d.length;do d=d.nextSibling;while(d==a||d==b)}if(e.nodeType==3)for(;i>e.length;){i-=e.length;do e=e.nextSibling;while(e==a||e==b)}Hb(d,g,e,i).select()}};p.collapse=function(a){this.a.collapse(a)};function W(a){this.a=a}v(W,U);W.prototype.P=function(a,b){var c=b?this.g():this.b(),d=b?this.i():this.h(),e=b?this.b():this.g(),g=b?this.h():this.i();a.collapse(c,d);(c!=e||d!=g)&&a.extend(e,g)};function Ib(a,b,c,d){M.call(this,a,b,c,l,d)}v(Ib,M);Ib.prototype.next=function(){do Ib.Q.next.call(this);while(this.n==-1);return this.m};function X(a,b){this.a=a;this.ma=b}v(X,S);var Jb=Ab("goog.dom.browserrange.IeRange");function Kb(a){var b=F(a).body.createTextRange();if(a.nodeType==1)b.moveToElementText(a),V(a)&&!a.childNodes.length&&b.collapse(!1);else{for(var c=0,d=a;d=d.previousSibling;){var e=d.nodeType;if(e==3)c+=d.length;else if(e==1){b.moveToElementText(d);break}}d||b.moveToElementText(a.parentNode);b.collapse(!d);c&&b.move("character",c);b.moveEnd("character",a.length)}return b}p=X.prototype;p.u=l;p.d=l;p.c=l;p.f=-1;
46
+ p.e=-1;p.o=function(){this.u=this.d=this.c=l;this.f=this.e=-1};
47
+ p.s=function(){if(!this.u){var a=this.a.text,b=this.a.duplicate(),c=a.replace(/ +$/,"");(c=a.length-c.length)&&b.moveEnd("character",-c);c=b.parentElement();b=b.htmlText.replace(/(\r\n|\r|\n)+/g," ").length;if(this.isCollapsed()&&b>0)return this.u=c;for(;b>c.outerHTML.replace(/(\r\n|\r|\n)+/g," ").length;)c=c.parentNode;for(;c.childNodes.length==1&&c.innerText==(c.firstChild.nodeType==3?c.firstChild.nodeValue:c.firstChild.innerText);){if(!V(c.firstChild))break;c=c.firstChild}a.length==0&&(c=Lb(this,
48
+ c));this.u=c}return this.u};function Lb(a,b){for(var c=b.childNodes,d=0,e=c.length;d<e;d++){var g=c[d];if(V(g)){var i=Kb(g),j=i.htmlText!=g.outerHTML;if(a.isCollapsed()&&j?a.j(i,1,1)>=0&&a.j(i,1,0)<=0:a.a.inRange(i))return Lb(a,g)}}return b}p.b=function(){if(!this.d&&(this.d=Mb(this,1),this.isCollapsed()))this.c=this.d;return this.d};p.h=function(){if(this.f<0&&(this.f=Nb(this,1),this.isCollapsed()))this.e=this.f;return this.f};
49
+ p.g=function(){if(this.isCollapsed())return this.b();if(!this.c)this.c=Mb(this,0);return this.c};p.i=function(){if(this.isCollapsed())return this.h();if(this.e<0&&(this.e=Nb(this,0),this.isCollapsed()))this.f=this.e;return this.e};p.j=function(a,b,c){return this.a.compareEndPoints((b==1?"Start":"End")+"To"+(c==1?"Start":"End"),a)};
50
+ function Mb(a,b,c){c=c||a.s();if(!c||!c.firstChild)return c;for(var d=b==1,e=0,g=c.childNodes.length;e<g;e++){var i=d?e:g-e-1,j=c.childNodes[i],k;try{k=T(j)}catch(q){continue}var n=k.a;if(a.isCollapsed())if(V(j)){if(k.q(a))return Mb(a,b,j)}else{if(a.j(n,1,1)==0){a.f=a.e=i;break}}else if(a.q(k)){if(!V(j)){d?a.f=i:a.e=i+1;break}return Mb(a,b,j)}else if(a.j(n,1,0)<0&&a.j(n,0,1)>0)return Mb(a,b,j)}return c}
51
+ function Nb(a,b){var c=b==1,d=c?a.b():a.g();if(d.nodeType==1){for(var d=d.childNodes,e=d.length,g=c?1:-1,i=c?0:e-1;i>=0&&i<e;i+=g){var j=d[i];if(!V(j)&&a.a.compareEndPoints((b==1?"Start":"End")+"To"+(b==1?"Start":"End"),T(j).a)==0)return c?i:i+1}return i==-1?0:i}else return e=a.a.duplicate(),g=Kb(d),e.setEndPoint(c?"EndToEnd":"StartToStart",g),e=e.text.length,c?d.length-e:e}p.isCollapsed=function(){return this.a.compareEndPoints("StartToEnd",this.a)==0};p.select=function(){this.a.select()};
52
+ function Ob(a,b,c){var d;d=d||Ya(a.parentElement());var e;b.nodeType!=1&&(e=!0,b=d.S("DIV",l,b));a.collapse(c);d=d||Ya(a.parentElement());var g=c=b.id;if(!c)c=b.id="goog_"+ma++;a.pasteHTML(b.outerHTML);(b=u(c)?d.v.getElementById(c):c)&&(g||b.removeAttribute("id"));if(e){a=b.firstChild;e=b;if((d=e.parentNode)&&d.nodeType!=11)if(e.removeNode)e.removeNode(!1);else{for(;b=e.firstChild;)d.insertBefore(b,e);eb(e)}b=a}return b}p.insertNode=function(a,b){var c=Ob(this.a.duplicate(),a,b);this.o();return c};
53
+ p.K=function(a,b){var c=this.a.duplicate(),d=this.a.duplicate();Ob(c,a,!0);Ob(d,b,!1);this.o()};p.collapse=function(a){this.a.collapse(a);a?(this.c=this.d,this.e=this.f):(this.d=this.c,this.f=this.e)};function Pb(a){this.a=a}v(Pb,U);Pb.prototype.P=function(a){a.collapse(this.b(),this.h());(this.g()!=this.b()||this.i()!=this.h())&&a.extend(this.g(),this.i());a.rangeCount==0&&a.addRange(this.a)};function Y(a){this.a=a}v(Y,U);Y.prototype.j=function(a,b,c){if(E("528"))return Y.Q.j.call(this,a,b,c);return this.a.compareBoundaryPoints(c==1?b==1?r.Range.START_TO_START:r.Range.END_TO_START:b==1?r.Range.START_TO_END:r.Range.END_TO_END,a)};Y.prototype.P=function(a,b){a.removeAllRanges();b?a.setBaseAndExtent(this.g(),this.i(),this.b(),this.h()):a.setBaseAndExtent(this.b(),this.h(),this.g(),this.i())};function Qb(a){return B&&!Ra()?new X(a,F(a.parentElement())):Ha?new Y(a):C?new W(a):Ga?new Pb(a):new U(a)}function T(a){if(B&&!Ra()){var b=new X(Kb(a),F(a));if(V(a)){for(var c,d=a;(c=d.firstChild)&&V(c);)d=c;b.d=d;b.f=0;for(d=a;(c=d.lastChild)&&V(c);)d=c;b.c=d;b.e=d.nodeType==1?d.childNodes.length:d.length;b.u=a}else b.d=b.c=b.u=a.parentNode,b.f=z(b.u.childNodes,a),b.e=b.f+1;a=b}else a=Ha?new Y(Eb(a)):C?new W(Eb(a)):Ga?new Pb(Eb(a)):new U(Eb(a));return a}
54
+ function V(a){var b;a:if(a.nodeType!=1)b=!1;else{switch(a.tagName){case "APPLET":case "AREA":case "BASE":case "BR":case "COL":case "FRAME":case "HR":case "IMG":case "INPUT":case "IFRAME":case "ISINDEX":case "LINK":case "NOFRAMES":case "NOSCRIPT":case "META":case "OBJECT":case "PARAM":case "SCRIPT":case "STYLE":b=!1;break a}b=!0}return b||a.nodeType==3};function Rb(){}v(Rb,O);function Sb(a,b){var c=new Rb;c.F=a;c.B=!!b;return c}function Hb(a,b,c,d){var e=new Rb;e.B=Tb(a,b,c,d);if(a.tagName=="BR")var g=a.parentNode,b=z(g.childNodes,a),a=g;if(c.tagName=="BR")g=c.parentNode,d=z(g.childNodes,c),c=g;e.B?(e.d=c,e.f=d,e.c=a,e.e=b):(e.d=a,e.f=b,e.c=c,e.e=d);return e}p=Rb.prototype;p.F=l;p.d=l;p.f=l;p.c=l;p.e=l;p.B=!1;p.U=o("text");p.N=function(){return Z(this).a};p.o=function(){this.d=this.f=this.c=this.e=l};p.z=o(1);p.t=function(){return this};
55
+ function Z(a){var y;var b;if(!(b=a.F)){b=a.b();var c=a.h(),d=a.g(),e=a.i();if(B&&!Ra()){var g=b,i=c,j=d,k=e,q=!1;g.nodeType==1&&(i>g.childNodes.length&&Jb.log(ub,"Cannot have startOffset > startNode child count",h),i=g.childNodes[i],q=!i,g=i||g.lastChild||g,i=0);var n=Kb(g);i&&n.move("character",i);g==j&&i==k?n.collapse(!0):(q&&n.collapse(!1),q=!1,j.nodeType==1&&(k>j.childNodes.length&&Jb.log(ub,"Cannot have endOffset > endNode child count",h),y=(i=j.childNodes[k])||j.lastChild||j,j=y,k=0,q=!i),g=
56
+ Kb(j),g.collapse(!q),k&&g.moveEnd("character",k),n.setEndPoint("EndToEnd",g));k=new X(n,F(b));k.d=b;k.f=c;k.c=d;k.e=e;b=k}else b=Ha?new Y(Fb(b,c,d,e)):C?new W(Fb(b,c,d,e)):Ga?new Pb(Fb(b,c,d,e)):new U(Fb(b,c,d,e));b=a.F=b}return b}p.s=function(){return Z(this).s()};p.b=function(){return this.d||(this.d=Z(this).b())};p.h=function(){return this.f!=l?this.f:this.f=Z(this).h()};p.g=function(){return this.c||(this.c=Z(this).g())};p.i=function(){return this.e!=l?this.e:this.e=Z(this).i()};p.A=m("B");
57
+ p.q=function(a,b){var c=a.U();if(c=="text")return Z(this).q(Z(a),b);else if(c=="control")return c=Ub(a),(b?ta:ua)(c,function(a){return this.containsNode(a,b)},this);return!1};p.isCollapsed=function(){return Z(this).isCollapsed()};p.w=function(){return new R(this.b(),this.h(),this.g(),this.i())};p.select=function(){Z(this).select(this.B)};p.insertNode=function(a,b){var c=Z(this).insertNode(a,b);this.o();return c};p.K=function(a,b){Z(this).K(a,b);this.o()};p.V=function(){return new Vb(this)};
58
+ p.collapse=function(a){a=this.A()?!a:a;this.F&&this.F.collapse(a);a?(this.c=this.d,this.e=this.f):(this.d=this.c,this.f=this.e);this.B=!1};function Vb(a){this.ka=a.A()?a.g():a.b();this.la=a.A()?a.i():a.h();this.na=a.A()?a.b():a.g();this.oa=a.A()?a.h():a.i()}v(Vb,L);function Wb(){}v(Wb,Q);p=Wb.prototype;p.a=l;p.k=l;p.J=l;p.o=function(){this.J=this.k=l};p.U=o("control");p.N=function(){return this.a||document.body.createControlRange()};p.z=function(){return this.a?this.a.length:0};p.t=function(a){a=this.a.item(a);return Sb(T(a),h)};p.s=function(){return ib.apply(l,Ub(this))};p.b=function(){return Xb(this)[0]};p.h=o(0);p.g=function(){var a=Xb(this),b=x(a);return va(a,function(a){return G(a,b)})};p.i=function(){return this.g().childNodes.length};
59
+ function Ub(a){if(!a.k&&(a.k=[],a.a))for(var b=0;b<a.a.length;b++)a.k.push(a.a.item(b));return a.k}function Xb(a){if(!a.J)a.J=Ub(a).concat(),a.J.sort(function(a,c){return a.sourceIndex-c.sourceIndex});return a.J}p.isCollapsed=function(){return!this.a||!this.a.length};p.w=function(){return new Yb(this)};p.select=function(){this.a&&this.a.select()};p.V=function(){return new Zb(this)};p.collapse=function(){this.a=l;this.o()};function Zb(a){this.k=Ub(a)}v(Zb,L);
60
+ function Yb(a){if(a)this.k=Xb(a),this.d=this.k.shift(),this.c=x(this.k)||this.d;P.call(this,this.d,!1)}v(Yb,P);p=Yb.prototype;p.d=l;p.c=l;p.k=l;p.b=m("d");p.g=m("c");p.G=function(){return!this.r&&!this.k.length};p.next=function(){if(this.G())f(H);else if(!this.r){var a=this.k.shift();N(this,a,1,1);return a}return Yb.Q.next.call(this)};function $b(){this.p=[];this.I=[];this.L=this.D=l}v($b,Q);p=$b.prototype;p.fa=Ab("goog.dom.MultiRange");p.o=function(){this.I=[];this.L=this.D=l};p.U=o("mutli");p.N=function(){this.p.length>1&&this.fa.log(vb,"getBrowserRangeObject called on MultiRange with more than 1 range",h);return this.p[0]};p.z=function(){return this.p.length};p.t=function(a){this.I[a]||(this.I[a]=Sb(Qb(this.p[a]),h));return this.I[a]};
61
+ p.s=function(){if(!this.L){for(var a=[],b=0,c=this.z();b<c;b++)a.push(this.t(b).s());this.L=ib.apply(l,a)}return this.L};function ac(a){if(!a.D)a.D=Cb(a),a.D.sort(function(a,c){var d=a.b(),e=a.h(),g=c.b(),i=c.h();if(d==g&&e==i)return 0;return Tb(d,e,g,i)?1:-1});return a.D}p.b=function(){return ac(this)[0].b()};p.h=function(){return ac(this)[0].h()};p.g=function(){return x(ac(this)).g()};p.i=function(){return x(ac(this)).i()};p.isCollapsed=function(){return this.p.length==0||this.p.length==1&&this.t(0).isCollapsed()};
62
+ p.w=function(){return new bc(this)};p.select=function(){var a=Bb(this.$());a.removeAllRanges();for(var b=0,c=this.z();b<c;b++)a.addRange(this.t(b).N())};p.V=function(){return new cc(this)};p.collapse=function(a){if(!this.isCollapsed()){var b=a?this.t(0):this.t(this.z()-1);this.o();b.collapse(a);this.I=[b];this.D=[b];this.p=[b.N()]}};function cc(a){this.sa=sa(Cb(a),function(a){return a.V()})}v(cc,L);function bc(a){if(a)this.C=sa(ac(a),function(a){return lb(a)});P.call(this,a?this.b():l,!1)}v(bc,P);
63
+ p=bc.prototype;p.C=l;p.M=0;p.b=function(){return this.C[0].b()};p.g=function(){return x(this.C).g()};p.G=function(){return this.C[this.M].G()};p.next=function(){try{var a=this.C[this.M],b=a.next();N(this,a.m,a.n,a.r);return b}catch(c){if(c!==H||this.C.length-1==this.M)f(c);else return this.M++,this.next()}};function Gb(a){var b,c=!1;if(a.createRange)try{b=a.createRange()}catch(d){return l}else if(a.rangeCount)if(a.rangeCount>1){b=new $b;for(var c=0,e=a.rangeCount;c<e;c++)b.p.push(a.getRangeAt(c));return b}else b=a.getRangeAt(0),c=Tb(a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset);else return l;b&&b.addElement?(a=new Wb,a.a=b):a=Sb(Qb(b),c);return a}function Db(a){return Sb(T(a),h)}
64
+ function Tb(a,b,c,d){if(a==c)return d<b;var e;if(a.nodeType==1&&b)if(e=a.childNodes[b])a=e,b=0;else if(G(a,c))return!0;if(c.nodeType==1&&d)if(e=c.childNodes[d])c=e,d=0;else if(G(c,a))return!1;return(fb(a,c)||b-d)>0};function dc(a,b){var c=new Db(a);(c=va(nb(c),function(a){return a.nodeType==3&&a.data.indexOf(b)!=-1}))||f("could not find text node matching: "+b);var d=c.data.indexOf(b);Hb(c,d,c,d+b.length).select()}var ec="_".split("."),$=r;!(ec[0]in $)&&$.execScript&&$.execScript("var "+ec[0]);for(var gc;ec.length&&(gc=ec.shift());)!ec.length&&dc!==h?$[gc]=dc:$=$[gc]?$[gc]:$[gc]={};; return this._.apply(null,arguments);}.apply({navigator:typeof window!='undefined'?window.navigator:null}, arguments);}
@@ -1,11 +1,11 @@
1
- function(){
2
- var result = [];
3
- var options = arguments[0].options;
4
- for (var i = 0; i < options.length; i++) {
5
- var option = options[i];
6
- if (option.selected) {
7
- result.push(option)
8
- }
9
- }
10
- return result;
11
- }
1
+ function(){
2
+ var result = [];
3
+ var options = arguments[0].options;
4
+ for (var i = 0; i < options.length; i++) {
5
+ var option = options[i];
6
+ if (option.selected) {
7
+ result.push(option)
8
+ }
9
+ }
10
+ return result;
11
+ }
@@ -1,3 +1,3 @@
1
- function(){
2
- arguments[0].value=arguments[1]
3
- }
1
+ function(){
2
+ arguments[0].value=arguments[1]
3
+ }
@@ -1,126 +1,126 @@
1
- require 'forwardable'
2
-
3
- # TODO - remove this file for future release
4
- module Watir
5
-
6
- class BaseDecorator
7
- def initialize(element, timeout, message = nil)
8
- @element = element
9
- @timeout = timeout
10
- @message = message
11
- end
12
-
13
- def respond_to?(*args)
14
- @element.respond_to?(*args)
15
- end
16
-
17
- def method_missing(m, *args, &block)
18
- unless @element.respond_to?(m)
19
- raise NoMethodError, "undefined method `#{m}' for #{@element.inspect}:#{@element.class}"
20
- end
21
-
22
- Watir::Wait.until(@timeout, @message) { wait_until }
23
-
24
- @element.__send__(m, *args, &block)
25
- end
26
- end
27
-
28
- #
29
- # Wraps an Element so that any subsequent method calls are
30
- # put on hold until the element is present (exists and is visible) on the page.
31
- #
32
-
33
- class WhenPresentDecorator < BaseDecorator
34
- def present?
35
- Watir::Wait.until(@timeout, @message) { wait_until }
36
- true
37
- rescue Watir::Wait::TimeoutError
38
- false
39
- end
40
-
41
- private
42
-
43
- def wait_until
44
- @element.present?
45
- end
46
- end # WhenPresentDecorator
47
-
48
- #
49
- # Wraps an Element so that any subsequent method calls are
50
- # put on hold until the element is enabled (exists and is enabled) on the page.
51
- #
52
-
53
- class WhenEnabledDecorator < BaseDecorator
54
-
55
- private
56
-
57
- def wait_until
58
- @element.enabled?
59
- end
60
- end # WhenEnabledDecorator
61
-
62
- #
63
- # Convenience methods for things that eventually become present.
64
- #
65
- # Includers should implement a public #present? and a (possibly private) #selector_string method.
66
- #
67
-
68
- module EventuallyPresent
69
- #
70
- # Waits until the element is present.
71
- #
72
- # @example
73
- # browser.text_field(name: "new_user_first_name").when_present.click
74
- # browser.text_field(name: "new_user_first_name").when_present { |field| field.set "Watir" }
75
- # browser.text_field(name: "new_user_first_name").when_present(60).text
76
- #
77
- # @param [Integer] timeout seconds to wait before timing out
78
- #
79
- # @see Watir::Wait
80
- # @see Watir::Element#present?
81
- #
82
-
83
- def when_present(timeout = nil)
84
- warning = '#when_present has been deprecated and is unlikely to be needed; '
85
- warning << 'replace this with #wait_until_present if a wait is still needed'
86
- Watir.logger.warn warning
87
-
88
- timeout ||= Watir.default_timeout
89
- message = "waiting for #{selector_string} to become present"
90
-
91
- if block_given?
92
- Watir::Wait.until(timeout, message) { present? }
93
- yield self
94
- else
95
- WhenPresentDecorator.new(self, timeout, message)
96
- end
97
- end
98
-
99
- #
100
- # Waits until the element is enabled.
101
- #
102
- # @example
103
- # browser.button(name: "new_user_button_2").when_enabled.click
104
- #
105
- # @param [Integer] timeout seconds to wait before timing out
106
- #
107
- # @see Watir::Wait
108
- # @see Watir::Element#enabled?
109
- #
110
-
111
- def when_enabled(timeout = nil)
112
- Watir.logger.warn '#when_enabled has been deprecated and is unlikely to be needed'
113
-
114
- timeout ||= Watir.default_timeout
115
- message = "waiting for #{selector_string} to become enabled"
116
-
117
- if block_given?
118
- Watir::Wait.until(timeout, message) { enabled? }
119
- yield self
120
- else
121
- WhenEnabledDecorator.new(self, timeout, message)
122
- end
123
- end
124
-
125
- end # EventuallyPresent
126
- end # Watir
1
+ require 'forwardable'
2
+
3
+ # TODO - remove this file for future release
4
+ module Watir
5
+
6
+ class BaseDecorator
7
+ def initialize(element, timeout, message = nil)
8
+ @element = element
9
+ @timeout = timeout
10
+ @message = message
11
+ end
12
+
13
+ def respond_to?(*args)
14
+ @element.respond_to?(*args)
15
+ end
16
+
17
+ def method_missing(m, *args, &block)
18
+ unless @element.respond_to?(m)
19
+ raise NoMethodError, "undefined method `#{m}' for #{@element.inspect}:#{@element.class}"
20
+ end
21
+
22
+ Watir::Wait.until(@timeout, @message) { wait_until }
23
+
24
+ @element.__send__(m, *args, &block)
25
+ end
26
+ end
27
+
28
+ #
29
+ # Wraps an Element so that any subsequent method calls are
30
+ # put on hold until the element is present (exists and is visible) on the page.
31
+ #
32
+
33
+ class WhenPresentDecorator < BaseDecorator
34
+ def present?
35
+ Watir::Wait.until(@timeout, @message) { wait_until }
36
+ true
37
+ rescue Watir::Wait::TimeoutError
38
+ false
39
+ end
40
+
41
+ private
42
+
43
+ def wait_until
44
+ @element.present?
45
+ end
46
+ end # WhenPresentDecorator
47
+
48
+ #
49
+ # Wraps an Element so that any subsequent method calls are
50
+ # put on hold until the element is enabled (exists and is enabled) on the page.
51
+ #
52
+
53
+ class WhenEnabledDecorator < BaseDecorator
54
+
55
+ private
56
+
57
+ def wait_until
58
+ @element.enabled?
59
+ end
60
+ end # WhenEnabledDecorator
61
+
62
+ #
63
+ # Convenience methods for things that eventually become present.
64
+ #
65
+ # Includers should implement a public #present? and a (possibly private) #selector_string method.
66
+ #
67
+
68
+ module EventuallyPresent
69
+ #
70
+ # Waits until the element is present.
71
+ #
72
+ # @example
73
+ # browser.text_field(name: "new_user_first_name").when_present.click
74
+ # browser.text_field(name: "new_user_first_name").when_present { |field| field.set "Watir" }
75
+ # browser.text_field(name: "new_user_first_name").when_present(60).text
76
+ #
77
+ # @param [Integer] timeout seconds to wait before timing out
78
+ #
79
+ # @see Watir::Wait
80
+ # @see Watir::Element#present?
81
+ #
82
+
83
+ def when_present(timeout = nil)
84
+ warning = '#when_present has been deprecated and is unlikely to be needed; '
85
+ warning << 'replace this with #wait_until_present if a wait is still needed'
86
+ Watir.logger.warn warning
87
+
88
+ timeout ||= Watir.default_timeout
89
+ message = "waiting for #{selector_string} to become present"
90
+
91
+ if block_given?
92
+ Watir::Wait.until(timeout, message) { present? }
93
+ yield self
94
+ else
95
+ WhenPresentDecorator.new(self, timeout, message)
96
+ end
97
+ end
98
+
99
+ #
100
+ # Waits until the element is enabled.
101
+ #
102
+ # @example
103
+ # browser.button(name: "new_user_button_2").when_enabled.click
104
+ #
105
+ # @param [Integer] timeout seconds to wait before timing out
106
+ #
107
+ # @see Watir::Wait
108
+ # @see Watir::Element#enabled?
109
+ #
110
+
111
+ def when_enabled(timeout = nil)
112
+ Watir.logger.warn '#when_enabled has been deprecated and is unlikely to be needed'
113
+
114
+ timeout ||= Watir.default_timeout
115
+ message = "waiting for #{selector_string} to become enabled"
116
+
117
+ if block_given?
118
+ Watir::Wait.until(timeout, message) { enabled? }
119
+ yield self
120
+ else
121
+ WhenEnabledDecorator.new(self, timeout, message)
122
+ end
123
+ end
124
+
125
+ end # EventuallyPresent
126
+ end # Watir