From: James Britt Date: 2005-06-17T00:26:52+09:00 Subject: Re: Watir, XML, Espen Falkevik wrote: > ... > # open another browser and get's the xml-file > ie2 = > Watir::IE.start("http://10.47.11.217/getxml?location=/Configuration/Audio/Outputs/Headset/Level") > doc = ie2.document() What sort of object are you expecting ie2.document() to return? The call to XPath.first expects a REXML Document object; the WATIR docs really don't say much on this (it only says that document() returns the current document. ) But grepping the WATIR source code does not show any references to REXML, so it appears you'll need to first convert the IE document or content to a REXML Document object. Calling ie2.html gets you the DOM rendering of the document HTML; it's *not* the same as the HTML sent to the browser. If it is not already XML (and imagine it is not) you'll need to fix it up. Take a look at Michael Neumann's Mechanize library for some ways to do this. His code fetches HTML pages and exposes the content via a nice API over an REXML document. http://rubyforge.org/projects/wee James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys