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 default_set_options disable_animation].freeze

Instance Method Summary collapse

Instance Method Details

#always_include_portObject



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

remove_method :server_host

#app_hostObject



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

remove_method :server_host

#app_host=(url) ⇒ Object

Raises:

  • (ArgumentError)


74
75
76
77
# File 'lib/capybara/session/config.rb', line 74

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

#asset_hostObject



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

remove_method :server_host

#automatic_label_clickObject



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

remove_method :server_host

#automatic_reloadObject



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

remove_method :server_host

#default_hostObject



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

remove_method :server_host

#default_host=(url) ⇒ Object

Raises:

  • (ArgumentError)


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

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

#default_max_wait_timeObject



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

remove_method :server_host

#default_selectorObject



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

remove_method :server_host

#default_set_optionsObject



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

remove_method :server_host

#disable_animationObject



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

remove_method :server_host

#disable_animation=(bool) ⇒ Object



86
87
88
89
# File 'lib/capybara/session/config.rb', line 86

def disable_animation=(bool)
  warn "Capybara.disable_animation is a beta feature - it may change/disappear in a future point version" if bool
  @disable_animation = bool
end

#enable_aria_labelObject



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

remove_method :server_host

#exactObject



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

remove_method :server_host

#ignore_hidden_elementsObject



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

remove_method :server_host

#initialize_copy(other) ⇒ Object



91
92
93
94
# File 'lib/capybara/session/config.rb', line 91

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

#matchObject



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

remove_method :server_host

#raise_server_errorsObject



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

remove_method :server_host

#run_serverObject



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

remove_method :server_host

#save_pathObject



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

remove_method :server_host

#server_errorsObject



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

remove_method :server_host

#server_errors=(errors) ⇒ Object



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

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



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

remove_method :server_host

#server_portObject



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

remove_method :server_host

#visible_text_onlyObject



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

remove_method :server_host