This is the main method for accessing images - normally an <img src="image.gif"> HTML tag.
* how - symbol - how we access the image, :index, :id, :name, :src, :title or :alt are supported * what - string, integer or regular expression - what we are looking for,
Valid values for 'how' are listed in the Watir Wiki - wiki.openqa.org/display/WTR/Methods+supported+by+Element
returns an Image object
Typical Usage
ie.image(:src, /myPic/) # access the first image that matches myPic. We can use a string in place of the regular expression
# but the complete path must be used, ie.image(:src, 'http://myserver.com/my_path/my_image.jpg')
ie.image(:index,2) # access the second image on the page
ie.image(:alt, "A Picture") # access an image using the alt text
ie.image(:xpath, "//img[@alt='A Picture']/") # access an image using the alt text