Sha256: 891740acae2d380db8bb739b54929953250b0d433dfad3bbe9ff1c38b8321d7d

Contents?: true

Size: 579 Bytes

Versions: 11

Compression:

Stored size: 579 Bytes

Contents

module Watir
  module UserEditable
    #
    # Clear the element, the type in the given value.
    #

    def set(*args)
      assert_exists
      assert_writable

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

    #
    # Append the given value to the text in the text field.
    #

    def append(*args)
      assert_exists
      assert_writable

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

    #
    # Clear the text field.
    #

    def clear
      assert_exists
      @element.clear
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
watir-webdriver-0.6.1 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.6.0 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.5.8 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.5.7 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.5.6 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.5.5 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.5.4 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.5.3 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.5.2 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.5.1 lib/watir-webdriver/user_editable.rb
watir-webdriver-0.5.0 lib/watir-webdriver/user_editable.rb