Method: Magnesium::Span.dealspan

Defined in:
lib/magnesium/elements/span.rb

.dealspan(browser, locate, value) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/magnesium/elements/span.rb', line 14

def self.dealspan(browser,locate,value)
  begin
    if locate == 'id'
      return browser.span(:id => value.to_s)
    elsif locate == 'name'
      return browser.span(:name => value.to_s)
    elsif locate == 'index'
      return browser.span(:index => value.to_i)
    else
      puts 'M: I need time to grow up.'
    end
  rescue
#        error
    puts '...'
    #ensure
  end
end