I'd use a simple ie-do loop:
ie = Watir::IE.new
ie.set_fast_speed
ie.goto "www.google.com"
ie.set_fast_speed
ie.goto "www.google.com"
ie.images.each do
|image|
images = {'path' => image.src}
images.each do | ite, image |
puts "#{ite}:#{image}"
end
end
images = {'path' => image.src}
images.each do | ite, image |
puts "#{ite}:#{image}"
end
end
This should output:
Put a
little "def Check_images" and add another "end" afterwards, and there's your
function.
Thanks,
Adam
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of sikander
Sent: Saturday, November 04, 2006 12:00 AM
To: [email protected]
Subject: [Wtr-general] Is there any way to get all the scr's of images?
Hi
All!
Is there any way to
get all buttons, text boxes, images etc., of a page to
display?
For Example i want
to see all id's or :src's of images of a web page.
In that case i may
write similar to following code to display all the images of the current page
one by one
check_Images=$ie.image(:src,
/*.jpg/)
pust check_Images.
Please help me in this
regard.
Regards,
Sikander
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
