capybara 2.18.0 → 3.39.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (317) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -1
  3. data/History.md +923 -12
  4. data/License.txt +1 -1
  5. data/README.md +108 -78
  6. data/lib/capybara/config.rb +29 -57
  7. data/lib/capybara/cucumber.rb +2 -3
  8. data/lib/capybara/driver/base.rb +35 -18
  9. data/lib/capybara/driver/node.rb +40 -10
  10. data/lib/capybara/dsl.rb +10 -7
  11. data/lib/capybara/helpers.rb +70 -31
  12. data/lib/capybara/minitest/spec.rb +173 -83
  13. data/lib/capybara/minitest.rb +219 -112
  14. data/lib/capybara/node/actions.rb +274 -171
  15. data/lib/capybara/node/base.rb +42 -34
  16. data/lib/capybara/node/document.rb +15 -3
  17. data/lib/capybara/node/document_matchers.rb +19 -21
  18. data/lib/capybara/node/element.rb +362 -135
  19. data/lib/capybara/node/finders.rb +151 -137
  20. data/lib/capybara/node/matchers.rb +369 -209
  21. data/lib/capybara/node/simple.rb +59 -26
  22. data/lib/capybara/node/whitespace_normalizer.rb +81 -0
  23. data/lib/capybara/queries/active_element_query.rb +18 -0
  24. data/lib/capybara/queries/ancestor_query.rb +12 -9
  25. data/lib/capybara/queries/base_query.rb +39 -28
  26. data/lib/capybara/queries/current_path_query.rb +21 -27
  27. data/lib/capybara/queries/match_query.rb +14 -7
  28. data/lib/capybara/queries/selector_query.rb +658 -149
  29. data/lib/capybara/queries/sibling_query.rb +11 -9
  30. data/lib/capybara/queries/style_query.rb +45 -0
  31. data/lib/capybara/queries/text_query.rb +56 -38
  32. data/lib/capybara/queries/title_query.rb +8 -11
  33. data/lib/capybara/rack_test/browser.rb +113 -42
  34. data/lib/capybara/rack_test/css_handlers.rb +6 -4
  35. data/lib/capybara/rack_test/driver.rb +22 -17
  36. data/lib/capybara/rack_test/errors.rb +6 -0
  37. data/lib/capybara/rack_test/form.rb +93 -58
  38. data/lib/capybara/rack_test/node.rb +191 -81
  39. data/lib/capybara/rails.rb +3 -7
  40. data/lib/capybara/registration_container.rb +41 -0
  41. data/lib/capybara/registrations/drivers.rb +42 -0
  42. data/lib/capybara/registrations/patches/puma_ssl.rb +29 -0
  43. data/lib/capybara/registrations/servers.rb +65 -0
  44. data/lib/capybara/result.rb +96 -62
  45. data/lib/capybara/rspec/features.rb +17 -50
  46. data/lib/capybara/rspec/matcher_proxies.rb +52 -15
  47. data/lib/capybara/rspec/matchers/base.rb +113 -0
  48. data/lib/capybara/rspec/matchers/become_closed.rb +33 -0
  49. data/lib/capybara/rspec/matchers/compound.rb +88 -0
  50. data/lib/capybara/rspec/matchers/count_sugar.rb +37 -0
  51. data/lib/capybara/rspec/matchers/have_ancestor.rb +28 -0
  52. data/lib/capybara/rspec/matchers/have_current_path.rb +29 -0
  53. data/lib/capybara/rspec/matchers/have_selector.rb +77 -0
  54. data/lib/capybara/rspec/matchers/have_sibling.rb +27 -0
  55. data/lib/capybara/rspec/matchers/have_text.rb +33 -0
  56. data/lib/capybara/rspec/matchers/have_title.rb +29 -0
  57. data/lib/capybara/rspec/matchers/match_selector.rb +27 -0
  58. data/lib/capybara/rspec/matchers/match_style.rb +43 -0
  59. data/lib/capybara/rspec/matchers/spatial_sugar.rb +39 -0
  60. data/lib/capybara/rspec/matchers.rb +142 -311
  61. data/lib/capybara/rspec.rb +7 -11
  62. data/lib/capybara/selector/builders/css_builder.rb +84 -0
  63. data/lib/capybara/selector/builders/xpath_builder.rb +71 -0
  64. data/lib/capybara/selector/css.rb +89 -17
  65. data/lib/capybara/selector/definition/button.rb +68 -0
  66. data/lib/capybara/selector/definition/checkbox.rb +26 -0
  67. data/lib/capybara/selector/definition/css.rb +10 -0
  68. data/lib/capybara/selector/definition/datalist_input.rb +35 -0
  69. data/lib/capybara/selector/definition/datalist_option.rb +25 -0
  70. data/lib/capybara/selector/definition/element.rb +28 -0
  71. data/lib/capybara/selector/definition/field.rb +40 -0
  72. data/lib/capybara/selector/definition/fieldset.rb +14 -0
  73. data/lib/capybara/selector/definition/file_field.rb +13 -0
  74. data/lib/capybara/selector/definition/fillable_field.rb +33 -0
  75. data/lib/capybara/selector/definition/frame.rb +17 -0
  76. data/lib/capybara/selector/definition/id.rb +6 -0
  77. data/lib/capybara/selector/definition/label.rb +62 -0
  78. data/lib/capybara/selector/definition/link.rb +55 -0
  79. data/lib/capybara/selector/definition/link_or_button.rb +16 -0
  80. data/lib/capybara/selector/definition/option.rb +27 -0
  81. data/lib/capybara/selector/definition/radio_button.rb +27 -0
  82. data/lib/capybara/selector/definition/select.rb +81 -0
  83. data/lib/capybara/selector/definition/table.rb +109 -0
  84. data/lib/capybara/selector/definition/table_row.rb +21 -0
  85. data/lib/capybara/selector/definition/xpath.rb +5 -0
  86. data/lib/capybara/selector/definition.rb +280 -0
  87. data/lib/capybara/selector/filter.rb +2 -17
  88. data/lib/capybara/selector/filter_set.rb +80 -33
  89. data/lib/capybara/selector/filters/base.rb +50 -6
  90. data/lib/capybara/selector/filters/expression_filter.rb +8 -26
  91. data/lib/capybara/selector/filters/locator_filter.rb +29 -0
  92. data/lib/capybara/selector/filters/node_filter.rb +16 -12
  93. data/lib/capybara/selector/regexp_disassembler.rb +211 -0
  94. data/lib/capybara/selector/selector.rb +93 -210
  95. data/lib/capybara/selector/xpath_extensions.rb +17 -0
  96. data/lib/capybara/selector.rb +227 -526
  97. data/lib/capybara/selenium/atoms/getAttribute.min.js +1 -0
  98. data/lib/capybara/selenium/atoms/isDisplayed.min.js +1 -0
  99. data/lib/capybara/selenium/atoms/src/getAttribute.js +161 -0
  100. data/lib/capybara/selenium/atoms/src/isDisplayed.js +454 -0
  101. data/lib/capybara/selenium/driver.rb +332 -261
  102. data/lib/capybara/selenium/driver_specializations/chrome_driver.rb +117 -0
  103. data/lib/capybara/selenium/driver_specializations/edge_driver.rb +128 -0
  104. data/lib/capybara/selenium/driver_specializations/firefox_driver.rb +89 -0
  105. data/lib/capybara/selenium/driver_specializations/internet_explorer_driver.rb +26 -0
  106. data/lib/capybara/selenium/driver_specializations/safari_driver.rb +24 -0
  107. data/lib/capybara/selenium/extensions/file_input_click_emulation.rb +34 -0
  108. data/lib/capybara/selenium/extensions/find.rb +110 -0
  109. data/lib/capybara/selenium/extensions/html5_drag.rb +229 -0
  110. data/lib/capybara/selenium/extensions/modifier_keys_stack.rb +28 -0
  111. data/lib/capybara/selenium/extensions/scroll.rb +76 -0
  112. data/lib/capybara/selenium/logger_suppressor.rb +44 -0
  113. data/lib/capybara/selenium/node.rb +543 -144
  114. data/lib/capybara/selenium/nodes/chrome_node.rb +141 -0
  115. data/lib/capybara/selenium/nodes/edge_node.rb +126 -0
  116. data/lib/capybara/selenium/nodes/firefox_node.rb +136 -0
  117. data/lib/capybara/selenium/nodes/ie_node.rb +22 -0
  118. data/lib/capybara/selenium/nodes/safari_node.rb +118 -0
  119. data/lib/capybara/selenium/patches/action_pauser.rb +26 -0
  120. data/lib/capybara/selenium/patches/atoms.rb +18 -0
  121. data/lib/capybara/selenium/patches/is_displayed.rb +16 -0
  122. data/lib/capybara/selenium/patches/logs.rb +45 -0
  123. data/lib/capybara/selenium/patches/pause_duration_fix.rb +9 -0
  124. data/lib/capybara/selenium/patches/persistent_client.rb +20 -0
  125. data/lib/capybara/server/animation_disabler.rb +80 -0
  126. data/lib/capybara/server/checker.rb +44 -0
  127. data/lib/capybara/server/middleware.rb +71 -0
  128. data/lib/capybara/server.rb +59 -67
  129. data/lib/capybara/session/config.rb +81 -67
  130. data/lib/capybara/session/matchers.rb +28 -20
  131. data/lib/capybara/session.rb +336 -365
  132. data/lib/capybara/spec/public/jquery.js +5 -5
  133. data/lib/capybara/spec/public/offset.js +6 -0
  134. data/lib/capybara/spec/public/test.js +151 -12
  135. data/lib/capybara/spec/session/accept_alert_spec.rb +12 -11
  136. data/lib/capybara/spec/session/accept_confirm_spec.rb +6 -5
  137. data/lib/capybara/spec/session/accept_prompt_spec.rb +10 -10
  138. data/lib/capybara/spec/session/active_element_spec.rb +31 -0
  139. data/lib/capybara/spec/session/all_spec.rb +161 -57
  140. data/lib/capybara/spec/session/ancestor_spec.rb +27 -24
  141. data/lib/capybara/spec/session/assert_all_of_selectors_spec.rb +68 -38
  142. data/lib/capybara/spec/session/assert_current_path_spec.rb +75 -0
  143. data/lib/capybara/spec/session/assert_selector_spec.rb +143 -0
  144. data/lib/capybara/spec/session/assert_style_spec.rb +26 -0
  145. data/lib/capybara/spec/session/assert_text_spec.rb +258 -0
  146. data/lib/capybara/spec/session/{assert_title.rb → assert_title_spec.rb} +22 -12
  147. data/lib/capybara/spec/session/attach_file_spec.rb +144 -69
  148. data/lib/capybara/spec/session/body_spec.rb +12 -13
  149. data/lib/capybara/spec/session/check_spec.rb +117 -55
  150. data/lib/capybara/spec/session/choose_spec.rb +64 -31
  151. data/lib/capybara/spec/session/click_button_spec.rb +231 -173
  152. data/lib/capybara/spec/session/click_link_or_button_spec.rb +55 -35
  153. data/lib/capybara/spec/session/click_link_spec.rb +93 -58
  154. data/lib/capybara/spec/session/current_scope_spec.rb +12 -11
  155. data/lib/capybara/spec/session/current_url_spec.rb +57 -39
  156. data/lib/capybara/spec/session/dismiss_confirm_spec.rb +4 -4
  157. data/lib/capybara/spec/session/dismiss_prompt_spec.rb +3 -2
  158. data/lib/capybara/spec/session/element/{assert_match_selector.rb → assert_match_selector_spec.rb} +11 -9
  159. data/lib/capybara/spec/session/element/match_css_spec.rb +18 -10
  160. data/lib/capybara/spec/session/element/match_xpath_spec.rb +9 -7
  161. data/lib/capybara/spec/session/element/matches_selector_spec.rb +71 -57
  162. data/lib/capybara/spec/session/evaluate_async_script_spec.rb +8 -7
  163. data/lib/capybara/spec/session/evaluate_script_spec.rb +29 -8
  164. data/lib/capybara/spec/session/execute_script_spec.rb +10 -8
  165. data/lib/capybara/spec/session/fill_in_spec.rb +134 -43
  166. data/lib/capybara/spec/session/find_button_spec.rb +25 -24
  167. data/lib/capybara/spec/session/find_by_id_spec.rb +10 -9
  168. data/lib/capybara/spec/session/find_field_spec.rb +37 -41
  169. data/lib/capybara/spec/session/find_link_spec.rb +46 -17
  170. data/lib/capybara/spec/session/find_spec.rb +252 -145
  171. data/lib/capybara/spec/session/first_spec.rb +80 -52
  172. data/lib/capybara/spec/session/frame/frame_title_spec.rb +23 -0
  173. data/lib/capybara/spec/session/frame/frame_url_spec.rb +23 -0
  174. data/lib/capybara/spec/session/frame/switch_to_frame_spec.rb +33 -20
  175. data/lib/capybara/spec/session/frame/within_frame_spec.rb +52 -32
  176. data/lib/capybara/spec/session/go_back_spec.rb +2 -1
  177. data/lib/capybara/spec/session/go_forward_spec.rb +2 -1
  178. data/lib/capybara/spec/session/has_all_selectors_spec.rb +31 -31
  179. data/lib/capybara/spec/session/has_ancestor_spec.rb +46 -0
  180. data/lib/capybara/spec/session/has_any_selectors_spec.rb +29 -0
  181. data/lib/capybara/spec/session/has_button_spec.rb +100 -13
  182. data/lib/capybara/spec/session/has_css_spec.rb +272 -137
  183. data/lib/capybara/spec/session/has_current_path_spec.rb +60 -61
  184. data/lib/capybara/spec/session/has_field_spec.rb +139 -59
  185. data/lib/capybara/spec/session/has_link_spec.rb +47 -6
  186. data/lib/capybara/spec/session/has_none_selectors_spec.rb +42 -40
  187. data/lib/capybara/spec/session/has_select_spec.rb +107 -72
  188. data/lib/capybara/spec/session/has_selector_spec.rb +120 -71
  189. data/lib/capybara/spec/session/has_sibling_spec.rb +50 -0
  190. data/lib/capybara/spec/session/has_table_spec.rb +172 -5
  191. data/lib/capybara/spec/session/has_text_spec.rb +106 -62
  192. data/lib/capybara/spec/session/has_title_spec.rb +20 -14
  193. data/lib/capybara/spec/session/has_xpath_spec.rb +57 -38
  194. data/lib/capybara/spec/session/{headers.rb → headers_spec.rb} +3 -2
  195. data/lib/capybara/spec/session/html_spec.rb +14 -6
  196. data/lib/capybara/spec/session/matches_style_spec.rb +37 -0
  197. data/lib/capybara/spec/session/node_spec.rb +1018 -153
  198. data/lib/capybara/spec/session/node_wrapper_spec.rb +39 -0
  199. data/lib/capybara/spec/session/refresh_spec.rb +12 -6
  200. data/lib/capybara/spec/session/reset_session_spec.rb +82 -35
  201. data/lib/capybara/spec/session/{response_code.rb → response_code_spec.rb} +2 -1
  202. data/lib/capybara/spec/session/save_and_open_page_spec.rb +3 -2
  203. data/lib/capybara/spec/session/save_and_open_screenshot_spec.rb +8 -12
  204. data/lib/capybara/spec/session/save_page_spec.rb +42 -55
  205. data/lib/capybara/spec/session/save_screenshot_spec.rb +16 -14
  206. data/lib/capybara/spec/session/screenshot_spec.rb +2 -2
  207. data/lib/capybara/spec/session/scroll_spec.rb +119 -0
  208. data/lib/capybara/spec/session/select_spec.rb +107 -81
  209. data/lib/capybara/spec/session/selectors_spec.rb +52 -19
  210. data/lib/capybara/spec/session/sibling_spec.rb +10 -10
  211. data/lib/capybara/spec/session/text_spec.rb +37 -21
  212. data/lib/capybara/spec/session/title_spec.rb +17 -5
  213. data/lib/capybara/spec/session/uncheck_spec.rb +42 -22
  214. data/lib/capybara/spec/session/unselect_spec.rb +39 -38
  215. data/lib/capybara/spec/session/visit_spec.rb +85 -53
  216. data/lib/capybara/spec/session/window/become_closed_spec.rb +24 -20
  217. data/lib/capybara/spec/session/window/current_window_spec.rb +5 -3
  218. data/lib/capybara/spec/session/window/open_new_window_spec.rb +5 -3
  219. data/lib/capybara/spec/session/window/switch_to_window_spec.rb +27 -22
  220. data/lib/capybara/spec/session/window/window_opened_by_spec.rb +12 -6
  221. data/lib/capybara/spec/session/window/window_spec.rb +97 -63
  222. data/lib/capybara/spec/session/window/windows_spec.rb +12 -10
  223. data/lib/capybara/spec/session/window/within_window_spec.rb +31 -86
  224. data/lib/capybara/spec/session/within_spec.rb +83 -44
  225. data/lib/capybara/spec/spec_helper.rb +53 -43
  226. data/lib/capybara/spec/test_app.rb +158 -43
  227. data/lib/capybara/spec/views/animated.erb +49 -0
  228. data/lib/capybara/spec/views/form.erb +158 -42
  229. data/lib/capybara/spec/views/frame_child.erb +4 -3
  230. data/lib/capybara/spec/views/frame_one.erb +2 -1
  231. data/lib/capybara/spec/views/frame_parent.erb +1 -1
  232. data/lib/capybara/spec/views/frame_two.erb +1 -1
  233. data/lib/capybara/spec/views/initial_alert.erb +2 -1
  234. data/lib/capybara/spec/views/layout.erb +10 -0
  235. data/lib/capybara/spec/views/obscured.erb +47 -0
  236. data/lib/capybara/spec/views/offset.erb +33 -0
  237. data/lib/capybara/spec/views/path.erb +2 -2
  238. data/lib/capybara/spec/views/popup_one.erb +1 -1
  239. data/lib/capybara/spec/views/popup_two.erb +1 -1
  240. data/lib/capybara/spec/views/react.erb +45 -0
  241. data/lib/capybara/spec/views/scroll.erb +21 -0
  242. data/lib/capybara/spec/views/spatial.erb +31 -0
  243. data/lib/capybara/spec/views/tables.erb +68 -1
  244. data/lib/capybara/spec/views/with_animation.erb +81 -0
  245. data/lib/capybara/spec/views/with_base_tag.erb +2 -2
  246. data/lib/capybara/spec/views/with_dragula.erb +24 -0
  247. data/lib/capybara/spec/views/with_fixed_header_footer.erb +2 -1
  248. data/lib/capybara/spec/views/with_hover.erb +3 -2
  249. data/lib/capybara/spec/views/with_hover1.erb +10 -0
  250. data/lib/capybara/spec/views/with_html.erb +67 -12
  251. data/lib/capybara/spec/views/with_html5_svg.erb +20 -0
  252. data/lib/capybara/spec/views/with_jquery_animation.erb +24 -0
  253. data/lib/capybara/spec/views/with_js.erb +30 -5
  254. data/lib/capybara/spec/views/with_jstree.erb +26 -0
  255. data/lib/capybara/spec/views/with_namespace.erb +21 -0
  256. data/lib/capybara/spec/views/with_scope.erb +2 -2
  257. data/lib/capybara/spec/views/with_scope_other.erb +6 -0
  258. data/lib/capybara/spec/views/with_shadow.erb +31 -0
  259. data/lib/capybara/spec/views/with_slow_unload.erb +2 -1
  260. data/lib/capybara/spec/views/with_sortable_js.erb +21 -0
  261. data/lib/capybara/spec/views/with_unload_alert.erb +1 -0
  262. data/lib/capybara/spec/views/with_windows.erb +1 -1
  263. data/lib/capybara/spec/views/within_frames.erb +5 -2
  264. data/lib/capybara/version.rb +2 -1
  265. data/lib/capybara/window.rb +36 -34
  266. data/lib/capybara.rb +129 -103
  267. data/spec/basic_node_spec.rb +60 -34
  268. data/spec/capybara_spec.rb +63 -88
  269. data/spec/counter_spec.rb +35 -0
  270. data/spec/css_builder_spec.rb +101 -0
  271. data/spec/css_splitter_spec.rb +38 -0
  272. data/spec/dsl_spec.rb +85 -64
  273. data/spec/filter_set_spec.rb +27 -9
  274. data/spec/fixtures/certificate.pem +25 -0
  275. data/spec/fixtures/key.pem +27 -0
  276. data/spec/fixtures/selenium_driver_rspec_failure.rb +6 -5
  277. data/spec/fixtures/selenium_driver_rspec_success.rb +6 -5
  278. data/spec/minitest_spec.rb +45 -7
  279. data/spec/minitest_spec_spec.rb +94 -63
  280. data/spec/per_session_config_spec.rb +14 -13
  281. data/spec/rack_test_spec.rb +194 -125
  282. data/spec/regexp_dissassembler_spec.rb +250 -0
  283. data/spec/result_spec.rb +102 -50
  284. data/spec/rspec/features_spec.rb +37 -31
  285. data/spec/rspec/scenarios_spec.rb +10 -8
  286. data/spec/rspec/shared_spec_matchers.rb +449 -422
  287. data/spec/rspec/views_spec.rb +5 -3
  288. data/spec/rspec_matchers_spec.rb +52 -11
  289. data/spec/rspec_spec.rb +109 -89
  290. data/spec/sauce_spec_chrome.rb +43 -0
  291. data/spec/selector_spec.rb +397 -68
  292. data/spec/selenium_spec_chrome.rb +185 -40
  293. data/spec/selenium_spec_chrome_remote.rb +101 -0
  294. data/spec/selenium_spec_edge.rb +53 -0
  295. data/spec/selenium_spec_firefox.rb +200 -41
  296. data/spec/selenium_spec_firefox_remote.rb +95 -0
  297. data/spec/selenium_spec_ie.rb +149 -0
  298. data/spec/selenium_spec_safari.rb +162 -0
  299. data/spec/server_spec.rb +201 -102
  300. data/spec/session_spec.rb +53 -16
  301. data/spec/shared_selenium_node.rb +79 -0
  302. data/spec/shared_selenium_session.rb +475 -122
  303. data/spec/spec_helper.rb +126 -7
  304. data/spec/whitespace_normalizer_spec.rb +54 -0
  305. data/spec/xpath_builder_spec.rb +93 -0
  306. metadata +362 -73
  307. data/.yard/templates_custom/default/class/html/selectors.erb +0 -38
  308. data/.yard/templates_custom/default/class/html/setup.rb +0 -17
  309. data/.yard/yard_extensions.rb +0 -78
  310. data/lib/capybara/query.rb +0 -7
  311. data/lib/capybara/rspec/compound.rb +0 -95
  312. data/lib/capybara/spec/session/assert_current_path.rb +0 -72
  313. data/lib/capybara/spec/session/assert_selector.rb +0 -148
  314. data/lib/capybara/spec/session/assert_text.rb +0 -234
  315. data/lib/capybara/spec/session/source_spec.rb +0 -0
  316. data/lib/capybara/spec/views/with_title.erb +0 -5
  317. data/spec/selenium_spec_marionette.rb +0 -127
data/History.md CHANGED
@@ -1,4 +1,914 @@
1
- #Version 2.18.0
1
+ # Version 3.39.2
2
+ Release date: 2023-06-10
3
+
4
+ ### Fixed
5
+
6
+ * Fix Selenium version comparison [aki77]
7
+
8
+ # Version 3.39.1
9
+ Release date: 2023-05-12
10
+
11
+ ### Fixed
12
+
13
+ * Fix usage of Selenium logger
14
+
15
+ # Version 3.39.0
16
+ Release date: 2023-04-02
17
+
18
+ ### Added
19
+
20
+ * Support `:target` filter option on `:link` selector [Yudai Takada]
21
+ * Experimental Rack 3 support
22
+ * Text normalization performance improvements [Brandon Weaver]
23
+
24
+ ### Fixed
25
+
26
+ * MS Edge button click [Brian J. Bayer]
27
+ * Options/Capabilities choosing based on Selenium versions
28
+ * Support for base versions [Matijs van Zuijlen]
29
+ * ExpectedError not defined in Selenium 4+
30
+ * Filter block forwarding to a number of matchers [Christophe Bliard]
31
+ ### Changed
32
+
33
+ * Dropped support for rack 1.x
34
+
35
+ # Version 3.38.0
36
+ Release date: 2022-11-03
37
+
38
+ ### Changed
39
+
40
+ * Capybara.w3c_click_offset now defaults to true. If you need click offsets to be from the elements top left corner set it to false in your config
41
+
42
+ ### Added
43
+
44
+ * Support Selenium 4.3 changes to click offset calculations
45
+ * `click`, `double_click`, `right_click` can now be called on the session to click the currently scoped element (or document)
46
+ * `Session#within` now passes the scoped element to the block
47
+ * Support rack-test 2+
48
+ * Retry interval is now configurable [Masahiro NOMOTO]
49
+ * Support Puma 6 - Issue #2590
50
+ * Selenium: DetachedShadowRootError is treated as an invalid element error [Perryn Fowler]
51
+ * Selenium: When inspected shadow roots will have a tag name of "ShadowRoot"
52
+ * `evaluate_async_script` added to Session::DSL_METHODS [Henry Blyth]
53
+
54
+ ### Fixed
55
+
56
+ * Use higher precision clock in Capybara::Helpers::Timer if available
57
+ * rack-test driver behavior with \r\n - Issue #2547 [Stefan Hoffmann]
58
+ * Updated for deprecation of positional parameters in Selenium::WebDriver::ActionBuilder#pause
59
+ * Explicitly set cause on server raised errors
60
+ * Options no longer duplicated in have_xxx invalid option error message [Yudai Takada]
61
+ * Animation disabler is now threadsafe [Daniel Sheppard]
62
+ * Server connection count tracking [Oleksandr K.]
63
+ * Ensure scopes are reset when session is [Henry Blyth]
64
+
65
+ # Version 3.37.1
66
+ Release date: 2022-05-09
67
+
68
+ ### Fixed
69
+
70
+ * Regression in rack-test visit - Issue #2548
71
+
72
+ # Version 3.37.0
73
+ Release date: 2022-05-07
74
+
75
+ ### Changed
76
+
77
+ * Ruby 2.7.0+ is now required
78
+
79
+ ### Added
80
+
81
+ * [Beta] CSP nonces inserted into animation disabler additions - Issue #2542
82
+ * Support `<base>` element in rack-test driver - ISsue #2544
83
+ * [Beta] `Element#shadow_root` support. Requires selenium-webdriver 4.1+. Only currently supported with Chrome when using the selenium driver. Note: only CSS can be used to find elements from the shadow root. Therefore you won't be able to use most Capybara helper methods (`fill_in`, `click_link`, `find_field`, etc) directly from the shadow root since those locators are built using XPath. If you first locate a descendant from the shadow root using CSS then you should be able to use all the Capybara methods from there.
84
+ * Regexp now supported for `exact_text` finder option
85
+
86
+ ### Fixed
87
+
88
+ * Fragments in referer headers in rack-test driver - Issue #2525
89
+ * Selenium v4.1 deprecation notice
90
+
91
+ # Version 3.36.0
92
+ Release date: 2021-10-24
93
+
94
+ ### Changed
95
+
96
+ * Ruby 2.6.0+ is now required
97
+ * Minimum selenium-webdriver supported is now 3.142.7
98
+
99
+ ### Added
100
+
101
+ * Support for selenium-webdriver 4.x
102
+ * `allow_label_click` accepts click options to be used when clicking an associated label
103
+ * Deprecated `allow_gumbo=` in favor of `use_html5_parsing=` to enable use of Nokogiri::HTML5 when available
104
+ * `Session#active_element` returns the element with focus - Not supported by the `RackTest` driver [Sean Doyle]
105
+ * Support `focused:` filter for finding interactive elements - Not supported by the `RackTest` driver [Sean Doyle]
106
+
107
+ ### Fixed
108
+
109
+ * Sibling and ancestor queries now work with Simple::Node - Issue #2452
110
+ * rack_test correctly ignores readonly attribute on specific input element types
111
+ * `Node#all_text` always returns a string - Issue #2477
112
+ * `have_any_of_selectors` negated match - Issue #2473
113
+ * `Document#scroll_to` fixed for standards behavior - pass quirks: true if you need the older behavior [Eric Anderson]
114
+ * Use capture on attach file event listener for better React compatibility [Jeff Way]
115
+ * Animation disabler produces valid HTML [Javi Martin]
116
+
117
+ ### Removed
118
+
119
+ * References to non-w3c mode in drivers/tests. Non-w3c mode is obsolete and no one should be using it anymore. Capybara hasn't been testing/supporting it in a while
120
+
121
+ # Version 3.35.3
122
+ Release date: 2021-01-29
123
+
124
+ ### Fixed
125
+
126
+ * Just a release to have the correct dates in the History.md in released gem
127
+
128
+ # Version 3.35.2
129
+ Release date: 2021-01-29
130
+
131
+ ### Fixed
132
+
133
+ * Selenium deprecation suppressor with Selenium 3.x
134
+
135
+ # Version 3.35.1
136
+ Release date: 2021-01-26
137
+
138
+ ### Fixed
139
+
140
+ * Default chrome driver registrations use chrome - Issue #2442 [Yuriy Alekseyev]
141
+ * 'Capybara.test_id' usage with the :button selector - Issue #2443
142
+
143
+ # Version 3.35.0
144
+ Release date: 2021-01-25
145
+
146
+ ### Added
147
+
148
+ * Support Regexp matching for individual class names in :class filter passed an Array
149
+ * Animation disabler now supports JQuery animation disabling when JQuery loaded from body [Chien-Wei Huang]
150
+
151
+ ### Fixed
152
+
153
+ * :button selector type use with `enable_aria_role` [Sean Doyle]
154
+ * <label> elements don't associate with aria-role buttons
155
+ * Ignore Selenium::WebDriver::Error::InvalidSessionIdError when quitting driver [Robin Daugherty]
156
+ * Firefox: Don't click input when sending keys if already focused
157
+ * Miscellaneous issues with selenium-webdriver 4.0.0.alphas
158
+ * Nil return error in node details optimizations
159
+ * Animation disabler now inserts XHTML compliant content [Dale Morgan]
160
+
161
+ # Version 3.34.0
162
+ Release date: 2020-11-26
163
+
164
+ ### Added
165
+
166
+ * Ability to fill in with emoji when using Chrome with selenium driver (Firefox already worked)
167
+ * Current path assertions/expectations accept optional filter block
168
+ * Animation disabler now specifies `scroll-behavior: auto;` [Nathan Broadbent]
169
+ * :button selector can now find elements by label text [Sean Doyle]
170
+ * `Session#send_keys` to send keys to the current element with focus in drivers that support the
171
+ concept of a current element [Sean Doyle]
172
+
173
+ ### Changed
174
+
175
+ * Text query validates the type parameter to prevent undefined behavior
176
+
177
+ ### Fixed
178
+
179
+ * racktest driver better handles fragments and redirection to urls that include fragments
180
+ * Don't error when attempting to get XPath location of a shadow element
181
+ * Missing `readonly?` added to Node::Simple
182
+ * Selenium version detection when loaded via alternate method [Joel Hawksley]
183
+ * Connection count issue if REQUEST_URI value changed by app [Blake Williams]
184
+ * Maintain URI fragment when redirecting in rack-test driver
185
+ * Text query error message [Wojciech Wnętrzak]
186
+ * Checking a checkbox/radio button with `allow_label_click` now works if there are multiple labels (Issue #2421)
187
+ * `drop` with `Pathname` (Issue #2424)[Máximo Mussini]
188
+
189
+ # Version 3.33.0
190
+ Release date: 2020-06-21
191
+
192
+ ### Added
193
+
194
+ * Block passed to `within_session` now receives the new and old session
195
+ * Support for aria-role button when enabled [Seiei Miyagi]
196
+ * Support for aria-role link when enabled
197
+ * Support for `validation_message` filter with :field and :fillable_field selectors
198
+ * Deprecation warnings show source location [Koichi ITO]
199
+
200
+ ### Changed
201
+
202
+ * Ruby 2.5.0+ is now required
203
+ * Deprecated direct manipulation of the driver and server registries
204
+
205
+ ### Fixed
206
+
207
+ * Ruby 2.7 warning in minitest `assert_text` [Eileen M. Uchitelle]
208
+
209
+
210
+ # Version 3.32.2
211
+ Release date: 2020-05-16
212
+
213
+ ### Fixed
214
+
215
+ * Don't use lazy enumerator with JRuby due to leaking threads
216
+ * Ruby 2.7 deprecation warning when registering Webrick [Jon Zeppieri]
217
+ * `have_text` description [Juan Pablo Rinaldi]
218
+
219
+ # Version 3.32.1
220
+ Release date: 2020-04-05
221
+
222
+ ### Fixed
223
+
224
+ * Rapid set now respects field maxlength (Issue #2332)
225
+ * Only patch pause into legacy actions in Selenium < 4 (Issue #2334)
226
+
227
+ # Version 3.32.0
228
+ Release date: 2020-03-29
229
+
230
+ ### Added
231
+
232
+ * Support `delay` setting on click with Selenium
233
+ * Implement rapid set for values longer than 30 characters in text fields with Selenium
234
+
235
+ ### Fixed
236
+
237
+ * Result#[] and negative max on ranges (Issue #2302/2303) [Jeremy Evans]
238
+ * RackTest form submission rewrites query string when using GET method
239
+ * Ruby 2.7 deprecation warnings in RSpec matcher proxies
240
+
241
+ # Version 3.31.0
242
+ Release date: 2020-01-26
243
+
244
+ ### Added
245
+
246
+ * Support setting range inputs with the selenium driver [Andrew White]
247
+ * Support setting range inputs with the rack driver
248
+ * Support drop modifier keys in drag & drop [Elliot Crosby-McCullough]
249
+ * `enabled_options` and `disabled options` filters for select selector
250
+ * Support beginless ranges
251
+ * Optionally allow `all` results to be reloaded when stable - Beta feature - may be removed in
252
+ future version if problems occur
253
+
254
+ ### Fixed
255
+
256
+ * Fix Ruby 2.7 deprecation notices around keyword arguments. I have tried to do this without
257
+ any breaking changes, but due to the nature of the 2.7 changes and some selector types accepting
258
+ Hashes as locators there are a lot of edge cases. If you find any broken cases please report
259
+ them and I'll see if they're fixable.
260
+ * Clicking on details/summary element behavior in rack_test driver_
261
+
262
+ # Version 3.30.0
263
+ Release date: 2019-12-24
264
+
265
+ ### Added
266
+
267
+ * Display pending requests when they don't complete in time [Juan Carlos Medina]
268
+ * :order option in selector queries - set to :reverse to for reverse document order results
269
+ * Support regexp for :name and :placeholder options in selectors that import filters from
270
+ _field filter set
271
+
272
+ ### Fixed
273
+
274
+ * Issue around automatic port assignment - Issue #2245
275
+ * Label selector when label has no id - Issue #2260
276
+ * Preserve clientX/clientY in Selenium HTML5 drag emulation [Nicolò G.]
277
+ * table selector using :with_cols option if last specified column matched but others didn't - Issue #2287
278
+ * Some tests updated for Ruby 2.7 behavior change around keyword args
279
+
280
+ # Version 3.29.0
281
+ Release date: 2019-09-02
282
+
283
+ ### Added
284
+
285
+ * Allow clicking on file input when using the block version of `attach_file` with Chrome and Firefox
286
+ * Spatial filters (`left_of`, `right_of`, `above`, `below`, `near`)
287
+ * rack_test driver now supports clicking on details elements to open/close them
288
+
289
+ ### Fixed
290
+
291
+ * rack_test driver correctly determines visibility for open details elements descendants
292
+
293
+ ### Changed
294
+
295
+ * Results will now be lazily evaluated when using JRuby >= 9.2.8.0
296
+
297
+
298
+ # Version 3.28.0
299
+ Release date: 2019-08-03
300
+
301
+ ### Added
302
+
303
+ * Allow forcing HTML5 or legacy dragging via the `:html5` option to `drag_to` when using Selenium with Chrome or Firefox
304
+ * Autodetection of drag type interprets not seeing the mousedown event as legacy.
305
+ * HTML5 form validation `:valid` node filter added to `:field` and `:fillable_field` selectors
306
+ * When using Capybara registered :puma server - patches Puma 4.0.x to fix SSL connection behavior. Removes
307
+ default `queue_requests` setting - Issue #2227
308
+
309
+ # Version 3.27.0
310
+ Release date: 2019-07-28
311
+
312
+ ### Added
313
+
314
+ * Allow to use chromedriver/geckodriver native `is_element_displayed` endpoint via Selenium
315
+ driver `native_displayed` option for performance reasons. Disabled by default due to endpoints
316
+ currently not handling &lt;details> element descendants visibility correctly.
317
+
318
+ ### Fixed
319
+
320
+ * Ignore negative lookahead/lookbehind regex when performing initial XPath text matching
321
+ * Reloading of elements found via `ancestor` and `sibling`
322
+ * Only default puma settings to `queue_requests: false` when using SSL
323
+ * Visibility of descendants of &lt;details> elements is correctly determined when using rack_test
324
+ and the selenium driver with Capybara optimized atoms
325
+ * local/session storage clearance in Chrome when clearing only one of them - Issue #2233
326
+
327
+ # Version 3.26.0
328
+ Release date: 2019-07-15
329
+
330
+ ### Added
331
+
332
+ * `w3c_click_offset` configuration option applies to `right_click` and `double_click` as well as `click`
333
+ * Warning when passing `nil` to the text/content assertions/expectations
334
+ * `Session#server_url` returns the base url the AUT is being run at (when controlled by Capybara)
335
+ * `option` selector type accepts an integer as locator
336
+
337
+ ### Fixed
338
+
339
+ * Default puma server registration now specifies `queue_requests: false` - Issue #2227
340
+ * Workaround issue with FF 68 and hanging during reset if a system modal is visible
341
+ * Don't expand file path if it's already absolute - Issue #2228
342
+
343
+ # Version 3.25.0
344
+ Release date: 2019-06-27
345
+
346
+ ### Added
347
+
348
+ * Animation disabler also disables before and after pseudoelements - Issue #2221 [Daniel Heath]
349
+ * `w3c_click_offset` configuration option to determine whether click offsets are calculated from element
350
+ center or top left corner
351
+
352
+ ### Fixed
353
+
354
+ * Work around issue with chromedriver 76/77 in W3C mode losing mouse state during legacy drag. Only fixed if
355
+ both source and target are simultaneously inside the viewport - Issue #2223
356
+ * Negative ancestor expectations/predicates were incorrectly checking siblings rather than ancestors
357
+
358
+ # Version 3.24.0
359
+ Release date: 2019-06-13
360
+
361
+ ### Added
362
+
363
+ * Log access when using the Selenium driver with Chrome 75 in W3C mode has been reenabled.
364
+
365
+ ### Changed
366
+
367
+ * Selenium driver now selects all current content and then sends keys rather than clearing field by JS
368
+ and then sending keys when setting values to text inputs in order to more closely simulate user behavior
369
+
370
+ ### Fixed
371
+
372
+ * Relative paths passed to `attach_file` will be assumed to be relative to the current working directory when using the
373
+ Selenium driver
374
+
375
+ # Version 3.23.0
376
+ Release date: 2019-06-10
377
+
378
+ ### Added
379
+
380
+ * Improved error message when using Chrome in W3C mode and attempting to access logs
381
+ * Support driver specific options for Element#drag_to
382
+ * Support setting `<input type="color">` elements with the selenium driver
383
+
384
+ ### Fixed
385
+
386
+ * Tightened conditions when in expression text option matching will be used
387
+ * Improved Selenium drivers HTML5 drag and drop emulation compatibility with SortableJS library (and others)
388
+
389
+ # Version 3.22.0
390
+ Release date: 2019-05-29
391
+
392
+ ### Added
393
+
394
+ * `ancestor`/`sibling` assertions and matchers added
395
+ * Documentation Updates and Fixes - Many thanks again to Masafumi Koba! [Masafumi Koba]
396
+ * Added `:with` alias for `:option` filter on `:checkbox` and `:radio_button` selectors
397
+
398
+ ### Changed
399
+
400
+ * Selenium driver with Chrome >= 73 now resets cookies and local/session storage after navigating
401
+ to 'about:blank' when possible to minimize potential race condition
402
+
403
+ # Version 3.21.0
404
+ Release date: 2019-05-24
405
+
406
+ ### Added
407
+
408
+ * Element#drop - Chrome and Firefox, via the selenium driver, support dropping files/data on elements
409
+ * Default CSS used for `attach_file` `make_visible: true` now includes auto for
410
+ height and width to handle more ways of hiding the file input element
411
+ * Documentation Updates and Fixes - Many thanks to Masafumi Koba! [Masafumi Koba]
412
+
413
+ ### Changed
414
+
415
+ * Deprecate support for CSS locator being a Symbol
416
+
417
+ # Version 3.20.2
418
+ Release date: 2019-05-19
419
+
420
+ ### Fixed
421
+
422
+ * Move `uglifier` from runtime to development dependency [miyucy]
423
+
424
+ # Version 3.20.1
425
+ Release date: 2019-05-17
426
+
427
+ ### Fixed
428
+
429
+ * RackTest driver considers &lt;template> elements to be non-visible and ignores the contents
430
+
431
+ # Version 3.20.0
432
+ Release date: 2019-05-14
433
+
434
+ ### Added
435
+
436
+ * `Node#obscured?` to check viewport presence and element overlap
437
+ * `:obscured` system filter to check whether elements are obscured in finders, assertions, and expectations
438
+ * :label selector :for option can be a regexp
439
+ * Significantly smaller `isDisplayed`/`getAttribute` atoms for selenium driver. If these produce issues you can disable their use
440
+ by setting an environment variable named 'DISABLE_CAPYBARA_SELENIUM_OPTIMIZATIONS' (Please also report any issues).
441
+ * `href: false` option with `find_link`/`click_link`/:link selector ignores `href` presence/absence
442
+
443
+ ### Fixed
444
+
445
+ * Workaround Safari issue with send_keys not correctly using top level modifiers
446
+ * Workaround Safari not retrying click due to incorrect error type
447
+ * Fix Safari attach_file block mode when clicking elements associated to the file input
448
+ * Workaround Safari issue with repeated hover
449
+
450
+ # Version 3.19.1
451
+ Release date: 2019-05-11
452
+
453
+ ### Fixed
454
+
455
+ * Fix access to specializations when Selenium::Driver is subclassed [James Mead]
456
+
457
+ # Version 3.19.0
458
+ Release date: 2019-05-09
459
+
460
+ ### Added
461
+
462
+
463
+ * Syntactic sugar `#once`, `#twice`, `#thrice`, `#exactly`, `#at_least`, `#at_most`, and `#times`
464
+ added to `have_selector`, `have_css`, `have_xpath`, and `have_text` RSpec matchers
465
+ * Support for multiple expression types in Selector definitions
466
+ * Reduced wirecalls for common actions in Selenium driver
467
+
468
+ ### Fixed
469
+
470
+ * Workaround Chrome 75 appending files to multiple file inputs
471
+ * Suppressed retry when detecting http vs https server connection
472
+
473
+ # Version 3.18.0
474
+ Release date: 2019-04-22
475
+
476
+ ### Added
477
+
478
+ * XPath Selector query optimized to make use of Regexp :text option in initial element find
479
+
480
+ ### Fixed
481
+
482
+ * Workaround issue where Chrome/chromedriver 74 can return the wrong error type when a click is intercepted
483
+
484
+ # Version 3.17.0
485
+ Release date: 2019-04-18
486
+
487
+ ### Added
488
+
489
+ * Initial support for selenium-webdriver 4.0.0.alpha1
490
+ * :button selector will now also match on `name` attribute
491
+
492
+ ### Fixed
493
+
494
+ * Suppress warnings generated by using selenium-webdriver 3.141.5926
495
+ * Mask Appium issue with finder visibility optimizations (non-optimal)
496
+
497
+ # Version 3.16.2
498
+ Release date: 2019-04-10
499
+
500
+ ### Fixed
501
+
502
+ * Fix Session#quit resetting of memoized document
503
+
504
+ # Version 3.16.1
505
+ Release date: 2019-03-30
506
+
507
+ ### Fixed
508
+
509
+ * Fix potential 'uninitialized constant' error when using the :selenium_chrome driver [jeffclemens-ab]
510
+
511
+ # Version 3.16
512
+ Release date: 2019-03-28
513
+
514
+ ### Changed
515
+
516
+ * Ruby 2.4.0+ is now required
517
+ * Selenium driver now defaults to using a persistent http client connection
518
+
519
+ ### Added
520
+
521
+ * :wait option in predicates now accepts `true` to selectively override when `Capybara.predicates_wait == false`
522
+
523
+ # Version 3.15
524
+ Release date: 2019-03-19
525
+
526
+ ### Added
527
+
528
+ * `attach_file` now supports a block mode on JS capable drivers to more accurately test user behavior when file inputs are hidden (beta)
529
+ * :table selector now supports `with_rows`, 'rows', `with_cols`, and 'cols' filters
530
+
531
+ ### Fixed
532
+
533
+ * Fix link selector when `Capybara.test_id` is set - Issue #2166 [bingjyang]
534
+
535
+
536
+ # Version 3.14
537
+ Release date: 2019-02-25
538
+
539
+ ### Added
540
+
541
+ * rack_test driver now supports reloading elements when the document changes - Issue #2157
542
+ * Selenium driver HTML5 drag-drop emulation now emits multiple move events so drag direction
543
+ is determinable [Erkki Eilonen, Thomas Walpole]
544
+ * Capybara.server_errors now defaults to [Exception] - Issue #2160 [Edgars Beigarts]
545
+ ### Fixed
546
+
547
+ * Workaround hover issue with FF 65 - Issue #2156
548
+ * Workaround chromedriver issue when setting blank strings to react controlled text fields
549
+ * Workaround chromedriver issue with popup windows not loading content - https://bugs.chromium.org/p/chromedriver/issues/detail?id=2650&q=load&sort=-id&colspec=ID%20Status%20Pri%20Owner%20Summary
550
+
551
+ # Version 3.13.2
552
+ Release date: 2019-01-24
553
+
554
+ ### Fixed
555
+
556
+ * Remove extraneous output
557
+
558
+ # Version 3.13.1
559
+ Release date: 2019-01-24
560
+
561
+ ### Fixed
562
+
563
+ * Only use Selenium visibility optimization when JS atom is available - Issue #2151
564
+
565
+ # Version 3.13.0
566
+ Release date: 2019-01-23
567
+
568
+ ### Added
569
+
570
+ * Session#quit added
571
+ * #scroll_to added to allow scrolling page/elements to specified locations
572
+ * Speed optimizations around multiple element location and path generation when using the Selenium driver
573
+ * Support for locator type checking in custom selectors
574
+ * Allow configuration of gumbo use - defaults to off
575
+ * `assert_style`/`has_style`/`have_style` deprecated in favor of `assert_matches_style`/`matches_styles?`/`match_style`
576
+ * :style filter added to selectors
577
+
578
+ # Version 3.12.0
579
+ Release date: 2018-11-28
580
+
581
+ ### Added
582
+
583
+ * Support Ruby 2.6 endless range in Result#[] and query `:between` option
584
+ * Pre-registered headless firefox driver :selenium_headless [Andrew Havens]
585
+ * Selenium driver now defaults to clearing `sessionStorage` and `localStorage`. To disable pass `clear_local_storage: false` and/or `clear_session_storage: false` when creating Capybara::Selenium::Driver instance in your driver registration
586
+
587
+ ### Fixed
588
+
589
+ * Raise error if only :x or :y are passed as an offset to click methods
590
+
591
+ ### Removed
592
+
593
+ * Support for RSpec < 3.5
594
+
595
+ # Version 3.11.1
596
+ Release date: 2018-11-16
597
+
598
+ ### Fixed
599
+
600
+ * Fixed :link_or_button XPath generation when it has had an expression filter added
601
+
602
+ # Version 3.11.0
603
+ Release date: 2018-11-14
604
+
605
+ ### Added
606
+
607
+ * Ability for node filters to set detailed error messages
608
+ * `Capybara::HTML` Will use `nokogumbo` for HTML parsing if installed
609
+ * `Selector#locator_filter` added to allow for dynamic locator in selectors
610
+
611
+ ### Fixed
612
+
613
+ * Node filters are evaluated in the context of the Selector they are used in to ensure the correct options are used
614
+
615
+ # Version 3.10.1
616
+ Release date: 2018-11-03
617
+
618
+ ### Fixed
619
+
620
+ * Fix `aria-label` and `test_id` matching for `link_or_button` selector type - Issue #2125
621
+ * Fixed crash in element path creation for matcher failure messages - Issue #2120
622
+
623
+ # Version 3.10.0
624
+ Release date: 2018-10-23
625
+
626
+ ### Added
627
+
628
+ * :class filter can now check for class names starting with !
629
+ * Selector `xpath`/`css` expression definitions will get filter names from block parameters if not explicitly provided
630
+ * `any_of_selectors` assertions and matchers to complement `all_of_selectors` and `none_of_selectors`
631
+
632
+ ### Fixed
633
+
634
+ * Selector `css` expression definition declared filters now work again
635
+ * Cleaned up warnings [Yuji Yaginuma]
636
+ * Workaround installation of rspec matcher proxies under jruby by reverting to the old solution not using prepend, so jruby bugs are not hit - Issue #2115
637
+
638
+ # Version 3.9.0
639
+ Release date: 2018-10-03
640
+
641
+ ### Added
642
+
643
+ * Selenium with Chrome removes all cookies at session reset instead of just cookies from current domain if possible
644
+ * Support for Regexp for system :id and :class filters where possible
645
+ * `using_session` now accepts a session object as well as the name of the session for users who manually manage sessions
646
+ * The `:field` selector will now find `type = "hidden"` fields if the `type: "hidden"` filter option is provided
647
+
648
+ # Version 3.8.2
649
+ Release date: 2018-09-26
650
+
651
+ ### Fixed
652
+
653
+ * Fixed negated class selector option - Issue #2103
654
+
655
+ # Version 3.8.1
656
+ Release date: 2018-09-22
657
+
658
+ ### Fixed
659
+
660
+ * Filling in of date fields with a string when using selenium chrome regression [Micah Geisel]
661
+
662
+ # Version 3.8.0
663
+ Release date: 2018-09-20
664
+
665
+ ### Added
666
+
667
+ * Workaround geckodriver 0.22 issue with undefined pause durations
668
+ * :element selector ignores XML namespaces
669
+
670
+ ### Fixed
671
+
672
+ * Added Errno::ECONNRESET to the errors which will allows https server detection
673
+
674
+ # Version 3.7.2
675
+ Release date: 2018-09-12
676
+
677
+ ### Fixed
678
+
679
+ * Fix MatchQuery based matchers when used on a root element found using any type of parent/ancestor query - Issue #2097
680
+
681
+ * Fix Chrome/FF HTML5 drag simulation for elements (a, img) which default to draggable - Issue #2098
682
+
683
+ # Version 3.7.1
684
+ Release date: 2018-09-05
685
+
686
+ ### Fixed
687
+
688
+ * Restored ability to pass symbol as the CSS selector when calling `has_css?`/`have_css`/etc - Issue #2093
689
+
690
+ # Version 3.7.0
691
+ Release date: 2018-09-02
692
+
693
+ ### Added
694
+
695
+ * `Capybara.disable_animation` can be set to a CSS selector to identify which elements will have animation disabled [Michael Glass]
696
+ * `Capybara.default_normalize_ws` option which sets whether or not text predicates and matchers (`has_text?`, `has_content?`, `assert_text`, etc) use `normalize_ws` option by default. Defaults to false. [Stegalin Ivan]
697
+ * Selector based predicates, matchers, and finders now support the `:normalize_ws` option for the `:text`/`:exact_text` filters. Defaults to the `Capybara.default_normalize_ws`setting above.
698
+ * Element `choose`/`check`/`uncheck`/`attach_file`/`fill_in` can now operate on the element they're called on or a descendant if no locator is passed.
699
+
700
+ ### Fixed
701
+
702
+ * All CSS styles applied by the `Element#attach_file` `:make_visible` option will now have `!important` priority set to ensure they override any other specified style.
703
+ * Firefox file inputs are only manually cleared when necessary.
704
+
705
+ # Version 3.6.0
706
+ Release date: 2018-08-14
707
+
708
+ ### Added
709
+
710
+ * Workaround geckodriver/firefox send_keys issues as much as possible using the Selenium actions API
711
+ * Workaround lack of HTML5 native drag and drop events when using Selenium driver with Chrome and FF >= 62
712
+ * `Capybara.predicates_wait` option which sets whether or not Capybaras matcher predicate methods (`has_css?`, `has_selector?`, `has_text?`, etc.) default to using waiting/retrying behavior (defaults to true)
713
+
714
+ # Version 3.5.1
715
+ Release date: 2018-08-03
716
+
717
+ ### Fixed
718
+
719
+ * Fixed misspelled method name `refute_matches_elector` => `refute_matches_selector`
720
+
721
+ # Version 3.5.0
722
+ Release date: 2018-08-01
723
+
724
+ ### Added
725
+
726
+ * text predicates and matchers (`has_text?`, `has_content?`, `assert_text`, etc) now support a `normalize_ws` option
727
+
728
+ ### Fixed
729
+
730
+ * `attach_file` with Selenium and local Firefox 62+ now correctly generates only one change event when attaching multiple files
731
+
732
+ # Version 3.4.2
733
+ Release date: 2018-07-24
734
+
735
+ ### Fixed
736
+
737
+ * `match_xxx` selectors and `matches_xxx?` predicates work correctly with elements found using a sibling selector - Issue #2073
738
+
739
+ # Version 3.4.1
740
+ Release date: 2018-07-20
741
+
742
+ ### Fixed
743
+
744
+ * `Session#evaluate_script` now strips the script in `Session` rather than only in the Selenium driver
745
+
746
+ # Version 3.4.0
747
+ Release date: 2018-07-19
748
+
749
+ ### Fixed
750
+
751
+ * Make selenium driver :backspace clear strategy work even if caret location is in middle of field content [Champier Cyril]
752
+ * Selenium issue with fieldset nested in disabled fieldset not being considered disabled
753
+ * `Session#evaluate_script` and `Element#evaluate_script` now strip leading/trailing whitespace from scripts [Ian Lesperance]
754
+
755
+ ### Added
756
+
757
+ * Work around Selenium lack of support for `file_detector` with remote geckodriver
758
+ * `#within_frame` locator is optional when only one frame exists
759
+ * `Capybara.test_id` option that allows for matching the Capybara provided selector types on an arbitrary attribute
760
+ (defaults to nil), set to your test id attribute ('data-test-id, etc) if using test id attributes in your project
761
+
762
+ # Version 3.3.1
763
+ Release date: 2018-06-27
764
+
765
+ ### Fixed
766
+
767
+ * `selenium-webdriver` version check [ahorek]
768
+ * Selenium driver correctly responds to `disabled?` for fieldset elements - Issue #2059 [Thomas Walpole]
769
+
770
+ # Version 3.3.0
771
+ Release date: 2018-06-25
772
+
773
+ ### Added
774
+
775
+ * RackTest driver now handles 307/308 redirects
776
+ * `execute_async_script` can now be called on elements to run the JS in the context of the element
777
+ * `:download` filter option on `:link' selector
778
+ * `Window#fullscreen`
779
+ * `Element#style` and associated matchers
780
+
781
+ ### Changed
782
+
783
+ * Minimum "supported" `selenium-webdriver` is raised to 3.5.0 (but you really should be using newer than that)
784
+
785
+ ### Fixes
786
+
787
+ * Selenium driver with Firefox workaround for clicking on table row - https://github.com/mozilla/geckodriver/issues/1228
788
+ * :class and :id filters applied to CSS based selectors now correctly handle the CSS comma
789
+ * Selenium driver handles namespaces when generating an elements `#path` - Issue #2048
790
+
791
+ # Version 3.2.1
792
+ Release date: 2018-06-04
793
+
794
+ ### Fixes
795
+
796
+ * Only split CSS selectors when :class or :id options are given. Restores 3.1.1 functionality for now but the underlying issue
797
+ will require a larger fix, hopefully coming soon. - Issue #2044 [Thomas Walpole]
798
+
799
+ # Version 3.2.0
800
+ Release date: 2018-06-01
801
+
802
+ ### Changed
803
+
804
+ * Ruby 2.3.0+ is now required
805
+ * `ElementNotFound` errors raised in selector filters are interpreted as non-matches
806
+
807
+ ### Added
808
+
809
+ * New global configuration `default_set_options` used in `Capybara::Node::Element#set` as default `options` hash [Champier Cyril]
810
+ * `execute_script` and `evaluate_script` can now be called on elements to run the JS in the context of the element [Thomas Walpole]
811
+ * Filters in custom selectors now support a `matcher` Regexp to handle multiple filter options [Thomas Walpole]
812
+ * `:element` selector type which will match on any attribute (other than the reserved names) passed as a filter option [Thomas Walpole]
813
+ * `:class` filter option now supports preceding class names with `!` to indicate not having that class [Thomas Walpole]
814
+ * `:class` and `:id` filter options now accept `XPath::Expression` objects to allow for more flexibility in matching [Thomas Walpole]
815
+ * `Capybara.disable_animation` setting which triggers loading of a middleware that attempts to disable animations in pages.
816
+ This is very much a beta feature and may change/disappear in the future. [Thomas Walpole]
817
+
818
+ # Version 3.1.1
819
+ Release date: 2018-05-25
820
+
821
+ ### Fixes
822
+
823
+ * Ensure keystrokes are sent when setting time/date fields to a string with the Selenium driver [Thomas Walpole]
824
+
825
+ # Version 3.1.0
826
+ Release date: 2018-05-10
827
+
828
+ ### Added
829
+
830
+ * Support for using `select` with text inputs associated with a datalist element
831
+ * `type` filter on `:button` selector
832
+ * Support for server operating in https mode
833
+ * Selenium driver now uses JS to fill_in/set date and time fields when passed date or time objects [Aleksei Gusev, Thomas Walpole]
834
+
835
+ # Version 3.0.3
836
+ Release date: 2018-04-30
837
+
838
+ ### Fixes
839
+
840
+ * Issue in `check` where the locator string could not be omitted
841
+ * Selenium browser type detection when using remote [Ian Ker-Seymer]
842
+ * Potential hang when waiting for requests to complete [Chris Zetter]
843
+
844
+ # Version 3.0.2
845
+ Release date: 2018-04-13
846
+
847
+ ### Fixes
848
+
849
+ * Fix expression filter descriptions in some selector failure messages
850
+ * Fix compounding of negated matchers - Issue #2010
851
+
852
+ # Version 3.0.1
853
+ Release date: 2018-04-06
854
+
855
+ ### Changed
856
+
857
+ * Restored ability for `Capybara.server=` to accept a proc which was accidentally removed in 3.0.0
858
+
859
+ # Version 3.0.0
860
+ Release date: 2018-04-05
861
+
862
+ ### Changed
863
+
864
+ * Selenium driver only closes extra windows for browsers where that is known to work (Firefox, Chrome)
865
+ * "threadsafe" mode is no longer considered beta
866
+
867
+ ### Fixes
868
+
869
+ * Multiple file attach_file with Firefox
870
+ * Use Puma::Server directly rather than Rack::Handler::Puma so signal handlers don't prevent test quitting
871
+
872
+ # Version 3.0.0.rc2
873
+ Release date: 2018-03-23
874
+
875
+ ### Changed
876
+
877
+ * Visible text whitespace is no longer fully normalized in favor of being more in line with the WebDriver spec for visible text
878
+ * Drivers are expected to close extra windows when resetting the session
879
+ * Selenium driver supports Date/Time when filling in date/time/datetime-local inputs
880
+ * `current_url` returns the url for the top level browsing context
881
+ * `title` returns the title for the top level browsing context
882
+
883
+ ### Added
884
+
885
+ * `Driver#frame_url` returns the url for the current frame
886
+ * `Driver#frame_title` returns the title for the current frame
887
+
888
+ # Version 3.0.0.rc1
889
+ Release date: 2018-03-02
890
+
891
+ ### Added
892
+ * Support for libraries wrapping Capybara elements and providing a `#to_capybara_node` method
893
+
894
+ ### Changed
895
+
896
+ * `first` now raises ElementNotFound, by default, instead of returning nil when no matches are found - Issue #1507
897
+ * 'all' now waits for at least one matching element by default. Pass `wait: false` if you want the previous
898
+ behavior where an empty result would be returned immediately if no matching elements exist yet.
899
+ * ArgumentError raised if extra parameters passed to selector queries
900
+
901
+ ### Removed
902
+
903
+ * Ruby < 2.2.2 support
904
+ * `Capybara.exact_options` no longer exists. Just use `exact: true` on relevant actions/finders if necessary.
905
+ * All previously deprecated methods removed
906
+ * RSpec 2.x support
907
+ * selenium-webdriver 2.x support
908
+ * Nokogiri < 1.8 support
909
+ * `field_labeled` alias for `find_field`
910
+
911
+ # Version 2.18.0
2
912
  Release date: 2018-02-12
3
913
 
4
914
  ### Fixed
@@ -10,6 +920,7 @@ Release date: 2018-02-12
10
920
 
11
921
  * Headless chrome modal JS injection that is no longer needed for Chrome 64+/chromedriver 2.35+
12
922
 
923
+
13
924
  # Version 2.17.0
14
925
  Release date: 2018-01-02
15
926
 
@@ -210,7 +1121,7 @@ Release date: 2016-12-05
210
1121
  * Options for clearing session/local storage on reset added to the Selenium driver
211
1122
  * Window size changes wait for the size to stabilize
212
1123
  * Defined return value for most actions
213
- * Ignore specific error when qutting selenium driver instance - Issue #1773 [Dylan Reichstadt, Thomas Walpole]
1124
+ * Ignore specific error when quitting selenium driver instance - Issue #1773 [Dylan Reichstadt, Thomas Walpole]
214
1125
  * Warn on selenium unknown errors rather than raising when quitting driver [Adam Pohorecki, Thomas Walpole]
215
1126
  * Capybara::Result#each now returns an `Enumerator` when called without a block - Issue #1777 [Thomas Walpole]
216
1127
 
@@ -253,6 +1164,7 @@ Release date: 2016-10-05
253
1164
  Release date: 2016-09-29
254
1165
 
255
1166
  ### Fixed
1167
+
256
1168
  * :label built-in selector finds nested label/control by control id if the label has no 'for' attribute [Thomas Walpole]
257
1169
  * Warning issued if an unknown selector type is specified [Thomas Walpole]
258
1170
 
@@ -271,7 +1183,7 @@ Release date: 2016-09-19
271
1183
 
272
1184
  ### Fixed
273
1185
 
274
- * Issue with rack-test driver and obselete mime-types when using `#attach_file` - Issue #1756 [Thomas Walpole]
1186
+ * Issue with rack-test driver and obsolete mime-types when using `#attach_file` - Issue #1756 [Thomas Walpole]
275
1187
 
276
1188
  ### Added
277
1189
 
@@ -338,7 +1250,7 @@ Release date: 2016-04-07
338
1250
 
339
1251
  ### Added
340
1252
 
341
- * Capybara now waits for requests to Capybaras server to complete while restting the session [John Hawthorn, Thomas Walpole]
1253
+ * Capybara now waits for requests to Capybaras server to complete while resetting the session [John Hawthorn, Thomas Walpole]
342
1254
  * Capybara.reuse_server option to allow disabling of sharing server instance between sessions [Thomas Walpole]
343
1255
  * :multiple filter added to relevant selectors [Thomas Walpole]
344
1256
  * Provided server registrations for :webrick and :puma. Capybara.server = :puma for testing with Rails 5 [Thomas Walpole]
@@ -352,7 +1264,7 @@ Release date: 2016-04-07
352
1264
 
353
1265
  # Version 2.6.2
354
1266
 
355
- Relase date: 2016-01-27
1267
+ Release date: 2016-01-27
356
1268
 
357
1269
  ### Fixed
358
1270
 
@@ -368,7 +1280,7 @@ Release date: 2016-01-27
368
1280
 
369
1281
  # Version 2.6.0
370
1282
 
371
- Relase date: 2016-01-17
1283
+ Release date: 2016-01-17
372
1284
 
373
1285
  ### Fixed
374
1286
 
@@ -432,7 +1344,7 @@ Release date: 2014-10-13
432
1344
 
433
1345
  # Version 2.4.3
434
1346
 
435
- Relase date: 2014-09-21
1347
+ Release date: 2014-09-21
436
1348
 
437
1349
  ### Fixed
438
1350
 
@@ -898,8 +1810,8 @@ Release date: 2011-06-14
898
1810
  * Rack::Test driver honours maxlength on input fields [Guilherme Carvalho]
899
1811
  * Rack::Test now works as expected with domains and subdomains [Jonas Nicklas]
900
1812
  * Session is reset more thoroughly between tests. [Jonas Nicklas]
901
- * Raise error when uploading non-existant file [Jonas Nicklas]
902
- * Rack reponse body should respond to #each [Piotr Sarnacki]
1813
+ * Raise error when uploading non-existent file [Jonas Nicklas]
1814
+ * Rack response body should respond to #each [Piotr Sarnacki]
903
1815
  * Deprecation warnings with selenium webdriver 0.2.0 [Aaron Gibraltar]
904
1816
  * Selenium Chrome no longer YELLS tagname [Carl Jackson & David W. Frank]
905
1817
  * Capybara no longer strips encoding before sending to Rack [Jonas Nicklas]
@@ -1041,7 +1953,7 @@ Release date: 2010-05-12
1041
1953
 
1042
1954
  Release date: 2010-04-09
1043
1955
 
1044
- This is a drop in compatible maintainance release. It's mostly
1956
+ This is a drop in compatible maintenance release. It's mostly
1045
1957
  important for driver authors.
1046
1958
 
1047
1959
  ### Added
@@ -1060,7 +1972,7 @@ important for driver authors.
1060
1972
 
1061
1973
  Release date: 2010-03-22
1062
1974
 
1063
- This is a maintainance release with minor bug fixes, should be
1975
+ This is a maintenance release with minor bug fixes, should be
1064
1976
  drop in compatible.
1065
1977
 
1066
1978
  ### Added
@@ -1107,4 +2019,3 @@ too many users, please read the release notes carefully!
1107
2019
  * clicking links where the image's alt attribute contains the text is now possible
1108
2020
  * within_fieldset and within_table work when the default selector is CSS
1109
2021
  * boolean attributes work the same across drivers (return true/false)
1110
-