Table of Contents

Class RawText

Namespace
Ranorex
Assembly
Ranorex.Plugin.RawText.dll

Raw text drawn by the GDI API.

public class RawText : Adapter, IAdapter
Inheritance
RawText
Implements
Inherited Members

Constructors

RawText()

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

protected RawText()

RawText(Element)

Creates a new RawText adapter instance.

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

Column

The inferred text column.

public virtual int Column { get; }

Property Value

int

FontName

The font name.

public virtual string FontName { get; }

Property Value

string

FontSize

The font size in logical units.

public virtual int FontSize { get; }

Property Value

int

FontStyle

The font style.

public virtual string FontStyle { get; }

Property Value

string

Origin

The origin of the captured text.

public virtual string Origin { get; }

Property Value

string

RawTextValue

The captured raw text.

[OriginalDisplayName("RawText")]
public virtual string RawTextValue { get; }

Property Value

string

RequiredCapabilities

Capabilities required by the adapter implementation.

protected override string[] RequiredCapabilities { get; }

Property Value

string[]

Row

The inferred text row.

public virtual int Row { get; }

Property Value

int

TextColor

The text foreground color.

public virtual string TextColor { get; }

Property Value

string

Methods

CaptureString(Element)

Tries to capture the raw text string content from the specified element.

public static string CaptureString(Element element)

Parameters

element Element

The element to capture the text from. The element must have the nativewindow capability.

Returns

string

The captured text string or null if the element does not support the nativewindow capability.

Exceptions

ArgumentNullException

If element is a null reference.

RanorexException

If capturing the raw text fails, e.g. due to security restrictions.

FromElement(Element)

Converts an Element to an instance of this class.

public static RawText FromElement(Element element)

Parameters

element Element

The element to convert.

Returns

RawText

The RawText.

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

Parameters

path string

The search path.

Returns

RawText

The RawText.

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

Implicitly converts an Element to an instance of this class.

public static implicit operator RawText(Element element)

Parameters

element Element

The element to convert.

Returns

RawText

The RawText.

Exceptions

ArgumentNullException

If element is null.

CapabilityNotSupportedException

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

implicit operator RawText(string)

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

public static implicit operator RawText(string path)

Parameters

path string

The search path.

Returns

RawText

The RawText.

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.