Sha256: 304cd73f0441b8b65de1877f9668915eae88185ec5393b7dbd2341d9c26b48bd
Contents?: true
Size: 743 Bytes
Versions: 6
Compression:
Stored size: 743 Bytes
Contents
module PageObject module Elements class Image < 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_image' self.class.send :include, PageObject::Platforms::WatirImage elsif platform[:platform] == :selenium require 'page-object/platforms/selenium_image' self.class.send :include, PageObject::Platforms::SeleniumImage else raise ArgumentError, "expect platform to be :watir or :selenium" end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems