Table of Contents

Class SourceTag

Namespace
Ranorex
Assembly
Ranorex.Plugin.Web.dll

The HTML5 'source' tag.

public class SourceTag : WebElement, IAdapter
Inheritance
SourceTag
Implements
Inherited Members

Constructors

SourceTag()

Creates a new SourceTag adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!

protected SourceTag()

SourceTag(Element)

Creates a new SourceTag adapter instance.

public SourceTag(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[]

Sizes

The 'sizes' attribute of the element.

public virtual string Sizes { get; set; }

Property Value

string

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

Source

The 'source' attribute of the element.

public virtual string Source { get; set; }

Property Value

string

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

SrcSet

The 'srcset' attribute of the element.

public virtual string SrcSet { 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 SourceTag FromElement(Element element)

Parameters

element Element

The element to convert.

Returns

SourceTag

The SourceTag.

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 SourceTag FromPath(string path)

Parameters

path string

The search path.

Returns

SourceTag

The SourceTag.

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 SourceTag(Element)

Implicitly converts an Element to an instance of this class.

public static implicit operator SourceTag(Element element)

Parameters

element Element

The element to convert.

Returns

SourceTag

The SourceTag.

Exceptions

ArgumentNullException

If element is null.

CapabilityNotSupportedException

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

implicit operator SourceTag(string)

Implicitly converts a string to an instance of this class by searching the root.

public static implicit operator SourceTag(string path)

Parameters

path string

The search path.

Returns

SourceTag

The SourceTag.

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.