Sha256: d196d5be496dcd785e90dfb9489595aee6e4fc885847f2f40ec7c82e28976524

Contents?: true

Size: 1.43 KB

Versions: 3

Compression:

Stored size: 1.43 KB

Contents

module Capybara
  module Driver
    class Node
      attr_reader :driver, :native

      def initialize(driver, native)
        @driver = driver
        @native = native
      end

      def text
        raise NotImplementedError
      end

      def [](name)
        raise NotImplementedError
      end

      def value
        raise NotImplementedError
      end

      # @param value String or Array. Array is only allowed if node has 'multiple' attribute
      def set(value)
        raise NotImplementedError
      end

      def select_option
        raise NotImplementedError
      end

      def unselect_option
        raise NotImplementedError
      end

      def click
        raise NotImplementedError
      end

      def drag_to(element)
        raise NotImplementedError
      end

      def tag_name
        raise NotImplementedError
      end

      def visible?
        raise NotImplementedError
      end

      def checked?
        raise NotImplementedError
      end

      def selected?
        raise NotImplementedError
      end

      def path
        raise NotSupportedByDriverError
      end
      
      def trigger(event)
        raise NotSupportedByDriverError
      end

      def inspect
        %(#<#{self.class} tag="#{tag_name}" path="#{path}">)
      rescue NotSupportedByDriverError
        %(#<#{self.class} tag="#{tag_name}">)
      end

      def ==(other)
        raise NotSupportedByDriverError
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
capybara-2.0.3 lib/capybara/driver/node.rb
capybara-2.0.2 lib/capybara/driver/node.rb
capybara-2.0.1 lib/capybara/driver/node.rb