Is there any way through which i can save an indivisual image on my
local drive.
Below is the Script which does not work for me:

require 'watir'
require 'watir/windowhelper'
$ie = Watir::IE.new
$ie.goto('http://irctc.co.in')
$ie.image(:src, "http://www.irctc.co.in/images/newbanner/
hotel_banner.jpg").save("C:\\images")

I get the following Error message:
>ruby download_single_image.rb
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_exists': Unable to locate element, using :src, "http://
www.irctc.co.in/images/newbanner/hotel_banner.jpg"
(Watir::Exception::UnknownObjectException)
        from (eval):2:in `src'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/image.rb:
113:in `save'
        from download_single_image.rb:18
>Exit code: 1


Thanks in Advance.
Regards,
aamittt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to