Using Watir to regression test some changes: I want to 'click' a row in a typical old style web page menu, where the menu is a table of tables. In this particular example, the table cell contains the menu item, and the row, which only consists of the one cell, has an onclick handler. I thought I could
cell = browser.element_by_xpath("//div[@id='Menu']/descendant::td[text()='New!'")
and use the cell to get the parent row, but I get the message
c:/ruby/lib/ruby/1.8/rexml/parsers/xpathparser.rb:330:in 'Predicate': undefined method `[]' for nil:NilClass (NoMethodError)
which makes no sense to me.