capybara 2.5.0 → 2.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.yard/templates_custom/default/class/html/selectors.erb +38 -0
- data/.yard/templates_custom/default/class/html/setup.rb +17 -0
- data/.yard/yard_extensions.rb +78 -0
- data/.yardopts +1 -0
- data/History.md +413 -10
- data/License.txt +1 -1
- data/README.md +237 -130
- data/lib/capybara/config.rb +132 -0
- data/lib/capybara/cucumber.rb +3 -1
- data/lib/capybara/driver/base.rb +27 -6
- data/lib/capybara/driver/node.rb +14 -5
- data/lib/capybara/dsl.rb +2 -3
- data/lib/capybara/helpers.rb +13 -65
- data/lib/capybara/minitest/spec.rb +177 -0
- data/lib/capybara/minitest.rb +278 -0
- data/lib/capybara/node/actions.rb +180 -24
- data/lib/capybara/node/base.rb +17 -5
- data/lib/capybara/node/document.rb +5 -0
- data/lib/capybara/node/document_matchers.rb +15 -14
- data/lib/capybara/node/element.rb +55 -7
- data/lib/capybara/node/finders.rb +179 -67
- data/lib/capybara/node/matchers.rb +301 -105
- data/lib/capybara/node/simple.rb +15 -4
- data/lib/capybara/queries/ancestor_query.rb +25 -0
- data/lib/capybara/queries/base_query.rb +69 -3
- data/lib/capybara/queries/current_path_query.rb +17 -8
- data/lib/capybara/queries/match_query.rb +19 -0
- data/lib/capybara/queries/selector_query.rb +251 -0
- data/lib/capybara/queries/sibling_query.rb +25 -0
- data/lib/capybara/queries/text_query.rb +67 -16
- data/lib/capybara/queries/title_query.rb +4 -2
- data/lib/capybara/query.rb +3 -131
- data/lib/capybara/rack_test/browser.rb +14 -5
- data/lib/capybara/rack_test/css_handlers.rb +1 -0
- data/lib/capybara/rack_test/driver.rb +15 -8
- data/lib/capybara/rack_test/form.rb +34 -12
- data/lib/capybara/rack_test/node.rb +29 -12
- data/lib/capybara/rails.rb +3 -3
- data/lib/capybara/result.rb +104 -9
- data/lib/capybara/rspec/compound.rb +95 -0
- data/lib/capybara/rspec/features.rb +17 -6
- data/lib/capybara/rspec/matcher_proxies.rb +45 -0
- data/lib/capybara/rspec/matchers.rb +199 -80
- data/lib/capybara/rspec.rb +4 -2
- data/lib/capybara/selector/css.rb +30 -0
- data/lib/capybara/selector/filter.rb +20 -0
- data/lib/capybara/selector/filter_set.rb +74 -0
- data/lib/capybara/selector/filters/base.rb +33 -0
- data/lib/capybara/selector/filters/expression_filter.rb +40 -0
- data/lib/capybara/selector/filters/node_filter.rb +27 -0
- data/lib/capybara/selector/selector.rb +276 -0
- data/lib/capybara/selector.rb +452 -157
- data/lib/capybara/selenium/driver.rb +282 -81
- data/lib/capybara/selenium/node.rb +144 -46
- data/lib/capybara/server.rb +59 -16
- data/lib/capybara/session/config.rb +114 -0
- data/lib/capybara/session/matchers.rb +29 -19
- data/lib/capybara/session.rb +378 -143
- data/lib/capybara/spec/fixtures/no_extension +1 -0
- data/lib/capybara/spec/public/jquery-ui.js +13 -791
- data/lib/capybara/spec/public/jquery.js +4 -9045
- data/lib/capybara/spec/public/test.js +45 -11
- data/lib/capybara/spec/session/accept_alert_spec.rb +30 -7
- data/lib/capybara/spec/session/accept_confirm_spec.rb +14 -2
- data/lib/capybara/spec/session/accept_prompt_spec.rb +35 -6
- data/lib/capybara/spec/session/all_spec.rb +45 -32
- data/lib/capybara/spec/session/ancestor_spec.rb +85 -0
- data/lib/capybara/spec/session/assert_all_of_selectors_spec.rb +110 -0
- data/lib/capybara/spec/session/assert_current_path.rb +15 -2
- data/lib/capybara/spec/session/assert_selector.rb +29 -28
- data/lib/capybara/spec/session/assert_text.rb +59 -20
- data/lib/capybara/spec/session/assert_title.rb +25 -11
- data/lib/capybara/spec/session/attach_file_spec.rb +42 -4
- data/lib/capybara/spec/session/body_spec.rb +1 -0
- data/lib/capybara/spec/session/check_spec.rb +90 -14
- data/lib/capybara/spec/session/choose_spec.rb +31 -5
- data/lib/capybara/spec/session/click_button_spec.rb +20 -9
- data/lib/capybara/spec/session/click_link_or_button_spec.rb +15 -9
- data/lib/capybara/spec/session/click_link_spec.rb +39 -15
- data/lib/capybara/spec/session/current_scope_spec.rb +2 -1
- data/lib/capybara/spec/session/current_url_spec.rb +12 -3
- data/lib/capybara/spec/session/dismiss_confirm_spec.rb +6 -5
- data/lib/capybara/spec/session/dismiss_prompt_spec.rb +4 -3
- data/lib/capybara/spec/session/element/assert_match_selector.rb +36 -0
- data/lib/capybara/spec/session/element/match_css_spec.rb +23 -0
- data/lib/capybara/spec/session/element/match_xpath_spec.rb +23 -0
- data/lib/capybara/spec/session/element/matches_selector_spec.rb +106 -0
- data/lib/capybara/spec/session/evaluate_async_script_spec.rb +22 -0
- data/lib/capybara/spec/session/evaluate_script_spec.rb +23 -1
- data/lib/capybara/spec/session/execute_script_spec.rb +22 -3
- data/lib/capybara/spec/session/fill_in_spec.rb +50 -32
- data/lib/capybara/spec/session/find_button_spec.rb +43 -2
- data/lib/capybara/spec/session/find_by_id_spec.rb +3 -2
- data/lib/capybara/spec/session/find_field_spec.rb +42 -6
- data/lib/capybara/spec/session/find_link_spec.rb +22 -3
- data/lib/capybara/spec/session/find_spec.rb +103 -57
- data/lib/capybara/spec/session/first_spec.rb +34 -18
- data/lib/capybara/spec/session/frame/switch_to_frame_spec.rb +103 -0
- data/lib/capybara/spec/session/{within_frame_spec.rb → frame/within_frame_spec.rb} +44 -2
- data/lib/capybara/spec/session/go_back_spec.rb +2 -1
- data/lib/capybara/spec/session/go_forward_spec.rb +2 -1
- data/lib/capybara/spec/session/has_all_selectors_spec.rb +69 -0
- data/lib/capybara/spec/session/has_button_spec.rb +17 -8
- data/lib/capybara/spec/session/has_css_spec.rb +85 -73
- data/lib/capybara/spec/session/has_current_path_spec.rb +91 -7
- data/lib/capybara/spec/session/has_field_spec.rb +93 -58
- data/lib/capybara/spec/session/has_link_spec.rb +9 -8
- data/lib/capybara/spec/session/has_none_selectors_spec.rb +76 -0
- data/lib/capybara/spec/session/has_select_spec.rb +159 -59
- data/lib/capybara/spec/session/has_selector_spec.rb +64 -28
- data/lib/capybara/spec/session/has_table_spec.rb +1 -0
- data/lib/capybara/spec/session/has_text_spec.rb +27 -12
- data/lib/capybara/spec/session/has_title_spec.rb +22 -4
- data/lib/capybara/spec/session/has_xpath_spec.rb +32 -29
- data/lib/capybara/spec/session/headers.rb +2 -1
- data/lib/capybara/spec/session/html_spec.rb +4 -3
- data/lib/capybara/spec/session/node_spec.rb +198 -38
- data/lib/capybara/spec/session/refresh_spec.rb +28 -0
- data/lib/capybara/spec/session/reset_session_spec.rb +46 -5
- data/lib/capybara/spec/session/response_code.rb +2 -1
- data/lib/capybara/spec/session/save_and_open_page_spec.rb +1 -0
- data/lib/capybara/spec/session/save_and_open_screenshot_spec.rb +6 -5
- data/lib/capybara/spec/session/save_page_spec.rb +34 -2
- data/lib/capybara/spec/session/save_screenshot_spec.rb +31 -1
- data/lib/capybara/spec/session/screenshot_spec.rb +4 -2
- data/lib/capybara/spec/session/select_spec.rb +34 -32
- data/lib/capybara/spec/session/selectors_spec.rb +65 -0
- data/lib/capybara/spec/session/sibling_spec.rb +52 -0
- data/lib/capybara/spec/session/text_spec.rb +4 -4
- data/lib/capybara/spec/session/title_spec.rb +2 -1
- data/lib/capybara/spec/session/uncheck_spec.rb +42 -2
- data/lib/capybara/spec/session/unselect_spec.rb +17 -16
- data/lib/capybara/spec/session/visit_spec.rb +77 -2
- data/lib/capybara/spec/session/window/become_closed_spec.rb +12 -11
- data/lib/capybara/spec/session/window/current_window_spec.rb +1 -0
- data/lib/capybara/spec/session/window/open_new_window_spec.rb +1 -0
- data/lib/capybara/spec/session/window/switch_to_window_spec.rb +16 -11
- data/lib/capybara/spec/session/window/window_opened_by_spec.rb +7 -4
- data/lib/capybara/spec/session/window/window_spec.rb +36 -29
- data/lib/capybara/spec/session/window/windows_spec.rb +1 -0
- data/lib/capybara/spec/session/window/within_window_spec.rb +31 -7
- data/lib/capybara/spec/session/within_spec.rb +14 -6
- data/lib/capybara/spec/spec_helper.rb +37 -4
- data/lib/capybara/spec/test_app.rb +15 -3
- data/lib/capybara/spec/views/buttons.erb +1 -0
- data/lib/capybara/spec/views/fieldsets.erb +2 -1
- data/lib/capybara/spec/views/form.erb +169 -9
- data/lib/capybara/spec/views/frame_child.erb +10 -2
- data/lib/capybara/spec/views/frame_one.erb +2 -1
- data/lib/capybara/spec/views/frame_parent.erb +3 -2
- data/lib/capybara/spec/views/frame_two.erb +2 -1
- data/lib/capybara/spec/views/header_links.erb +1 -0
- data/lib/capybara/spec/views/host_links.erb +1 -0
- data/lib/capybara/spec/views/initial_alert.erb +10 -0
- data/lib/capybara/spec/views/path.erb +1 -0
- data/lib/capybara/spec/views/popup_one.erb +1 -0
- data/lib/capybara/spec/views/popup_two.erb +1 -0
- data/lib/capybara/spec/views/postback.erb +2 -1
- data/lib/capybara/spec/views/tables.erb +1 -0
- data/lib/capybara/spec/views/with_base_tag.erb +1 -0
- data/lib/capybara/spec/views/with_count.erb +2 -1
- data/lib/capybara/spec/views/with_fixed_header_footer.erb +17 -0
- data/lib/capybara/spec/views/with_hover.erb +7 -1
- data/lib/capybara/spec/views/with_html.erb +40 -2
- data/lib/capybara/spec/views/with_html_entities.erb +1 -0
- data/lib/capybara/spec/views/with_js.erb +32 -1
- data/lib/capybara/spec/views/with_scope.erb +1 -0
- data/lib/capybara/spec/views/with_simple_html.erb +2 -1
- data/lib/capybara/spec/views/with_slow_unload.erb +17 -0
- data/lib/capybara/spec/views/with_title.erb +2 -1
- data/lib/capybara/spec/views/with_unload_alert.erb +14 -0
- data/lib/capybara/spec/views/with_windows.erb +7 -0
- data/lib/capybara/spec/views/within_frames.erb +3 -2
- data/lib/capybara/version.rb +2 -1
- data/lib/capybara/window.rb +20 -3
- data/lib/capybara.rb +189 -93
- data/spec/basic_node_spec.rb +7 -6
- data/spec/capybara_spec.rb +90 -4
- data/spec/dsl_spec.rb +3 -1
- data/spec/filter_set_spec.rb +28 -0
- data/spec/fixtures/capybara.csv +1 -0
- data/spec/fixtures/selenium_driver_rspec_failure.rb +5 -1
- data/spec/fixtures/selenium_driver_rspec_success.rb +5 -1
- data/spec/minitest_spec.rb +130 -0
- data/spec/minitest_spec_spec.rb +135 -0
- data/spec/per_session_config_spec.rb +67 -0
- data/spec/rack_test_spec.rb +50 -7
- data/spec/result_spec.rb +76 -0
- data/spec/rspec/features_spec.rb +21 -8
- data/spec/rspec/scenarios_spec.rb +21 -0
- data/spec/rspec/{matchers_spec.rb → shared_spec_matchers.rb} +160 -54
- data/spec/rspec/views_spec.rb +5 -0
- data/spec/rspec_matchers_spec.rb +46 -0
- data/spec/rspec_spec.rb +79 -1
- data/spec/selector_spec.rb +199 -0
- data/spec/selenium_spec_chrome.rb +54 -9
- data/spec/selenium_spec_firefox.rb +68 -0
- data/spec/selenium_spec_marionette.rb +127 -0
- data/spec/server_spec.rb +102 -14
- data/spec/session_spec.rb +54 -0
- data/spec/shared_selenium_session.rb +215 -0
- data/spec/spec_helper.rb +7 -0
- metadata +140 -15
- data/spec/selenium_spec.rb +0 -128
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fb46b7bc5ae7408ca3870b781d015a84bd84abd0a9c7e3ea2bcdf3d8fff85ce8
|
4
|
+
data.tar.gz: 1865dc1efa384c3792161a134bc536c56dca3aa0670ca298ad9f3aa12b49830d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bc2cb739af408323d977b7ca829aa0862ef68ab7d1778c5ae67fb127a47a09258c1f5b53f9d7955bcfcd2892c869a136d7a5346b9115a9e55713ea47c95ebb3
|
7
|
+
data.tar.gz: e8d234ded45305e026b615c60e4eb8597e31fd67b7daefff51d13ab3d79868745e21668a6b45452366ac5a552b38e8c01dc669e73dbe45a9b38ecf8363b54e83
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<div id="selectors">
|
2
|
+
<h2>Built-in Selectors</h2>
|
3
|
+
<ul>
|
4
|
+
<% @selectors.each do |name, selector| %>
|
5
|
+
<li>
|
6
|
+
<h3>:<%= name %></h3>
|
7
|
+
<div class="docstring">
|
8
|
+
<div class="discussion">
|
9
|
+
<p><%= h(selector.docstring) %></p>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
<div class="tags">
|
13
|
+
<p class="inline">Locator:</p>
|
14
|
+
<% if locator=selector.tag('locator') %>
|
15
|
+
<p class="inline"><%= h locator.text %></p>
|
16
|
+
<% end %>
|
17
|
+
<% if selector.has_tag?('filter') %>
|
18
|
+
<p>Filters:</p>
|
19
|
+
<ul class="param">
|
20
|
+
<% selector.tags('filter').each do |filter| %>
|
21
|
+
<li>
|
22
|
+
<span class="name"><%= filter.name %></span>
|
23
|
+
<% if filter.types %>
|
24
|
+
<span class="type">(<tt><%= h(filter.types.join(', ')) %></tt>)</span>
|
25
|
+
<% end %>
|
26
|
+
<% if filter.text %>
|
27
|
+
—
|
28
|
+
<div class="inline"><p><%= h filter.text %></p></div>
|
29
|
+
<% end %>
|
30
|
+
</li>
|
31
|
+
<% end %>
|
32
|
+
</ul>
|
33
|
+
<% end %>
|
34
|
+
</div
|
35
|
+
</li>
|
36
|
+
<% end %>
|
37
|
+
</ul>
|
38
|
+
</div>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
def init
|
2
|
+
super
|
3
|
+
sections.place(:builtins).before(:subclasses)
|
4
|
+
end
|
5
|
+
|
6
|
+
def builtins
|
7
|
+
return if object.path != "Capybara::Selector" # only show built-in selectors for Selector class
|
8
|
+
|
9
|
+
@selectors = Registry.all(:selector)
|
10
|
+
return if @selectors.nil? || @selectors.empty?
|
11
|
+
|
12
|
+
@selectors = @selectors.map do |selector|
|
13
|
+
[selector.name, selector]
|
14
|
+
end
|
15
|
+
|
16
|
+
erb(:selectors)
|
17
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
YARD::Templates::Engine.register_template_path Pathname.new('./.yard/templates_custom')
|
2
|
+
|
3
|
+
YARD::Tags::Library.define_tag "Locator", :locator
|
4
|
+
YARD::Tags::Library.define_tag "Filter", :filter, :with_types_and_name
|
5
|
+
|
6
|
+
class SelectorObject < YARD::CodeObjects::Base
|
7
|
+
def path
|
8
|
+
"__Capybara" + sep + super
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class AddSelectorHandler < YARD::Handlers::Ruby::Base
|
13
|
+
handles method_call(:add_selector)
|
14
|
+
namespace_only
|
15
|
+
process do
|
16
|
+
name = statement.parameters.first.jump(:tstring_content, :ident).source
|
17
|
+
# object = YARD::CodeObjects::MethodObject.new(namespace, name.to_sym)
|
18
|
+
# object = SelectorObject.new(YARD::Registry.resolve(P("Capybara"), "#add_selector", false, true), name.to_sym)
|
19
|
+
object = SelectorObject.new(namespace, name)
|
20
|
+
register(object)
|
21
|
+
parse_block(statement.last.last, :owner => object)
|
22
|
+
|
23
|
+
# modify the object
|
24
|
+
object.dynamic = true
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
class AddExpressionFilterHandler < YARD::Handlers::Ruby::Base
|
29
|
+
handles method_call(:xpath)
|
30
|
+
handles method_call(:css)
|
31
|
+
|
32
|
+
process do
|
33
|
+
return unless owner.is_a?(SelectorObject)
|
34
|
+
return if statement.parameters.empty?
|
35
|
+
# names = statement.parameters.children.map { |p| p.jump(:tstring_content, :ident).source.sub(/^:/, '') }
|
36
|
+
names = statement.parameters.children.map &:source
|
37
|
+
current_names = owner.tags(:filter).map(&:name)
|
38
|
+
(names-current_names).each do |name|
|
39
|
+
owner.add_tag(YARD::Tags::Tag.new(:filter, nil, nil, name))
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
class AddFilterHandler < YARD::Handlers::Ruby::Base
|
45
|
+
handles method_call(:filter)
|
46
|
+
|
47
|
+
process do
|
48
|
+
return unless owner.is_a?(SelectorObject)
|
49
|
+
return if statement.parameters.empty?
|
50
|
+
name = statement.parameters.first.source
|
51
|
+
type = if statement.parameters[1] && statement.parameters[1].source == ':boolean'
|
52
|
+
'Boolean'
|
53
|
+
else
|
54
|
+
nil
|
55
|
+
end
|
56
|
+
if owner.tags(:filter).none? {|tag| tag.name == name }
|
57
|
+
filter_tag = YARD::Tags::Tag.new(:filter, nil, type, name)
|
58
|
+
owner.add_tag(filter_tag)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
class FilterSetHandler < YARD::Handlers::Ruby::Base
|
64
|
+
handles method_call(:filter_set)
|
65
|
+
|
66
|
+
process do
|
67
|
+
return unless owner.is_a?(SelectorObject)
|
68
|
+
return if statement.parameters.empty? || !statement.parameters[1]
|
69
|
+
|
70
|
+
names = statement.parameters[1].flatten.map { |name| ":#{name}" }
|
71
|
+
names.each do |name|
|
72
|
+
if owner.tags(:filter).none? {|tag| tag.name == name }
|
73
|
+
filter_tag = YARD::Tags::Tag.new(:filter, nil, nil, name)
|
74
|
+
owner.add_tag(filter_tag)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
data/.yardopts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--load ./.yard/yard_extensions.rb
|
data/History.md
CHANGED
@@ -1,47 +1,449 @@
|
|
1
|
+
#Version 2.18.0
|
2
|
+
Release date: 2018-02-12
|
3
|
+
|
4
|
+
### Fixed
|
5
|
+
|
6
|
+
* Firefox/geckodriver setting of contenteditable childs contents
|
7
|
+
* Ignore Selenium::WebDriver::Error::SessionNotCreatedError when quitting driver [Tim Connor]
|
8
|
+
|
9
|
+
### Removed
|
10
|
+
|
11
|
+
* Headless chrome modal JS injection that is no longer needed for Chrome 64+/chromedriver 2.35+
|
12
|
+
|
13
|
+
# Version 2.17.0
|
14
|
+
Release date: 2018-01-02
|
15
|
+
|
16
|
+
### Added
|
17
|
+
|
18
|
+
* `have_all_of_selectors`, `have_none_of_selectors` RSpec matchers for parity with minitest assertions [Thomas Walpole]
|
19
|
+
|
20
|
+
### Fixed
|
21
|
+
|
22
|
+
* Allow xpath 3.x gem [Thomas Walpole]
|
23
|
+
* Issue when drivers returned nil for `current_path` and a matcher was used with a Regexp [Thomas Walpole]
|
24
|
+
* Error message when visible element not found, but non-visible was [Andy Klimczak]
|
25
|
+
|
26
|
+
# Version 2.16.1
|
27
|
+
Release date: 2017-11-20
|
28
|
+
|
29
|
+
### Fixed
|
30
|
+
|
31
|
+
* Fix rack_test driver for rack_test 0.7.1/0.8.0 [Thomas Walpole]
|
32
|
+
* `accept_prompt` response text can contain quotes when using selenium with headless chrome [Thomas Walpole]
|
33
|
+
|
34
|
+
# Version 2.16.0
|
35
|
+
Release date: 2017-11-13
|
36
|
+
|
37
|
+
### Added
|
38
|
+
|
39
|
+
* Attempt to move element into view when selenium doesn't correctly do it - See PR #1917 [Thomas Walpole]
|
40
|
+
* `current_path` matchers will now autodetect path vs url based on string to be matched. Deprecates
|
41
|
+
`:only_path` in favor of `:ignore_query` option [Thomas Walpole]
|
42
|
+
* Session#evaluate_async_script [Thomas Walpole]
|
43
|
+
|
44
|
+
### Fixed
|
45
|
+
|
46
|
+
* Default prompt value when using headless Chrome works correctly [Thomas Walpole]
|
47
|
+
* Support new modal error returned by selenium-webdriver 3.7 for W3C drivers [Thomas Walpole]
|
48
|
+
* Calling `respond_to?` on the object passed to `Capybara.configure` block - Issue #1935
|
49
|
+
|
50
|
+
# Version 2.15.4
|
51
|
+
Release date: 2017-10-07
|
52
|
+
|
53
|
+
### Fixed
|
54
|
+
* Visiting an absolute URL shouldn't overwrite the port when no server or always_include_port=false - Issue #1921
|
55
|
+
|
56
|
+
# Version 2.15.3
|
57
|
+
Release date: 2017-10-03
|
58
|
+
|
59
|
+
### Fixed
|
60
|
+
* Visiting '/' when Capybara.app_host has a trailing '/' - Issue #1918 [Thomas Walpole]
|
61
|
+
|
62
|
+
# Version 2.15.2
|
63
|
+
Release date: 2017-10-02
|
64
|
+
|
65
|
+
### Fixed
|
66
|
+
|
67
|
+
* Include within scope description in element not found/ambiguous errors [Thomas Walpole]
|
68
|
+
* Raise error when no activation block is passed to modal methods if using headless chrome [Thomas Walpole]
|
69
|
+
* Don't retry element access when inspecting [Ivan Neverov]
|
70
|
+
* Don't override a specified port (even if it is default port) in visited url [Thomas Walpole]
|
71
|
+
|
72
|
+
# Version 2.15.1
|
73
|
+
|
74
|
+
Release date: 2017-08-04
|
75
|
+
|
76
|
+
### Fixed
|
77
|
+
|
78
|
+
* `attach_file` with no extension/MIME type when using the `:rack_test` driver [Thomas Walpole]
|
79
|
+
|
80
|
+
# Version 2.15.0
|
81
|
+
|
82
|
+
Release date: 2017-08-04
|
83
|
+
|
84
|
+
### Added
|
85
|
+
|
86
|
+
* `sibling` and `ancestor` finders added [Thomas Walpole]
|
87
|
+
* Added ability to pass options to registered servers when setting
|
88
|
+
* Added basic built-in driver registrations `:selenium_chrome` and `:selenium_chrome_headless` [Thomas Walpole]
|
89
|
+
* Add `and_then` to Capybara RSpec matchers which behaves like the previous `and` compounder. [Thomas Walpole]
|
90
|
+
* Compound RSpec expectations with Capybara matchers now run both matchers inside a retry loop rather
|
91
|
+
than waiting for one to pass/fail before checking the second. Will make `#or` more performant and confirm
|
92
|
+
both conditions are true "simultaneously" for `and`. [Thomas Walpole]
|
93
|
+
If you still want the
|
94
|
+
* Default filter values are now included in error descriptions [Thomas Walpole]
|
95
|
+
* Add `Session#refresh` [Thomas Walpole]
|
96
|
+
* Loosened restrictions on where `Session#within_window` can be called from [Thomas Walpole]
|
97
|
+
* Switched from `mime-types` dependency to `mini_mime` [Jason Frey]
|
98
|
+
|
99
|
+
# Version 2.14.4
|
100
|
+
|
101
|
+
Release date: 2017-06-27
|
102
|
+
|
103
|
+
### Fixed
|
104
|
+
|
105
|
+
* Fix retrieval of session_options for HaveSelector matcher descriptions - Issue #1883
|
106
|
+
|
107
|
+
# Version 2.14.3
|
108
|
+
|
109
|
+
Release date: 2017-06-15
|
110
|
+
|
111
|
+
### Fixed
|
112
|
+
|
113
|
+
* Minitest assertions now raise the correct error type - Issue #1879 [Thomas Walpole]
|
114
|
+
* Improve flexibility of detecting Chrome headless mode [Thomas Walpole]
|
115
|
+
|
116
|
+
# Version 2.14.2
|
117
|
+
|
118
|
+
Release date: 2017-06-09
|
119
|
+
|
120
|
+
### Fixed
|
121
|
+
|
122
|
+
* Workaround for system modals when using headless Chrome now works if the page changes
|
123
|
+
|
124
|
+
# Version 2.14.1
|
125
|
+
|
126
|
+
Release date: 2017-06-07
|
127
|
+
|
128
|
+
### Fixed
|
129
|
+
|
130
|
+
* Catch correct error when unexpected system modals are discovered in latest selenium [Thomas Walpole]
|
131
|
+
* Update default `puma` server registration to encourage it to run in single mode [Thomas Walpole]
|
132
|
+
* Suppress invalid element errors raised while lazily evaluating the results of `all` [Thomas Walpole]
|
133
|
+
* Added missing `with_selected` option to the :select selector to match `options`/`with_options` options - Issue #1865 [Bartosz Nowak]
|
134
|
+
* Workaround broken system modals when using selenium with headless Chrome
|
135
|
+
|
136
|
+
# Version 2.14.0
|
137
|
+
|
138
|
+
Release date: 2017-05-01
|
139
|
+
|
140
|
+
### Added
|
141
|
+
|
142
|
+
* "threadsafe" mode that allows per-session configuration
|
143
|
+
* `:type` filter added to the `:fillable_field` selector
|
144
|
+
* Proxy methods when using RSpec for `all`/`within` that call either the Capybara::DSL or RSpec matchers
|
145
|
+
depending on arguments passed
|
146
|
+
* Support for the new errors in selenium-webdriver 3.4
|
147
|
+
|
148
|
+
### Fixed
|
149
|
+
|
150
|
+
* Element#inspect doesn't raise an error on obsolete elements
|
151
|
+
* Setting a contenteditable element with Selenium and Chrome 59
|
152
|
+
* Workaround a hang while setting the window size when using geckodriver 0.16 and Firefox 53
|
153
|
+
* Clicking on url with a blank href goes to the current url when using the RackTest driver
|
154
|
+
|
155
|
+
# Version 2.13.0
|
156
|
+
|
157
|
+
Release date: 2017-03-16
|
158
|
+
|
159
|
+
### Added
|
160
|
+
|
161
|
+
* Selenium driver supports returning element(s) from evaluate_script [Thomas Walpole]
|
162
|
+
* rack_test driver supports click on checkboxes and radio buttons to change their states [Thomas Walpole]
|
163
|
+
* Support RSpec equivalent assertions and expectations for MiniTest [Thomas Walpole]
|
164
|
+
|
165
|
+
### Fixed
|
166
|
+
|
167
|
+
* Editing of content editable children with selenium
|
168
|
+
|
169
|
+
# Version 2.12.1
|
170
|
+
|
171
|
+
Release date: 2017-02-16
|
172
|
+
|
173
|
+
### Fixed
|
174
|
+
* Disable lazy Capybara::Results evaluation for JRuby due to ongoing issues
|
175
|
+
|
176
|
+
# Version 2.12.0
|
177
|
+
|
178
|
+
Release date: 2017-01-22
|
179
|
+
|
180
|
+
### Added
|
181
|
+
|
182
|
+
* Session#switch_to_frame for manually handling frame switching - Issue #1365 [Thomas Walpole]
|
183
|
+
* Session#within_frame now accepts a selector type (defaults to :frame) and locator [Thomas Walpole]
|
184
|
+
* Session#execute_script and Session#evaluate_script now accept optional arguments that will be passed to the JS function. This may not be supported
|
185
|
+
by all drivers, and the types of arguments that may be passed is limited. If drivers opt to support this feature they should support passing page elements. [Thomas Walpole]
|
186
|
+
* :exact option for text and title matchers - Issue #1256 [Thomas Walpole]
|
187
|
+
* :exact_text option for selector finders/minders - Issue #1256 [Thomas Walpole]
|
188
|
+
* Capybara.exact_text setting that affects the text matchers and :text options passed to selector finders/matchers. Issue #1256 [Thomas Walpole]
|
189
|
+
* :make_visible option for #attach_file that allows for convenient changing of the CSS style of a file input element before attaching the file to it. Requires driver
|
190
|
+
support for passing page elements to Session#execute_script [Thomas Walpole]
|
191
|
+
* assert_all_selectors/assert_none_of_selectors assertions added
|
192
|
+
* :link selector (used by find_link/click_link) now supports finding hyperlink placeholders (no href attribute) when href: nil option is specified [Thomas Walpole]
|
193
|
+
* `within_element` as an alias of `within` due to RSpec collision
|
194
|
+
|
195
|
+
### Fixed
|
196
|
+
|
197
|
+
* Fields inside a disabled fieldset are now correctly considered disabled - Issue #1816 [Thomas Walpole]
|
198
|
+
* Lazy Capybara::Results evaluation enabled for JRuby 9.1.6.0+
|
199
|
+
* A driver returning nil for #current_url won't raise an exception when calling #current_path [Dylan Reichstadt]
|
200
|
+
* Support Ruby 2.4.0 unified Integer [Koichi ITO]
|
201
|
+
* RackTest driver no longer modifies the text content of textarea elements in order to behave more like a real browser [Thomas Walpole]
|
202
|
+
* TextQuery (assert_text/have_text/etc) now ignores errors when trying to generate more helpful errors messages so the original error isn't hidden [Thomas Walpole]
|
203
|
+
|
204
|
+
# Version 2.11.0
|
205
|
+
|
206
|
+
Release date: 2016-12-05
|
207
|
+
|
208
|
+
### Added
|
209
|
+
|
210
|
+
* Options for clearing session/local storage on reset added to the Selenium driver
|
211
|
+
* Window size changes wait for the size to stabilize
|
212
|
+
* Defined return value for most actions
|
213
|
+
* Ignore specific error when qutting selenium driver instance - Issue #1773 [Dylan Reichstadt, Thomas Walpole]
|
214
|
+
* Warn on selenium unknown errors rather than raising when quitting driver [Adam Pohorecki, Thomas Walpole]
|
215
|
+
* Capybara::Result#each now returns an `Enumerator` when called without a block - Issue #1777 [Thomas Walpole]
|
216
|
+
|
217
|
+
### Fixed
|
218
|
+
|
219
|
+
* Selenium driver with Chrome should support multiple file upload [Thomas Walpole]
|
220
|
+
* Fix visible: :hidden with :text option behavior [Thomas Walpole]
|
221
|
+
|
222
|
+
# Version 2.10.2
|
223
|
+
|
224
|
+
Release date: 2016-11-30
|
225
|
+
|
226
|
+
### Fixed
|
227
|
+
|
228
|
+
* App exceptions with multiple parameter initializers now re-raised correctly - Issue #1785 [Michael Lutsiuk]
|
229
|
+
* Use Addressable::URI when parsing current_path since it's more lenient of technically invalid URLs - Issue #1801 [Marcos Duque, Thomas Walpole]
|
230
|
+
|
231
|
+
# Version 2.10.1
|
232
|
+
|
233
|
+
Release date: 2016-10-08
|
234
|
+
|
235
|
+
### Fixed
|
236
|
+
* App errors are now correctly raised with the explanatory cause in JRuby [Thomas Walpole]
|
237
|
+
* Capybara::Result optimization disabled in JRuby due to issue with lazy enumerator evaluation [Thomas Walpole]
|
238
|
+
See: https://github.com/jruby/jruby/issues/4212
|
239
|
+
|
240
|
+
# Version 2.10.0
|
241
|
+
|
242
|
+
Release date: 2016-10-05
|
243
|
+
|
244
|
+
### Added
|
245
|
+
|
246
|
+
* Select `<button>` elements with descendant images with `alt` attributes matching the locator [Ian Lesperance]
|
247
|
+
* Locator string is optional in selector based matchers [Thomas Walpole]
|
248
|
+
* Selectors can specify their default visible setting [Thomas Walpole]
|
249
|
+
* Selector based finders and matchers can be passed a block to filter the results within the retry behavior [Thomas Walpole]
|
250
|
+
|
251
|
+
# Version 2.9.2
|
252
|
+
|
253
|
+
Release date: 2016-09-29
|
254
|
+
|
255
|
+
### Fixed
|
256
|
+
* :label built-in selector finds nested label/control by control id if the label has no 'for' attribute [Thomas Walpole]
|
257
|
+
* Warning issued if an unknown selector type is specified [Thomas Walpole]
|
258
|
+
|
259
|
+
# Version 2.9.1
|
260
|
+
|
261
|
+
Release date: 2016-09-23
|
262
|
+
|
263
|
+
### Fixed
|
264
|
+
|
265
|
+
* allow_label_click option did not work in some cases with Poltergeist - Issue #1762 [Thomas Walpole]
|
266
|
+
* matches_selector? should have access to all of a selectors options except the count options [Thomas Walpole]
|
267
|
+
|
268
|
+
# Version 2.9.0
|
269
|
+
|
270
|
+
Release date: 2016-09-19
|
271
|
+
|
272
|
+
### Fixed
|
273
|
+
|
274
|
+
* Issue with rack-test driver and obselete mime-types when using `#attach_file` - Issue #1756 [Thomas Walpole]
|
275
|
+
|
276
|
+
### Added
|
277
|
+
|
278
|
+
* `:class` option to many of the built-in selectors [Thomas Walpole]
|
279
|
+
* Removed need to specify value when creating `:boolean` filter type in custom selectors [Thomas Walpole]
|
280
|
+
* Filters can now be implemented through the XPath/CSS expressions in custom selectors [Thomas Walpole]
|
281
|
+
* `Element#matches_xpath?` and `Element#matches_css?` [Thomas Walpole]
|
282
|
+
|
283
|
+
# Version 2.8.1
|
284
|
+
|
285
|
+
Release date: 2016-08-25
|
286
|
+
|
287
|
+
### Fixed
|
288
|
+
|
289
|
+
* Fixed error message from have_text when text is not found but contains regex special characters [Ryunosuke Sato]
|
290
|
+
* Warn when :exact option is passed that has no effect [Thomas Walpole]
|
291
|
+
|
292
|
+
# Version 2.8.0
|
293
|
+
|
294
|
+
Release date: 2016-08-16
|
295
|
+
|
296
|
+
### Fixed
|
297
|
+
|
298
|
+
* Issue with modals present when closing the page using selenium - Issue #1696 [Jonas Nicklas, Thomas Walpole]
|
299
|
+
* Server errors raised in test code have the cause set to an explanatory exception
|
300
|
+
in rubies that support Exception#cause rather than a confusing ExpectationNotMet - Issue #1719 [Thomas Walpole]
|
301
|
+
* background/given/given! RSpec aliases will work if RSpec config.shared_context_metadata_behavior == :apply_to_host_groups [Thomas Walpole]
|
302
|
+
* Fixed setting of unexpectedAlertError now that Selenium will be freezing the Capabilities::DEFAULTS [Thomas Walpole]
|
303
|
+
|
304
|
+
### Added
|
305
|
+
|
306
|
+
* 'check', 'uncheck', and 'choose' can now optionally click the associated label if the checkbox/radio button is not visible [Thomas Walpole]
|
307
|
+
* Raise error if Capybara.app_host/default_host are specified incorrectly [Thomas Walpole]
|
308
|
+
* Capybara::Selector::FilterSet allows for sharing filter definitions between selectors [Thomas Walpole]
|
309
|
+
* Remove need to pass nil locator in most node actions when locator is not needed [Thomas Walpole]
|
310
|
+
* New frames API for drivers - Issue #1365 [Thomas Walpole]
|
311
|
+
* Deprecated Element#parent in favor of Element#query_scope to better indicate what it is [Thomas Walpole]
|
312
|
+
* Improved error messages for have_text matcher [Alex Chaffee, Thomas Walpole]
|
313
|
+
* The `:with` option for the field selector now accepts a regular expression for matching the field value [Uwe Kubosch]
|
314
|
+
* Support matching on aria-label attribute when finding fields/links/buttons - Issue #1528 [Thomas Walpole]
|
315
|
+
* Optimize Capybara::Result to only apply fields as necessary in common use-case of `.all[idx]` [Thomas Walpole]
|
316
|
+
|
317
|
+
# Version 2.7.1
|
318
|
+
|
319
|
+
Release date: 2016-05-01
|
320
|
+
|
321
|
+
### Fixed
|
322
|
+
|
323
|
+
* Issue where within_Frame would fail with Selenium if the frame is removed from within itself [Thomas Walpole]
|
324
|
+
* Reset sessions in reverse order so sessions with active servers are reset last - Issue #1692 [Jonas Nicklas, Thomas Walpole]
|
325
|
+
|
326
|
+
# Version 2.7.0
|
327
|
+
|
328
|
+
Release date: 2016-04-07
|
329
|
+
|
330
|
+
### Fixed
|
331
|
+
|
332
|
+
* Element#visible?/checked?/disabled?/selected? Now return boolean as expected when using the rack_test driver [Thomas Walpole]
|
333
|
+
* The rack_test driver now considers \<input type="hidden"> elements as non-visible [Thomas Walpole]
|
334
|
+
* A nil locator passed to the built-in html type selectors now behaves consistently, and finds elements of the expected types [Thomas Walpole]
|
335
|
+
* Capybara::Server now searches for available ports on the same interface it binds to [Aaron Stone]
|
336
|
+
* Selenium Driver handles system modals that appear when page is unloading [Thomas Walpole]
|
337
|
+
* Warning output if unused parameters are passed to a selector query [Thomas Walpole]
|
338
|
+
|
339
|
+
### Added
|
340
|
+
|
341
|
+
* Capybara now waits for requests to Capybaras server to complete while restting the session [John Hawthorn, Thomas Walpole]
|
342
|
+
* Capybara.reuse_server option to allow disabling of sharing server instance between sessions [Thomas Walpole]
|
343
|
+
* :multiple filter added to relevant selectors [Thomas Walpole]
|
344
|
+
* Provided server registrations for :webrick and :puma. Capybara.server = :puma for testing with Rails 5 [Thomas Walpole]
|
345
|
+
* Deprecate passing a block to Capybara::server user Capybara::register_server instead [Thomas Walpole]
|
346
|
+
* :option selector supports :selected and :disabled filters [Thomas Walpole]
|
347
|
+
* Element#matches_selector? and associated matchers (match_selector, match_css, etc) for comparing an element to a selector [Thomas Walpole]
|
348
|
+
* Deprecated Driver#browser_initialized? - Driver#reset! is required to be synchronous [Jonas Nicklas, Thomas Walpole]
|
349
|
+
* Deprecated Capybara.save_and_open_page_path in favor of Capybara.save_path with slightly different behavior when using relative paths with
|
350
|
+
save_page/save_screenshot [Thomas Walpole]
|
351
|
+
* :label selector [Thomas Walpole]
|
352
|
+
|
353
|
+
# Version 2.6.2
|
354
|
+
|
355
|
+
Relase date: 2016-01-27
|
356
|
+
|
357
|
+
### Fixed
|
358
|
+
|
359
|
+
* support for more than just addressable 2.4.0 [Thomas Walpole]
|
360
|
+
|
361
|
+
# Version 2.6.1
|
362
|
+
|
363
|
+
Release date: 2016-01-27
|
364
|
+
|
365
|
+
### Fixed
|
366
|
+
|
367
|
+
* Add missing require for addressable [Jorge Bejar]
|
368
|
+
|
369
|
+
# Version 2.6.0
|
370
|
+
|
371
|
+
Relase date: 2016-01-17
|
372
|
+
|
373
|
+
### Fixed
|
374
|
+
|
375
|
+
* Fixed path escaping issue with current_path matchers [Thomas Walpole, Luke Rollans] (Issue #1611)
|
376
|
+
* Fixed circular require [David Rodríguez]
|
377
|
+
* Capybara::RackTest::Form no longer overrides Object#method [David Rodriguez]
|
378
|
+
* options and with_options filter for :select selector have more intuitive visibility behavior [Nathan]
|
379
|
+
* Test for nested modal API method support [Thomas Walpole]
|
380
|
+
|
381
|
+
|
382
|
+
### Added
|
383
|
+
|
384
|
+
* Capybara.modify_selector [Thomas Walpole]
|
385
|
+
* xfeature and ffeature aliases added when using RSpec [Filip Bartuzi]
|
386
|
+
* Selenium driver supports a :clear option to #set to handle different strategies for clearing a field [Thomas Walpole]
|
387
|
+
* Support the use of rack 2.0 with the rack_test driver [Travis Grathwell, Thomas Walpole]
|
388
|
+
* Disabled option for default selectors now supports true, false, or :all [Jillian Rosile, Thomas Walpole]
|
389
|
+
* Modal API methods now default wait time to Capybara.default_max_wait_time [Thomas Walpole]
|
390
|
+
|
1
391
|
# Version 2.5.0
|
392
|
+
|
2
393
|
Release date: 2015-08-25
|
3
394
|
|
4
395
|
### Fixed
|
5
|
-
|
6
|
-
*
|
396
|
+
|
397
|
+
* Error message now raised correctly when invalid options passed to 'have_text'/'have_content' [Thomas Walpole]
|
398
|
+
* Rack-test driver correctly gets document title when elements on the page have nested title elements (SVG) [Thomas Walpole]
|
7
399
|
* 'save_page' no longer errors when using Capybara.asset_host if the page has no \<head> element [Travis Grathwell]
|
8
400
|
* rack-test driver will ignore clicks on links with href starting with '#' or 'javascript:'
|
9
401
|
|
10
402
|
### Added
|
11
|
-
|
403
|
+
|
404
|
+
* has_current_path? and associated asserts/matchers added [Thomas Walpole]
|
12
405
|
* Implement Node#path in selenium driver [Soutaro Matsumoto]
|
13
|
-
* 'using_session' is now nestable [
|
14
|
-
* 'switch_to_window' will now use waiting behavior for a matching window to appear [
|
15
|
-
* Capybara.default_wait_time deprecated in favor of Capybara.default_max_wait_time to more clearly explain its purpose [Paul Pettengill]
|
406
|
+
* 'using_session' is now nestable [Thomas Walpole]
|
407
|
+
* 'switch_to_window' will now use waiting behavior for a matching window to appear [Thomas Walpole]
|
16
408
|
* Warning when attempting to select a disabled option
|
17
409
|
* Capybara matchers are now available in RSpec view specs by default [Joshua Clayton]
|
18
410
|
* 'have_link' and 'click_link' now accept Regexp for href matching [Yaniv Savir]
|
19
411
|
* 'find_all' as an alias of 'all' due to collision with RSpec
|
20
412
|
* Capybara.wait_on_first_by_default setting (default is false)
|
21
413
|
If set to true 'first' will use Capybaras waiting behavior to wait for at least one element to appear by default
|
22
|
-
* Capybara waiting behavior uses the monotonic clock if supported to ease restrictions on freezing time in tests [Dmitry Maksyoma,
|
23
|
-
* Capybara.server_errors setting that allows to configure what type of errors will be raised from the server thread [
|
24
|
-
* Node#send_keys to allow for sending keypresses directly to elements [
|
414
|
+
* Capybara waiting behavior uses the monotonic clock if supported to ease restrictions on freezing time in tests [Dmitry Maksyoma, Thomas Walpole]
|
415
|
+
* Capybara.server_errors setting that allows to configure what type of errors will be raised from the server thread [Thomas Walpole]
|
416
|
+
* Node#send_keys to allow for sending keypresses directly to elements [Thomas Walpole]
|
25
417
|
* 'formmethod' attribute support in RackTest driver [Emilia Andrzejewska]
|
26
418
|
* Clear field using backspaces in Selenium driver by using `:fill_options => { :clear => :backspace }` [Joe Lencioni]
|
27
419
|
|
28
|
-
|
420
|
+
### Deprecated
|
421
|
+
|
422
|
+
* Capybara.default_wait_time deprecated in favor of Capybara.default_max_wait_time to more clearly explain its purpose [Paul Pettengill]
|
423
|
+
|
424
|
+
# Version 2.4.4
|
425
|
+
|
29
426
|
Release date: 2014-10-13
|
30
427
|
|
31
428
|
### Fixed
|
429
|
+
|
32
430
|
* Test for visit behavior updated [Phil Baker]
|
33
431
|
* Removed concurrency prevention in favor of a note in the README - due to load order issues
|
34
432
|
|
35
433
|
# Version 2.4.3
|
434
|
+
|
36
435
|
Relase date: 2014-09-21
|
37
436
|
|
38
437
|
### Fixed
|
438
|
+
|
39
439
|
* Update concurrency prevention to match Rails 4.2 behavior
|
40
440
|
|
41
441
|
# Version 2.4.2
|
442
|
+
|
42
443
|
Release date: 2014-09-20
|
43
444
|
|
44
445
|
### Fixed
|
446
|
+
|
45
447
|
* Prevent concurrency issue when testing Rails app with default test environment [Thomas Walpole]
|
46
448
|
* Tags for windows API tests fixed [Dmitry Vorotilin]
|
47
449
|
* Documentation Fixes [Andrey Botalov]
|
@@ -76,6 +478,7 @@ Release date: 2014-07-03
|
|
76
478
|
Release date: 2014-06-02
|
77
479
|
|
78
480
|
### Added
|
481
|
+
|
79
482
|
* New window management API [Andrey Botalov]
|
80
483
|
* Speed improvement for visible text detection in RackTest [Thomas Walpole]
|
81
484
|
Thanks to Phillipe Creux for instigating this
|