Sha256: 98464b308d4b1d2ab2fe6d87448a839613f0de6c32057387aadc4e529af91ef4

Contents?: true

Size: 835 Bytes

Versions: 3

Compression:

Stored size: 835 Bytes

Contents

module OperaWatir
  module Compat
    module Window
      include Deprecated

      # Checks whether the body has the given text in it.
      #
      # @param [String] str Text to search for.
      # @return [Boolean] true if the body contains the given text,
      #   false otherwise
      def contains_text(str)
        text.index(str)
      end

      # Find elements that match the given XPath.
      #
      # @param [String] value The XPath expression to search for.
      # @return [OperaWatir::Collection] A collection of matching
      #   elements.
      def elements_by_xpath(value)
        find_by_xpath(value)
      end

      alias_method :element_by_xpath, :elements_by_xpath

      # Opera specific
      def get_hash
        visual_hash
      end

      deprecated :get_hash, 'browser.visual_hash'

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
operawatir-0.4.1.pre5-jruby lib/operawatir/compat/window.rb
operawatir-0.4.1.pre4-jruby lib/operawatir/compat/window.rb
operawatir-0.4.1.pre3-jruby lib/operawatir/compat/window.rb