class PageObject::Elements::Image
Public Class Methods
new(element, platform)
click to toggle source
# File lib/page-object/elements/image.rb, line 4 def initialize(element, platform) @element = element include_platform_for platform end
Protected Class Methods
selenium_finders()
click to toggle source
Calls superclass method
PageObject::Elements::Element::selenium_finders
# File lib/page-object/elements/image.rb, line 15 def self.selenium_finders super + [:alt, :src, :css] end
watir_finders()
click to toggle source
Calls superclass method
PageObject::Elements::Element::watir_finders
# File lib/page-object/elements/image.rb, line 11 def self.watir_finders super + [:alt, :src] end
Protected Instance Methods
include_platform_for(platform)
click to toggle source
Calls superclass method
PageObject::Elements::Element#include_platform_for
# File lib/page-object/elements/image.rb, line 19 def include_platform_for platform super if platform[:platform] == :watir_webdriver require 'page-object/platforms/watir_webdriver/image' self.class.send :include, PageObject::Platforms::WatirWebDriver::Image elsif platform[:platform] == :selenium_webdriver require 'page-object/platforms/selenium_webdriver/image' self.class.send :include, PageObject::Platforms::SeleniumWebDriver::Image else raise ArgumentError, "expect platform to be :watir_webdriver or :selenium_webdriver" end end