Class StyleTag
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Web.dll
The HTML 'style' tag.
public class StyleTag : WebElement, IAdapter
- Inheritance
-
StyleTag
- Implements
- Inherited Members
Constructors
StyleTag()
Creates a new StyleTag adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected StyleTag()
StyleTag(Element)
Creates a new StyleTag adapter instance.
public StyleTag(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
Media
The 'media' attribute of the element.
public virtual string Media { 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[]
Scoped
The 'scoped' attribute of the element.
public virtual string Scoped { 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 StyleTag FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- StyleTag
The StyleTag.
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 StyleTag FromPath(string path)
Parameters
pathstringThe search path.
Returns
- StyleTag
The StyleTag.
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 StyleTag(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator StyleTag(Element element)
Parameters
elementElementThe element to convert.
Returns
- StyleTag
The StyleTag.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator StyleTag(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator StyleTag(string path)
Parameters
pathstringThe search path.
Returns
- StyleTag
The StyleTag.
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.