Method: Selenium::WebDriver::Driver#text
- Defined in:
- lib/oats/oats_selenium_api.rb
#text(locators) ⇒ Object
Returns nil, text, or array of texts found at locator(s)
303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/oats/oats_selenium_api.rb', line 303 def text(locators) # txt = if webdriver? texts = elements(locators).collect{|el| el.text} txt = case texts.size when 0 then nil when 1 then texts[0] else texts end # else # text_orig(locators) # end oats_debug "text(s) at #{locators}: #{txt.inspect}" txt end |