class Capybara::SessionConfig
def app_host=(url)
def app_host=(url) raise ArgumentError, "Capybara.app_host should be set to a url (http://www.example.com). Attempted to set #{url.inspect}." if url && url !~ URI::DEFAULT_PARSER.make_regexp @app_host = url end
def default_host=(url)
def default_host=(url) raise ArgumentError, "Capybara.default_host should be set to a url (http://www.example.com). Attempted to set #{url.inspect}." if url && url !~ URI::DEFAULT_PARSER.make_regexp @default_host = url end
def disable_animation=(bool_or_allowlist)
def disable_animation=(bool_or_allowlist) warn 'Capybara.disable_animation is a beta feature - it may change/disappear in a future point version' if bool_or_allowlist @disable_animation = bool_or_allowlist end
def initialize_copy(other)
def initialize_copy(other) super @server_errors = @server_errors.dup end
def server_errors=(errors)
def server_errors=(errors) (@server_errors ||= []).replace(errors.dup) end
def server_host
-
(String)
- The IP address bound by default server
def server_host @server_host || '127.0.0.1' end
def test_id=(id)
@params [String, Symbol, nil] id Name of the attribute to use as the test id
If `nil` then it will be ignored.
This attribute will be checked by builtin selector types whenever id would normally be checked.
Set an attribue to be optionally matched against the locator for builtin selector types.
#
def test_id=(id) @test_id = id&.to_sym end