# File lib/scrubyt/utils/xpathutils.rb, line 108 def self.traverse_up_until_name(node, name) while node.class != Hpricot::Doc do #raise "The element is nil! This probably means the widget with the specified name ('#{name}') does not exist" unless node return nil unless node break if node.name == name node = node.parent end node end