Class: Capybara::SessionConfig

Inherits:
Object
  • Object
show all
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].freeze

Instance Method Summary collapse

Instance Method Details

#always_include_portObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#app_hostObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#app_host=(url) ⇒ Object

Raises:

  • (ArgumentError)


70
71
72
73
# File 'lib/capybara/session/config.rb', line 70

def app_host=(url)
  raise ArgumentError, "Capybara.app_host should be set to a url (http://www.example.com)" unless url.nil? || (url =~ URI::DEFAULT_PARSER.make_regexp)
  @app_host = url
end

#asset_hostObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#automatic_label_clickObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#automatic_reloadObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#default_hostObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#default_host=(url) ⇒ Object

Raises:

  • (ArgumentError)


76
77
78
79
# File 'lib/capybara/session/config.rb', line 76

def default_host=(url)
  raise ArgumentError, "Capybara.default_host should be set to a url (http://www.example.com)" unless url.nil? || (url =~ URI::DEFAULT_PARSER.make_regexp)
  @default_host = url
end

#default_max_wait_timeObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#default_selectorObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#enable_aria_labelObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#exactObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#ignore_hidden_elementsObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#initialize_copy(other) ⇒ Object



81
82
83
84
# File 'lib/capybara/session/config.rb', line 81

def initialize_copy(other)
  super
  @server_errors = @server_errors.dup
end

#matchObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#raise_server_errorsObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#run_serverObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#save_pathObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#server_errorsObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#server_errors=(errors) ⇒ Object



65
66
67
# File 'lib/capybara/session/config.rb', line 65

def server_errors=(errors)
  (@server_errors ||= []).replace(errors.dup)
end

#server_hostString

Returns The IP address bound by default server

Returns:

  • (String)

    The IP address bound by default server



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#server_portObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host

#visible_text_onlyObject



54
# File 'lib/capybara/session/config.rb', line 54

remove_method :server_host