Class Watir::Image
In: lib/watir/image.rb
Parent: Element

This class is the means of accessing an image on a page. Normally a user would not need to create this object as it is returned by the Watir::Container#image method

many of the methods available to this object are inherited from the Element class

Methods

file_created_date   file_size   height   loaded?   locate   new   save   to_s   width  

Public Class methods

Public Instance methods

this method returns the file created date of the image

this method returns the filesize of the image

returns the height in pixels of the image, as a string

This method attempts to find out if the image was actually loaded by the web browser. If the image was not loaded, the browser is unable to determine some of the properties. We look for these missing properties to see if the image is really there or not. If the Disk cache is full (tools menu -> Internet options -> Temporary Internet Files), it may produce incorrect responses.

This method saves the image to the file path that is given. The path must be in windows format (c:\dirname\somename.gif). This method will not overwrite a previously existing image. If an image already exists at the given path then a dialog will be displayed prompting for overwrite. Raises a WatirException if AutoIt is not correctly installed path - directory path and file name of where image should be saved

returns a string representation of the object

returns the width in pixels of the image, as a string

[Validate]