I am still learning the basics .
This might be very simple but I am not getting the required result
although my other friends are able to run it properly. Please help.
This is the code to save images from a webpage from Watir Examples:
require 'watir'
browser = Watir::IE.new
browser.goto('http://twitter.com')
idx = 0
# using the images collection, iterate through all of the images on a
page
browser.images.each do |x|
idx += 1
# apparently the string accepted by the string method will not allow
variable substitution
location = 'd:\file' + idx.to_s + '.jpg'
x.save(location)
end
but the ouput images go to admin\pictures .Whatever destination folder
I give it always goes back to the same folder also the images are
overwritten so at the end of the run I get the last file saved .Also
the name of the file remains blank.jpg no matter what name is try to
give it.
Can anyone please help me out with the possible cause ? The worst part
is that it is running fine on other computers .
Thanks in Advance
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---