Sha256: 5e6f0174fb5fdc771165e8a1b8bd9f64bad36f79392180e9d2da80169926bf44
Contents?: true
Size: 1006 Bytes
Versions: 13
Compression:
Stored size: 1006 Bytes
Contents
module PageObject module Elements class Button < Element def initialize(element, platform) @element = element include_platform_for platform end protected def self.watir_finders super + [:text, :value, :src, :alt, :css] end def self.selenium_finders super + [:value, :src, :alt, :css] end def include_platform_for platform super if platform[:platform] == :selenium_webdriver require 'page-object/platforms/selenium_webdriver/button' self.class.send :include, PageObject::Platforms::SeleniumWebDriver::Button end end end ::PageObject::Elements.type_to_class[:submit] = ::PageObject::Elements::Button ::PageObject::Elements.type_to_class[:image] = ::PageObject::Elements::Button ::PageObject::Elements.type_to_class[:button] = ::PageObject::Elements::Button ::PageObject::Elements.type_to_class[:reset] = ::PageObject::Elements::Button end end
Version data entries
13 entries across 13 versions & 1 rubygems