class PageObject::Platforms::SeleniumWebDriver::SurrogateSeleniumElement
Attributes
identifier[RW]
other[RW]
platform[RW]
tag[RW]
type[RW]
Public Instance Methods
displayed?()
click to toggle source
# File lib/page-object/platforms/selenium_webdriver/surrogate_selenium_element.rb, line 22 def displayed? attempt_to_find_element unless @element @element ? @element.element.displayed? : false end
exists?()
click to toggle source
# File lib/page-object/platforms/selenium_webdriver/surrogate_selenium_element.rb, line 7 def exists? attempt_to_find_element unless @element @element ? (not @element.element.nil?) : false end
method_missing(meth, *args)
click to toggle source
# File lib/page-object/platforms/selenium_webdriver/surrogate_selenium_element.rb, line 27 def method_missing(meth, *args) return @element.send(meth, *args) if @element $stderr.puts "You are calling #{meth} on an element that does not yet exist." raise Selenium::WebDriver::Error::NoSuchElementError end
nil?()
click to toggle source
# File lib/page-object/platforms/selenium_webdriver/surrogate_selenium_element.rb, line 17 def nil? attempt_to_find_element unless @element @element ? @element.element.nil? : true end
visible?()
click to toggle source
# File lib/page-object/platforms/selenium_webdriver/surrogate_selenium_element.rb, line 12 def visible? attempt_to_find_element unless @element @element ? @element.element.displayed? : false end
Private Instance Methods
attempt_to_find_element()
click to toggle source
# File lib/page-object/platforms/selenium_webdriver/surrogate_selenium_element.rb, line 35 def attempt_to_find_element @element = platform.send(:find_selenium_element, identifier, type, tag, other) unless @element @element = nil if @element.element.instance_of?(::PageObject::Platforms::SeleniumWebDriver::SurrogateSeleniumElement) end