Class: PageObject::Platforms::SeleniumWebDriver::SurrogateSeleniumElement
- Inherits:
-
Object
- Object
- PageObject::Platforms::SeleniumWebDriver::SurrogateSeleniumElement
- Defined in:
- lib/page-object/platforms/selenium_webdriver/surrogate_selenium_element.rb
Instance Attribute Summary collapse
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#other ⇒ Object
Returns the value of attribute other.
-
#platform ⇒ Object
Returns the value of attribute platform.
-
#tag ⇒ Object
Returns the value of attribute tag.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #displayed? ⇒ Boolean
- #exists? ⇒ Boolean
- #method_missing(meth, *args) ⇒ Object
- #nil? ⇒ Boolean
- #visible? ⇒ Boolean
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args) ⇒ Object
27 28 29 30 31 |
# 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 |
Instance Attribute Details
#identifier ⇒ Object
Returns the value of attribute identifier.
5 6 7 |
# File 'lib/page-object/platforms/selenium_webdriver/surrogate_selenium_element.rb', line 5 def identifier @identifier end |
#other ⇒ Object
Returns the value of attribute other.
5 6 7 |
# File 'lib/page-object/platforms/selenium_webdriver/surrogate_selenium_element.rb', line 5 def other @other end |
#platform ⇒ Object
Returns the value of attribute platform.
5 6 7 |
# File 'lib/page-object/platforms/selenium_webdriver/surrogate_selenium_element.rb', line 5 def platform @platform end |
#tag ⇒ Object
Returns the value of attribute tag.
5 6 7 |
# File 'lib/page-object/platforms/selenium_webdriver/surrogate_selenium_element.rb', line 5 def tag @tag end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/page-object/platforms/selenium_webdriver/surrogate_selenium_element.rb', line 5 def type @type end |
Instance Method Details
#displayed? ⇒ Boolean
22 23 24 25 |
# 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? ⇒ Boolean
7 8 9 10 |
# 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 |
#nil? ⇒ Boolean
17 18 19 20 |
# 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? ⇒ Boolean
12 13 14 15 |
# 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 |