class SpecTest::WebObjects::Link

Public Class Methods

new(web_object, platform) click to toggle source
# File lib/spectest/web_objects/link.rb, line 5
def initialize(web_object, platform)
  @web_object = web_object
  mixin_web_objects_for platform
end

Protected Class Methods

locators_for_selenium() click to toggle source
# File lib/spectest/web_objects/link.rb, line 20
def self.locators_for_selenium
  super + [:link, :link_text]
end
locators_for_watir() click to toggle source
# File lib/spectest/web_objects/link.rb, line 12
def self.locators_for_watir
  super + [:href, :text]
end
mappings_for_selenium() click to toggle source
# File lib/spectest/web_objects/link.rb, line 24
def self.mappings_for_selenium
  super.merge(:text => :link_text)
end
mappings_for_watir() click to toggle source
# File lib/spectest/web_objects/link.rb, line 16
def self.mappings_for_watir
  super.merge({:link => :text, :link_text => :text})
end

Protected Instance Methods

mixin_web_objects_for(platform) click to toggle source
# File lib/spectest/web_objects/link.rb, line 28
def mixin_web_objects_for(platform)
  super
  if platform[:platform] == :selenium_webdriver
    require "spectest/platform_selenium/web_objects/link"
    self.class.send :include, SpecTest::Platforms::SeleniumWebDriver::Link
  end
end