Module: Tg4rbToolbox

Defined in:
lib/tg4rb_toolbox.rb

Instance Method Summary collapse

Instance Method Details

#element(xpath) ⇒ Object

Returns the element referred to by xpath



7
8
9
10
11
# File 'lib/tg4rb_toolbox.rb', line 7

def element(xpath)
  puts "### Original xpath: #{xpath}"
  xpath = fix_link_text_xpath(Hpricot(@ff.html),xpath) if xpath.include? 'CDATA'
  element_by_least_restrictive_xpath(xpath)
end