From: Phlip Date: 2008-08-13T12:42:26+09:00 Subject: Re: Hpricot and xpath chen li wrote: > I follow your suggestion and change to '.header' or ".header" instead of "#header" and and it works. Ruby returns the tag's path like this: /tag1/tag2/div. But I see nowhere in the document about using "." and "#" in xpath() or css_path(). Do I miss something in the docucment? That's just the thing. I studied the crap out of HTML, XHTML, and light CSS, and never learned until encountering assert_select that CSS has its own query notation. Others with different career paths have learned nothing but - and they all assume you know the same things. Hpricot can handle _light_ XPath, and can handle various CSS Selector notations. The documenters have all assumed that someone else taught you how they work. So google for "CSS Selector", without x-ref'ing Hpricot! -- Phlip