Method: Sapphire::WebAbstractions::RubySeleniumWebDriver#GetValue
- Defined in:
- lib/sapphire/Adapters/Selenium/RubySeleniumWebDriver.rb
#GetValue(item, key) ⇒ Object
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/sapphire/Adapters/Selenium/RubySeleniumWebDriver.rb', line 105 def GetValue(item, key) if item.is_a? Array item.each do |sub_item| value = GetValue(sub_item, key) return value if !value.nil? end end if item.is_a? Class and key.nil? return item.new end if item.is_a? Hash return item[key] if item.has_key? key end nil end |