Sha256: 43ca5074ff5e6fb72c62f62e3a876296195bcf0cd861463b87fd1f8497ae16cd
Contents?: true
Size: 676 Bytes
Versions: 42
Compression:
Stored size: 676 Bytes
Contents
module Spider; module Test class PageObject attr_reader :browser def initialize(browser=nil) unless browser if Object.const_defined?(:Capybara) && Capybara.current_session browser = Capybara.current_session end end @browser = browser end def go(url) if url =~ /^https?:\/\/([^\/])(\/.+)$/ url = $1 end @browser.visit(url) end def method_missing(method, *args) @browser.send(method, *args) end end end; end
Version data entries
42 entries across 42 versions & 1 rubygems