Class ImgTag
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Web.dll
The HTML 'img' tag.
public class ImgTag : WebElement, IAdapter
- Inheritance
-
ImgTag
- Implements
- Inherited Members
Constructors
ImgTag()
Creates a new ImgTag adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected ImgTag()
ImgTag(Element)
Creates a new ImgTag adapter instance.
public ImgTag(Element element)
Parameters
elementElementThe element to create the adapter for.
Exceptions
- NullReferenceException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
Properties
Align
The 'align' attribute of the element.
public virtual string Align { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Alt
The 'alt' attribute of the element.
public virtual string Alt { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Border
The 'border' attribute of the element.
public virtual string Border { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Height
The 'height' attribute of the element.
public virtual string Height { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Hspace
The 'hspace' attribute of the element.
public virtual string Hspace { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Name
The 'name' attribute of the element.
public virtual string Name { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
Src
The 'src' attribute of the element.
public virtual string Src { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Title
The 'title' attribute of the element.
public virtual string Title { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Usemap
The 'usemap' attribute of the element.
public virtual string Usemap { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Vspace
The 'vspace' attribute of the element.
public virtual string Vspace { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Width
The 'width' attribute of the element.
public virtual string Width { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Methods
FromElement(Element)
Converts an Element to an instance of this class.
public static ImgTag FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- ImgTag
The ImgTag.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
FromPath(string)
Converts a string to an instance of this class by searching the root.
public static ImgTag FromPath(string path)
Parameters
pathstringThe search path.
Returns
- ImgTag
The ImgTag.
Remarks
The DefaultSearchTimeout is used to search for the specified path.
Exceptions
- ArgumentNullException
If
pathisnull.- RxPathException
If the specified
pathis not valid.- ElementNotFoundException
If no element is found.
- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
Operators
implicit operator ImgTag(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator ImgTag(Element element)
Parameters
elementElementThe element to convert.
Returns
- ImgTag
The ImgTag.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator ImgTag(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator ImgTag(string path)
Parameters
pathstringThe search path.
Returns
- ImgTag
The ImgTag.
Remarks
The DefaultSearchTimeout is used to search for the specified path.
Exceptions
- ArgumentNullException
If
pathisnull.- RxPathException
If the specified
pathis not valid.- ElementNotFoundException
If no element is found.
- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.