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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community 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
want
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.

Thanks,
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....

Thanks,
Sita


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