Class MobileWebDocument
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Mobile.dll
Capability representing a web document displayed within a web view.
public class MobileWebDocument : Adapter, IAdapter
- Inheritance
-
MobileWebDocument
- Implements
- Inherited Members
Constructors
MobileWebDocument()
Creates a new MobileWebDocument adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected MobileWebDocument()
MobileWebDocument(Element)
Creates a new MobileWebDocument adapter instance.
public MobileWebDocument(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
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
Scale
Zoom level of the WebView. Value of 1.0 corresponds to 100%.
public virtual double Scale { get; }
Property Value
ScrollX
The X-coordinate at which the origin of the content view is offset from the origin of the scroll view.
public virtual int ScrollX { get; set; }
Property Value
Exceptions
- SetAttributeFailedException
Thrown if setting the attribute value failed.
ScrollY
The Y-coordinate at which the origin of the content view is offset from the origin of the scroll view.
public virtual int ScrollY { 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 MobileWebDocument FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- MobileWebDocument
The MobileWebDocument.
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 MobileWebDocument FromPath(string path)
Parameters
pathstringThe search path.
Returns
- MobileWebDocument
The MobileWebDocument.
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 MobileWebDocument(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator MobileWebDocument(Element element)
Parameters
elementElementThe element to convert.
Returns
- MobileWebDocument
The MobileWebDocument.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator MobileWebDocument(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator MobileWebDocument(string path)
Parameters
pathstringThe search path.
Returns
- MobileWebDocument
The MobileWebDocument.
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.