From: Mark Thomas Date: 2009-07-24T10:50:08+09:00 Subject: Re: Firebug (?) displays Ruby code to get/set HTML element On Jul 23, 7:26 pm, Jack Bamford wrote: > Fabian Streitel wrote: > > huh? since when does firebug use ruby? > > Greetz > > It's a Firefox/Firebug EXTENSION, not a native function. > > Here's how it worked: > You browsed to a website of interest, then selected a field on the page. > The extension I am looking for would display, in a separate window, the > Ruby (or optionally Python) expression needed to access that field That's neat, but it's not hard to put a doc.at( ) around an XPath (Nokogiri syntax) that you get from Firebug or another tool. Note, however, that you will get superior results crafting the XPath yourself rather than blindly taking output from DOM-based tools. See http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/7a7b347d46410467/2317d10bf6c4c1e3?hl=en#2317d10bf6c4c1e3 for a discussion.