Sha256: 7caa9794bb14b5d3ac926dde5216d6a4aef432ec1e59d7822baefbd5973607c0
Contents?: true
Size: 958 Bytes
Versions: 1
Compression:
Stored size: 958 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 private def locator_class ButtonLocator end end # Button class ButtonCollection < ElementCollection private def locator_class ButtonLocator end def element_class Button end end # ButtonsCollection end # Watir
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
watir-webdriver-0.9.1 | lib/watir-webdriver/elements/button.rb |