Table of Contents

Class IFrameTag

Namespace
Ranorex
Assembly
Ranorex.Plugin.Web.dll

The HTML 'iframe' tag.

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

Constructors

IFrameTag()

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

protected IFrameTag()

IFrameTag(Element)

Creates a new IFrameTag adapter instance.

public IFrameTag(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

Align

The 'align' attribute of the element.

public virtual string Align { get; set; }

Property Value

string

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

Frameborder

The 'frameborder' attribute of the element.

public virtual string Frameborder { get; set; }

Property Value

string

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

Height

The 'height' attribute of the element.

public virtual string Height { get; set; }

Property Value

string

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

Marginheight

The 'marginheight' attribute of the element.

public virtual string Marginheight { get; set; }

Property Value

string

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

Marginwidth

The 'marginwidth' attribute of the element.

public virtual string Marginwidth { get; set; }

Property Value

string

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

Name

The 'name' attribute of the element.

public virtual string Name { 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[]

SandBox

The 'sandbox' attribute of the element.

public virtual string SandBox { get; set; }

Property Value

string

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

Scrolling

The 'scrolling' attribute of the element.

public virtual string Scrolling { get; set; }

Property Value

string

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

Seamless

The 'seamless' attribute of the element.

public virtual string Seamless { get; set; }

Property Value

string

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

Src

The 'src' attribute of the element.

public virtual string Src { get; set; }

Property Value

string

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

SrcDoc

The 'srcdoc' attribute of the element.

public virtual string SrcDoc { 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.

Width

The 'width' attribute of the element.

public virtual string Width { get; set; }

Property Value

string

Exceptions

SetAttributeFailedException

Thrown if setting the attribute value failed.

Methods

ExecuteScript(string)

Executes javascript code inside the iframe content web document.

public virtual string ExecuteScript(string code)

Parameters

code string

The javascript code chunk.

Returns

string

The JS return statement expression result.

Exceptions

ActionFailedException

Thrown if invoking the action failed.

FromElement(Element)

Converts an Element to an instance of this class.

public static IFrameTag FromElement(Element element)

Parameters

element Element

The element to convert.

Returns

IFrameTag

The IFrameTag.

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

Parameters

path string

The search path.

Returns

IFrameTag

The IFrameTag.

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.

GetDocHtml()

Retrieves the HTML source text of the iframe content web document.

public virtual string GetDocHtml()

Returns

string

The HTML source text.

Exceptions

ActionFailedException

Thrown if invoking the action failed.

Operators

implicit operator IFrameTag(Element)

Implicitly converts an Element to an instance of this class.

public static implicit operator IFrameTag(Element element)

Parameters

element Element

The element to convert.

Returns

IFrameTag

The IFrameTag.

Exceptions

ArgumentNullException

If element is null.

CapabilityNotSupportedException

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

implicit operator IFrameTag(string)

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

public static implicit operator IFrameTag(string path)

Parameters

path string

The search path.

Returns

IFrameTag

The IFrameTag.

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.