capybara 2.18.0 → 3.38.0

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