Table of Contents

Class WpfElement

Namespace
Ranorex
Assembly
Ranorex.Plugin.Wpf.dll

Capability of a WPF element.

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

Constructors

WpfElement()

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

protected WpfElement()

WpfElement(Element)

Creates a new WpfElement adapter instance.

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

AutomationId

Identifies the System.Windows.Automation.AutomationProperties.AutomationId attached property

public virtual string AutomationId { get; }

Property Value

string

AutomationProperties_AcceleratorKey

Identifies the System.Windows.Automation.AutomationProperties.AcceleratorKey attached property

public virtual string AutomationProperties_AcceleratorKey { get; }

Property Value

string

AutomationProperties_AccessKey

Identifies the System.Windows.Automation.AutomationProperties.AccessKey attached property

public virtual string AutomationProperties_AccessKey { get; }

Property Value

string

AutomationProperties_HelpText

Identifies the System.Windows.Automation.AutomationProperties.HelpText attached property

public virtual string AutomationProperties_HelpText { get; }

Property Value

string

AutomationProperties_IsColumnHeader

Identifies the System.Windows.Automation.AutomationProperties.IsColumnHeader attached property

public virtual bool AutomationProperties_IsColumnHeader { get; }

Property Value

bool

AutomationProperties_IsRequiredForForm

Identifies the System.Windows.Automation.AutomationProperties.IsRequiredForForm attached property

public virtual bool AutomationProperties_IsRequiredForForm { get; }

Property Value

bool

AutomationProperties_IsRowHeader

The identifier for the System.Windows.Automation.AutomationProperties.IsRowHeader dependency property

public virtual bool AutomationProperties_IsRowHeader { get; }

Property Value

bool

AutomationProperties_ItemStatus

Identifies the System.Windows.Automation.AutomationProperties.ItemStatus attached property

public virtual string AutomationProperties_ItemStatus { get; }

Property Value

string

AutomationProperties_ItemType

The identifier for the System.Windows.Automation.AutomationProperties.ItemType dependency property

public virtual string AutomationProperties_ItemType { get; }

Property Value

string

AutomationProperties_LabeledBy

Identifies the System.Windows.Automation.AutomationProperties.LabeledBy attached property

public virtual object AutomationProperties_LabeledBy { get; }

Property Value

object

AutomationProperties_Name

Identifies the System.Windows.Automation.AutomationProperties.Name attached property

public virtual string AutomationProperties_Name { get; }

Property Value

string

BaseType

FQTN of first known WPF type of DependencyObject instance's base-types

public virtual string BaseType { get; }

Property Value

string

FullType

FQTN of DependencyObject instance

public virtual string FullType { get; }

Property Value

string

Name

Name of the instance

public virtual string Name { get; }

Property Value

string

RequiredCapabilities

Capabilities required by the adapter implementation.

protected override string[] RequiredCapabilities { get; }

Property Value

string[]

Type

Short type-name of DependencyObject instance

public virtual string Type { get; }

Property Value

string

Methods

FromElement(Element)

Converts an Element to an instance of this class.

public static WpfElement FromElement(Element element)

Parameters

element Element

The element to convert.

Returns

WpfElement

The WpfElement.

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

Parameters

path string

The search path.

Returns

WpfElement

The WpfElement.

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

Implicitly converts an Element to an instance of this class.

public static implicit operator WpfElement(Element element)

Parameters

element Element

The element to convert.

Returns

WpfElement

The WpfElement.

Exceptions

ArgumentNullException

If element is null.

CapabilityNotSupportedException

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

implicit operator WpfElement(string)

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

public static implicit operator WpfElement(string path)

Parameters

path string

The search path.

Returns

WpfElement

The WpfElement.

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.