Class: Capybara::SessionConfig
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/capybara/session/config.rb |
Constant Summary
-
OPTIONS =
# File 'lib/capybara/session/config.rb', line 7%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 enable_aria_role default_retry_interval].freeze
Instance Attribute Summary
-
#app_host
rw
See configure
- #app_host=(url) rw
-
#default_host
rw
See configure
- #default_host=(url) rw
-
#server_errors
rw
See configure
- #server_errors=(errors) rw
-
#test_id
rw
See configure
-
#test_id=(id)
rw
Set an attribute to be optionally matched against the locator for builtin selector types.
Instance Method Summary
-
#always_include_port
See configure
-
#asset_host
See configure
-
#automatic_label_click
See configure
-
#automatic_reload
See configure
-
#default_max_wait_time
See configure
-
#default_normalize_ws
See configure
-
#default_retry_interval
See configure
-
#default_selector
See configure
-
#default_set_options
See configure
-
#disable_animation
See configure
-
#enable_aria_label
See configure
-
#enable_aria_role
See configure
-
#exact
See configure
-
#ignore_hidden_elements
See configure
- #initialize_copy(other)
-
#match
See configure
-
#raise_server_errors
See configure
-
#run_server
See configure
-
#save_path
See configure
- #server_host ⇒ String
-
#server_port
See configure
-
#visible_text_only
See configure
-
#w3c_click_offset
See configure
Instance Attribute Details
#app_host (rw)
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#app_host=(url) (rw)
[ GitHub ]# File 'lib/capybara/session/config.rb', line 85
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
#default_host (rw)
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#default_host=(url) (rw)
[ GitHub ]# File 'lib/capybara/session/config.rb', line 94
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
#server_errors (rw)
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#server_errors=(errors) (rw)
[ GitHub ]# File 'lib/capybara/session/config.rb', line 80
def server_errors=(errors) (@server_errors ||= []).replace(errors.dup) end
#test_id (rw)
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#test_id=(id) (rw)
Set an attribute 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.
# File 'lib/capybara/session/config.rb', line 111
def test_id=(id) @test_id = id&.to_sym end
Instance Method Details
#always_include_port
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#asset_host
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#automatic_label_click
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#automatic_reload
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#default_max_wait_time
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#default_normalize_ws
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#default_retry_interval
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#default_selector
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#default_set_options
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#disable_animation
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#enable_aria_label
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#enable_aria_role
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#exact
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#initialize_copy(other)
[ GitHub ]# File 'lib/capybara/session/config.rb', line 115
def initialize_copy(other) super @server_errors = @server_errors.dup end
#match
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#raise_server_errors
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#run_server
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#save_path
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#server_host ⇒ String
# File 'lib/capybara/session/config.rb', line 75
remove_method :server_host
#server_port
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#visible_text_only
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host
#w3c_click_offset
[ GitHub ]# File 'lib/capybara/session/config.rb', line 69
remove_method :server_host