Sha256: f00180c1e0be4d528a305d81188501f63dd8273a39af3092f189378a443825f6

Contents?: true

Size: 419 Bytes

Versions: 1

Compression:

Stored size: 419 Bytes

Contents

module Watir

  class Browser
    attr_reader :doc

    #
    # Store instance of Nokogiri
    #

    def doc=(html)
      @doc = html
      return if html.nil?

      reset_doc = ->(browser) { browser.doc = nil }
      after_hooks.add(reset_doc)
    end

    #
    # Uses Nokogiri to return the text of page body.
    #
    # @return [String]
    #

    def text!
      body.text!
    end

  end # Browser
end # Watir

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
watigiri-0.2.0 lib/extensions/watir/browser.rb