Image Class
Image object
Inheritance Hierarchy
SystemObject
  SeleniumImage

Namespace: Selenium
Assembly: Selenium (in Selenium.dll) Version: 2.0.9.0 (2.0.9.0)
Syntax
VB Usage
Dim instance As Image

The Image type exposes the following members.

Constructors
  NameDescription
Public methodImage(Bitmap)
Creates an image object from a bitmap
Public methodImage(MemoryStream)
Creates an image object from bytes.
Top
Methods
  NameDescription
Public methodCompareTo
Compare to the provided image
Public methodCopy
Copy the image to the Clipboard.
Public methodDispose
Empty the image ans release all the ressources.
Public methodEquals
Return true if images are the same.
(Overrides ObjectEquals(Object).)
Public methodGetBitmap
Returns the underlying Bitmap
Public methodGetHashCode
Returns the hash code
(Overrides ObjectGetHashCode.)
Public methodLoad
Load an image file
Public methodResize
Resizes the current image
Public methodSaveAs
Save the image to a file. Supported format: png, bmp, gif and jpg.
Public methodToExcel
Insert the image in an Excel sheet.
Public methodToString
Returns object description
(Overrides ObjectToString.)
Top
Operators
Properties
  NameDescription
Public propertyCRC
Returns the image CRC32 hash in hexadecimal.
Public propertyDiffCount
Number of non matching pixels resulted from a comparison.
Public propertyHeight
Image height.
Public propertyWidth
Image width.
Top
Examples
Take a screenshot and save it in a file on the desktop :
driver.TakeScreenShoot().SaveAs "%USERPROFILE%\Desktop\capture_{yyyyMMdd-HHmmss}.png"
See Also