Sha256: c047b390ddeff0705db0a6576655361b5361c4957ab17d9ca02fa0c3aed83156

Contents?: true

Size: 1.56 KB

Versions: 4

Compression:

Stored size: 1.56 KB

Contents

require 'timeout'
require 'nokogiri'

module Capybara
  class CapybaraError < StandardError; end
  class DriverNotFoundError < CapybaraError; end
  class ElementNotFound < CapybaraError; end
  class OptionNotFound < ElementNotFound; end
  class UnselectNotAllowed < CapybaraError; end
  class NotSupportedByDriverError < CapybaraError; end
  class TimeoutError < CapybaraError; end
  class LocateHiddenElementError < CapybaraError; end
  class InfiniteRedirectError < TimeoutError; end
  
  class << self
    attr_accessor :debug, :asset_root, :app_host, :run_server, :default_host
    attr_accessor :default_selector, :default_wait_time, :ignore_hidden_elements

    def default_selector
      @default_selector ||= :xpath
    end
    
    def default_wait_time
      @default_wait_time ||= 2
    end

    def log(message)
      puts "[capybara] #{message}" if debug
      true
    end
  end
  
  autoload :Server,     'capybara/server'
  autoload :Session,    'capybara/session'
  autoload :Node,       'capybara/node'
  autoload :XPath,      'capybara/xpath'
  autoload :Searchable, 'capybara/searchable'
  autoload :VERSION,    'capybara/version'
  
  module Driver
    autoload :Base,     'capybara/driver/base'
    autoload :RackTest, 'capybara/driver/rack_test_driver'
    autoload :Celerity, 'capybara/driver/celerity_driver'
    autoload :Culerity, 'capybara/driver/culerity_driver'
    autoload :Selenium, 'capybara/driver/selenium_driver'
  end
end

Capybara.run_server = true
Capybara.default_selector = :xpath
Capybara.default_wait_time = 2
Capybara.ignore_hidden_elements = false

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
david-capybara-0.3.8 lib/capybara.rb
katzil-capybara-0.3.8 lib/capybara.rb
capybara-0.3.8 lib/capybara.rb
capybara-0.3.7 lib/capybara.rb