Table of Contents

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

element Element

The element to create the adapter for.

Exceptions

NullReferenceException

If element is null.

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

string

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

string

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

Title

The 'title' attribute of the element.

public virtual string Title { get; set; }

Property Value

string

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

Type

The 'type' attribute of the element.

public virtual string Type { get; set; }

Property Value

string

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

element Element

The element to convert.

Returns

StyleTag

The StyleTag.

Exceptions

ArgumentNullException

If element is null.

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

path string

The search path.

Returns

StyleTag

The StyleTag.

Remarks

The DefaultSearchTimeout is used to search for the specified path.

Exceptions

ArgumentNullException

If path is null.

RxPathException

If the specified path is 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

element Element

The element to convert.

Returns

StyleTag

The StyleTag.

Exceptions

ArgumentNullException

If element is null.

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

path string

The search path.

Returns

StyleTag

The StyleTag.

Remarks

The DefaultSearchTimeout is used to search for the specified path.

Exceptions

ArgumentNullException

If path is null.

RxPathException

If the specified path is not valid.

ElementNotFoundException

If no element is found.

CapabilityNotSupportedException

If the element does not support the capabilities required by this adapter.