Class LinkTag
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Web.dll
The HTML 'link' tag.
public class LinkTag : WebElement, IAdapter
- Inheritance
-
LinkTag
- Implements
- Inherited Members
Constructors
LinkTag()
Creates a new LinkTag adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected LinkTag()
LinkTag(Element)
Creates a new LinkTag adapter instance.
public LinkTag(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
Charset
The 'charset' attribute of the element.
public virtual string Charset { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Href
The 'href' attribute of the element.
public virtual string Href { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Media
The 'media' attribute of the element.
public virtual string Media { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Rel
The 'rel' attribute of the element.
public virtual string Rel { 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[]
Rev
The 'rev' attribute of the element.
public virtual string Rev { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Sizes
The 'sizes' attribute of the element.
public virtual string Sizes { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Target
The 'target' attribute of the element.
public virtual string Target { 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.
Type
The 'type' attribute of the element.
public virtual string Type { 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 LinkTag FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- LinkTag
The LinkTag.
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 LinkTag FromPath(string path)
Parameters
pathstringThe search path.
Returns
- LinkTag
The LinkTag.
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 LinkTag(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator LinkTag(Element element)
Parameters
elementElementThe element to convert.
Returns
- LinkTag
The LinkTag.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator LinkTag(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator LinkTag(string path)
Parameters
pathstringThe search path.
Returns
- LinkTag
The LinkTag.
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.