Class FrameTag
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Web.dll
The HTML 'frame' tag.
public class FrameTag : WebElement, IAdapter
- Inheritance
-
FrameTag
- Implements
- Inherited Members
Constructors
FrameTag()
Creates a new FrameTag adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected FrameTag()
FrameTag(Element)
Creates a new FrameTag adapter instance.
public FrameTag(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
Frameborder
The 'frameborder' attribute of the element.
public virtual string Frameborder { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Longdesc
The 'longdesc' attribute of the element.
public virtual string Longdesc { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Name
The 'name' attribute of the element.
public virtual string Name { 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[]
Scrolling
The 'scrolling' attribute of the element.
public virtual string Scrolling { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
Src
The 'src' attribute of the element.
public virtual string Src { 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.
Methods
ExecuteScript(string)
Executes javascript code inside the iframe content web document.
public virtual string ExecuteScript(string code)
Parameters
codestringThe 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 FrameTag FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- FrameTag
The FrameTag.
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 FrameTag FromPath(string path)
Parameters
pathstringThe search path.
Returns
- FrameTag
The FrameTag.
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.
GetDocHtml()
Retrieves the HTML source text of the frame web document.
public virtual string GetDocHtml()
Returns
- string
The HTML source text.
Exceptions
- ActionFailedException
Thrown if invoking the action failed.
Operators
implicit operator FrameTag(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator FrameTag(Element element)
Parameters
elementElementThe element to convert.
Returns
- FrameTag
The FrameTag.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator FrameTag(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator FrameTag(string path)
Parameters
pathstringThe search path.
Returns
- FrameTag
The FrameTag.
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.