The sample is a bit off... try

# same as before.
add_url = ie.frame( 'side' ).button( :name, "add" ).html.scan( /main.location='(.*)';top.side/ )


# here's where you're getting confused.  scan returns an array of all matches. ( in this case it's one thing, but scan doesn't care )... So, either

# so either flatten the array into a single string
add_url.to_s!

# or

# or create a new array after cleaning each of the scan results.
add_url2 = add_url.map { |curr| curr.gsub "&", "&" }

# at that point add_url2 will still be an array. but, each element of the array has now had the & sets removed.

# still need to either access by ordinal
add_url2[0]

# or flatten the array into a single string.
add_url2.to_s!

hope that helps..

j.

--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"

Jeff Wood
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to