Method: Pouch::Elements#element

Defined in:
lib/pouch/elements.rb

#element(tag, name, identifier, *args, &block) ⇒ Object



4
5
6
7
8
9
# File 'lib/pouch/elements.rb', line 4

def element tag, name, identifier, *args, &block
  define_method name do
    return browser.element tag, identifier unless block_given?
    block.call browser.send(:element, tag, identifier), *args
  end
end