Sha256: dcf36cfc4fdd90c0e14826ac9166d926a049b96783c6d5589b0947de14978528
Contents?: true
Size: 717 Bytes
Versions: 5
Compression:
Stored size: 717 Bytes
Contents
module PageObject module Elements class Form < Element def initialize(element, platform) @element = element include_platform_for platform end protected def include_platform_for platform super if platform[:platform] == :watir require 'page-object/platforms/watir/form' self.class.send :include, PageObject::Platforms::Watir::Form elsif platform[:platform] == :selenium require 'page-object/platforms/selenium/form' self.class.send :include, PageObject::Platforms::Selenium::Form else raise ArgumentError, "expect platform to be :watir or :selenium" end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems