Method: Webdrone::Form#with_xpath

Defined in:
lib/webdrone/form.rb

#with_xpath(xpath = nil, &block) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/webdrone/form.rb', line 19

def with_xpath(xpath = nil, &block)
  old_xpath, @xpath = @xpath, xpath
  instance_eval(&block)
rescue StandardError => error
  Webdrone.report_error(@a0, error)
ensure
  @xpath = old_xpath
end