capybara 3.0.0 → 3.40.0

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