Class: Capybara::SessionConfig
- Inherits:
-
Object
- Object
- Capybara::SessionConfig
- Defined in:
- lib/capybara/session/config.rb
Constant Summary collapse
- OPTIONS =
%i[always_include_port run_server default_selector default_max_wait_time ignore_hidden_elements automatic_reload match exact exact_text raise_server_errors visible_text_only automatic_label_click enable_aria_label save_path asset_host default_host app_host server_host server_port server_errors default_set_options disable_animation test_id predicates_wait default_normalize_ws w3c_click_offset].freeze
Instance Method Summary collapse
-
#always_include_port ⇒ Object
See configure.
-
#app_host ⇒ Object
See configure.
- #app_host=(url) ⇒ Object
-
#asset_host ⇒ Object
See configure.
-
#automatic_label_click ⇒ Object
See configure.
-
#automatic_reload ⇒ Object
See configure.
-
#default_host ⇒ Object
See configure.
- #default_host=(url) ⇒ Object
-
#default_max_wait_time ⇒ Object
See configure.
-
#default_normalize_ws ⇒ Object
See configure.
-
#default_selector ⇒ Object
See configure.
-
#default_set_options ⇒ Object
See configure.
-
#disable_animation ⇒ Object
See configure.
-
#enable_aria_label ⇒ Object
See configure.
-
#exact ⇒ Object
See configure.
-
#ignore_hidden_elements ⇒ Object
See configure.
- #initialize_copy(other) ⇒ Object
-
#match ⇒ Object
See configure.
-
#raise_server_errors ⇒ Object
See configure.
-
#run_server ⇒ Object
See configure.
-
#save_path ⇒ Object
See configure.
-
#server_errors ⇒ Object
See configure.
- #server_errors=(errors) ⇒ Object
-
#server_host ⇒ String
The IP address bound by default server.
-
#server_port ⇒ Object
See configure.
-
#test_id ⇒ Object
See configure.
-
#test_id=(id) ⇒ Object
Set an attribue to be optionally matched against the locator for builtin selector types.
-
#visible_text_only ⇒ Object
See configure.
-
#w3c_click_offset ⇒ Object
See configure.
Instance Method Details
#always_include_port ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#app_host ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#app_host=(url) ⇒ Object
81 82 83 84 85 86 87 |
# File 'lib/capybara/session/config.rb', line 81 def app_host=(url) unless url.nil? || url.match?(URI::DEFAULT_PARSER.make_regexp) raise ArgumentError, "Capybara.app_host should be set to a url (http://www.example.com). Attempted to set #{url.inspect}." end @app_host = url end |
#asset_host ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#automatic_label_click ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#automatic_reload ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#default_host ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#default_host=(url) ⇒ Object
90 91 92 93 94 95 96 |
# File 'lib/capybara/session/config.rb', line 90 def default_host=(url) unless url.nil? || url.match?(URI::DEFAULT_PARSER.make_regexp) raise ArgumentError, "Capybara.default_host should be set to a url (http://www.example.com). Attempted to set #{url.inspect}." end @default_host = url end |
#default_max_wait_time ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#default_normalize_ws ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#default_selector ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#default_set_options ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#disable_animation ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#enable_aria_label ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#exact ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#ignore_hidden_elements ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#initialize_copy(other) ⇒ Object
111 112 113 114 |
# File 'lib/capybara/session/config.rb', line 111 def initialize_copy(other) super @server_errors = @server_errors.dup end |
#match ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#raise_server_errors ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#run_server ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#save_path ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#server_errors ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#server_errors=(errors) ⇒ Object
76 77 78 |
# File 'lib/capybara/session/config.rb', line 76 def server_errors=(errors) (@server_errors ||= []).replace(errors.dup) end |
#server_host ⇒ String
Returns The IP address bound by default server.
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#server_port ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#test_id ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#test_id=(id) ⇒ Object
Set an attribue to be optionally matched against the locator for builtin selector types.
This attribute will be checked by builtin selector types whenever id would normally be checked.
If nil
then it will be ignored.
107 108 109 |
# File 'lib/capybara/session/config.rb', line 107 def test_id=(id) @test_id = id&.to_sym end |
#visible_text_only ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |
#w3c_click_offset ⇒ Object
65 |
# File 'lib/capybara/session/config.rb', line 65 remove_method :server_host |