tags:

views:

241

answers:

0

Is there a way to get an image extension (based on the content-type header) and it's body in Watir?

Here is an example

require 'watir'

zz = Watir::IE.new
zz.goto('http://flickr.com')
image = zz.image(:src => %r/l.yimg.com\/g\/images\//)
puts image

I need to get extension and the contents (base64encoded or just location of a temp file) of the latter image