Sha256: 8c284219efd78a00679c8b4b141e052733d9d77ecadd66b8f05342218d822982
Contents?: true
Size: 658 Bytes
Versions: 2
Compression:
Stored size: 658 Bytes
Contents
module PageMagic attr_reader :browser, :session include AjaxSupport def initialize session=Session.new(Capybara.current_session), options={}, &block @browser = session.raw_session @session = session @browser_element = @browser navigate if options[:navigate_to_page] block.call @browser if block end def title @browser.title end def text_on_page? text text().downcase.include?(text.downcase) end def visit @browser.visit self.class.url self end def text @browser.text end def method_missing method, *args ElementContext.new(self, @browser, self).send(method, *args) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
page_magic-0.11.0.alpha3 | lib/page_magic/page_magic.rb |
page_magic-0.11.0.alpha2 | lib/page_magic/page_magic.rb |