Sha256: a428cc1d512b2359684e97ef41d4f793de150903d9bbc0f865e217d5bd0a07eb

Contents?: true

Size: 691 Bytes

Versions: 10

Compression:

Stored size: 691 Bytes

Contents

module Watir
  module UserEditable

    #
    # Clear the element, the type in the given value.
    #
    # @param [String, Symbol] *args
    #

    def set(*args)
      assert_exists
      assert_writable

      @element.clear
      @element.send_keys(*args)
    end
    alias_method :value=, :set

    #
    # Appends the given value to the text in the text field.
    #
    # @param [String, Symbol] *args
    #

    def append(*args)
      assert_exists
      assert_writable

      @element.send_keys(*args)
    end
    alias_method :<<, :append

    #
    # Clears the text field.
    #

    def clear
      assert_exists
      @element.clear
    end

  end # UserEditable
end # Watir

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
watir-webdriver-0.6.11 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.6.10 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.6.9 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.6.8 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.6.7 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.6.6 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.6.5 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.6.4 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.6.3 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.6.2 lib/watir-webdriver/user_editable.rb