Module: Symbiont::Accessor

Defined in:
lib/symbiont/accessor.rb

Instance Method Summary collapse

Instance Method Details

#reference_element(element, locator) ⇒ Object

Parameters:

  • element (Symbol)

    name of Watir-based object

  • locator (Hash)

    locators for referencing the element



5
6
7
8
9
10
11
# File 'lib/symbiont/accessor.rb', line 5

def reference_element(element, locator)
  begin
    browser.send(element, *locator).to_subtype
  rescue NoMethodError
    browser.send(element, *locator)
  end
end