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.
Be0fb99c879ff825b22ea5bce32176de?d=identicon&s=25 Sita Rami Reddy (Guest)
on 2008-11-11 22: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.

82e77f7a6442a9749eae2476b25c4310?d=identicon&s=25 Srini PS (srini)
on 2008-11-12 05:19
(Received via mailing list)
for colors do you applied any css?
if so, u can take through class name.
Be0fb99c879ff825b22ea5bce32176de?d=identicon&s=25 Sita Rami Reddy (Guest)
on 2008-11-12 07: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 Rao
This topic is locked and can not be replied to.