Sha256: 011d191197d4c1afd9a8e39518dd950bbfa727f0a0c75ebf97a5489b70efa51b
Contents?: true
Size: 752 Bytes
Versions: 1
Compression:
Stored size: 752 Bytes
Contents
module Watir # # Class representing button elements. # # This class covers both <button> and <input type="submit|reset|image|button" /> elements. # class Button < HTMLElement inherit_attributes_from Watir::Input VALID_TYPES = %w[button reset submit image] # # Returns the text of the button. # # For input elements, returns the "value" attribute. # For button elements, returns the inner text. # # @return [String] # def text tn = tag_name case tn when 'input' value when 'button' super else raise Exception::Error, "unknown tag name for button: #{tn}" end end end # Button end # Watir
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
watir-6.10.1 | lib/watir/elements/button.rb |