Class: Watir::Buttons

Inherits:
ElementCollections show all
Defined in:
lib/watir/collections.rb

Overview

this class accesses the buttons in the document as a collection it would normally only be accessed by the Watir::Container#buttons method

Instance Method Summary collapse

Methods inherited from ElementCollections

#[], #each, #first, #get_length_of_input_objects, #initialize, #inspect, #last, #show, #to_s

Constructor Details

This class inherits a constructor from Watir::ElementCollections

Instance Method Details

#element_classObject



70
# File 'lib/watir/collections.rb', line 70

def element_class; Button; end

#lengthObject

number of buttons

browser.buttons.length


73
74
75
# File 'lib/watir/collections.rb', line 73

def length
  get_length_of_input_objects(["button", "submit", "image"])
end