1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00
teamcapybara--capybara/lib/capybara.rb

44 lines
1.1 KiB
Ruby
Raw Normal View History

require 'timeout'
2009-11-16 16:02:16 -05:00
require 'nokogiri'
module Capybara
2009-12-13 09:08:12 -05:00
VERSION = '0.2.0'
2009-11-16 16:02:16 -05:00
class CapybaraError < StandardError; end
class DriverNotFoundError < CapybaraError; end
class ElementNotFound < CapybaraError; end
class NotSupportedByDriverError < CapybaraError; end
2009-11-16 16:02:16 -05:00
class << self
attr_accessor :debug, :asset_root, :app_host
2009-12-22 18:14:04 -05:00
attr_writer :default_selector, :default_wait_timeout
def default_selector
@default_selector ||= :xpath
end
2009-12-22 18:14:04 -05:00
def default_wait_timeout
@default_wait_timeout ||= 10
end
2009-11-16 16:02:16 -05:00
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'
2009-11-16 16:02:16 -05:00
module Driver
autoload :Base, 'capybara/driver/base'
2009-11-16 16:02:16 -05:00
autoload :RackTest, 'capybara/driver/rack_test_driver'
autoload :Celerity, 'capybara/driver/celerity_driver'
autoload :Culerity, 'capybara/driver/culerity_driver'
2009-11-16 16:02:16 -05:00
autoload :Selenium, 'capybara/driver/selenium_driver'
end
end