Hi there, I'm trying to scrape information from a page using Watir and
ran into an issue that I need help with.

The page has nested lists, like this:
----
* Foo
  1. abc
  2. def
  3. ghi
* Bar
  1. xyz
  2. tuv
  3. lmn
* Baz
  1. pqr
  2. jkl
  3. mno
----

What I'd like to do is retrieve/scrape the list contents separately.

Currently, when I try to check content using something like:
> browser.ul(how, what).lis.each {|x| p x.text}

I get output like:
----
"Foo \r\nabc def ghi"
"abc"
"def"
"ghi"
"Bar \r\nxyz tuv lmn"
"xyz"
"tuv"
"lmn"
"Baz \r\npqr jkl mno"
"pqr"
"jkl"
"mno"
----

This is not what I want.  I'd like the query to return: "Foo", "Bar",
"Baz"
That way, I can then query each list item and pull out the (ordered)
sub-lists by name.

Thoughts or suggestions?

TIA.

Paul.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to