Sha256: c7796f1d5431f0dacb8ff1553b405f889b346007985e6248e47b6ba44db35a7c

Contents?: true

Size: 380 Bytes

Versions: 9

Compression:

Stored size: 380 Bytes

Contents

module PageObject
  module Platforms
    module SeleniumWebDriver
      module Button
        #
        # Override PageObject::PLatforms::SeleniumElement#text
        # to get #text from buttons and #attribute('value') from inputs
        #
        def text
          element.tag_name == 'button' ? element.text : element.attribute('value')
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
page-object-2.0.0 lib/page-object/platforms/selenium_webdriver/button.rb
page-object-1.2.2 lib/page-object/platforms/selenium_webdriver/button.rb
page-object-1.2.1 lib/page-object/platforms/selenium_webdriver/button.rb
page-object-1.2.0 lib/page-object/platforms/selenium_webdriver/button.rb
page-object-1.1.1 lib/page-object/platforms/selenium_webdriver/button.rb
page_object-1.1.3 lib/page-object/platforms/selenium_webdriver/button.rb
page_object-1.1.2 lib/page-object/platforms/selenium_webdriver/button.rb
page_object-1.1.1 lib/page-object/platforms/selenium_webdriver/button.rb
page-object-1.1.0 lib/page-object/platforms/selenium_webdriver/button.rb