Sha256: a7fd1a1c7d7b8bdc7b3ffae58c8067dbe1c91ebe27467ac8936f7bb721f49a7d

Contents?: true

Size: 686 Bytes

Versions: 7

Compression:

Stored size: 686 Bytes

Contents

module OperaWatir
  module Compat
    module Window

      # 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

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
operawatir-0.4.1.pre2-jruby lib/operawatir/compat/window.rb
operawatir-0.4.1.pre1-jruby lib/operawatir/compat/window.rb
operawatir-0.4-jruby lib/operawatir/compat/window.rb
operawatir-0.3.7.pre2-jruby lib/operawatir/compat/window.rb
operawatir-0.3.7.pre1-jruby lib/operawatir/compat/window.rb
operawatir-0.3.2-jruby lib/operawatir/compat/window.rb
operawatir-0.3-jruby lib/operawatir/compat/window.rb