Forum: Ruby how to collect all the href links in a single page to a log file

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Sita Rami R. (Guest)
on 2008-11-11 23:39
(Received via mailing list)
I have a web which consists of multiple links with different colors. I
to collect a set of links with same color and move them to a notepad
file(log file)..

Please give Ruby code which works in Watir.

Srini P. (Guest)
on 2008-11-12 06:19
(Received via mailing list)
for colors do you applied any css?
if so, u can take through class name.
Sita Rami R. (Guest)
on 2008-11-12 08:08
(Received via mailing list)
My actual problem is as follows:

·         Navigate to Google in a new IE instance
·         Search for the following word "Gap, Inc."
·         Iterate thought the first 10 pages of google
·         On each page collect the following
·         The "blue" page title
·         The "green" url
·         Output all the data into a file named "test_output.txt"
·         Format "Title – URL

Can you help me in this....


On Tue, Nov 11, 2008 at 8:16 PM, Srinivasa R.
This topic is locked and can not be replied to.