Table of Contents

Class MsaaFlavorElement

Namespace
Ranorex.Plugin
Assembly
Ranorex.Plugin.Msaa.dll
public class MsaaFlavorElement : FlavorElement
Inheritance
MsaaFlavorElement
Derived
Inherited Members

Constructors

MsaaFlavorElement(IAccessible, int, BucketInfo)

public MsaaFlavorElement(IAccessible acc, int childId, BucketInfo bucketInfo)

Parameters

acc IAccessible
childId int
bucketInfo BucketInfo

MsaaFlavorElement(IAccessible, int, BucketInfo, Win32FlavorElement)

public MsaaFlavorElement(IAccessible acc, int childId, BucketInfo bucketInfo, Win32FlavorElement parentWindow)

Parameters

acc IAccessible
childId int
bucketInfo BucketInfo
parentWindow Win32FlavorElement

MsaaFlavorElement(IAccessible, int, BucketInfo, string, Win32FlavorElement)

protected MsaaFlavorElement(IAccessible acc, int childId, BucketInfo bucketInfo, string flavorName, Win32FlavorElement parentWindow)

Parameters

acc IAccessible
childId int
bucketInfo BucketInfo
flavorName string
parentWindow Win32FlavorElement

Properties

Acc

public IAccessible Acc { get; }

Property Value

IAccessible

AccessibleRole

public AccessibleRole AccessibleRole { get; }

Property Value

AccessibleRole

ChildCount

public int ChildCount { get; }

Property Value

int

ChildId

public int ChildId { get; }

Property Value

int

Children

public virtual IList<MsaaFlavorElement> Children { get; }

Property Value

IList<MsaaFlavorElement>

DefaultAction

public string DefaultAction { get; }

Property Value

string

Description

public string Description { get; }

Property Value

string

ElementRectangle

The client or screen rectangle of the flavor element depending on the value returned by IsClientRectangle.

public override Rectangle ElementRectangle { get; }

Property Value

Rectangle

Remarks

To be implemented by the deriving class.

Enabled

True if the element is enabled. If the element cannot be enabled or disabled, return true.

public override bool Enabled { get; }

Property Value

bool

Remarks

To be implemented by the deriving class.

HasFocus

True if the element has the focus.

public override bool HasFocus { get; }

Property Value

bool

Remarks

To be implemented by the deriving class.

Help

public string Help { get; }

Property Value

string

HelpTopic

public string HelpTopic { get; }

Property Value

string

IsClientRectangle

Determines if the ElementRectangle property returns client or screen coordinates.

public override bool IsClientRectangle { get; }

Property Value

bool

Remarks

To be implemented by the deriving class.

KeyboardShortcut

public string KeyboardShortcut { get; }

Property Value

string

Name

public string Name { get; set; }

Property Value

string

Parent

public MsaaFlavorElement Parent { get; }

Property Value

MsaaFlavorElement

State

public AccessibleStates State { get; }

Property Value

AccessibleStates

Valid

True if the flavor element is still valid.

public override bool Valid { get; }

Property Value

bool

Remarks

To be implemented by the deriving class.

Value

public string Value { get; set; }

Property Value

string

Visible

True if the element is visible.

public override bool Visible { get; }

Property Value

bool

Remarks

To be implemented by the deriving class.

WindowHandle

public IntPtr WindowHandle { get; }

Property Value

IntPtr

Methods

AccessibleGetAttributeValue(Element, string, out object)

public bool AccessibleGetAttributeValue(Element element, string name, out object value)

Parameters

element Element
name string
value object

Returns

bool

AccessibleInvokeAction(Element, string, object[], out object)

public bool AccessibleInvokeAction(Element element, string name, object[] args, out object value)

Parameters

element Element
name string
args object[]
value object

Returns

bool

AccessibleSetAttributeValue(Element, string, object)

public bool AccessibleSetAttributeValue(Element element, string name, object value)

Parameters

element Element
name string
value object

Returns

bool

DoDefaultAction()

public void DoDefaultAction()

EnsureVisible()

Ensures that the flavor element is visible.

public override bool EnsureVisible()

Returns

bool

True if the operation was successful.

~MsaaFlavorElement()

protected ~MsaaFlavorElement()

Focus()

Focuses the flavor element, if possible.

public override void Focus()

GetAttributeValue(Element, string)

Needs to be implemented for attribute value read access.

public override object GetAttributeValue(Element element, string name)

Parameters

element Element

The element instance used.

name string

The name of the attribute (lowercased).

Returns

object

The attribute value.

GetChildLineageFromPoint(Point, out FindRefineMode)

Returns a list of flavor elements that is the lineage to the flavor element at the specified screen location.

public override LinkedList<FlavorElement> GetChildLineageFromPoint(Point screenLocation, out FindRefineMode refineMode)

Parameters

screenLocation Point

The screen location to search at.

refineMode FindRefineMode

Can be set to indicate that further searching is required.

Returns

LinkedList<FlavorElement>

The lineage to the flavor element at the specified point as a list.

Remarks

The first element in the returned list is the direct child of this flavor element, the k-th element is the parent of the (k+1)-th element, and the last element is the actual flavor element at the specified screen location. Consequently, an empty list is to be returned if this element is the best fitting element at the requested point.

Returns null if the specified screenLocation is not within this or one of its descendant elements.

GetElementCapabilities(Element, out Role, out string[], out string)

Supplies the role, a list of capabilities and a preferred capability names to the caller. This method called when building a new element from the flavor element.

public override void GetElementCapabilities(Element parent, out Role role, out string[] capabilities, out string preferredCap)

Parameters

parent Element

The parent element of the element to be constructed. (for reference only)

role Role

The role the element should have.

capabilities string[]

The list of capabilities the element should have.

preferredCap string

The preferred capability the element should have.

GetRuntimeTokenValues()

Gets the runtime token values. This must be implemented by the flavors.

protected override object[] GetRuntimeTokenValues()

Returns

object[]

A collection of objects representing a runtime token.

InvokeAction(Element, string, object[])

Needs to be implemented for element action invocation.

public override object InvokeAction(Element element, string name, object[] args)

Parameters

element Element

The element instance used.

name string

The name of the action (lowercased).

args object[]

A list of invocation parameters.

Returns

object

The invocation result. Can be null if the return type is void.

IsEqual(FlavorElement)

Compares to flavor elements. This should be implemented using the best comparison method available.

public override bool IsEqual(FlavorElement flavorElem)

Parameters

flavorElem FlavorElement

The flavor element to compare to.

Returns

bool

True if the flavor elements are equal.

Remarks

The base method compares the token values returned by GetRuntimeTokenValues().

Select(SelectFlags)

public void Select(Msaa.SelectFlags flag)

Parameters

flag Msaa.SelectFlags

SetAttributeValue(Element, string, object)

Needs to be implemented for attribute value write access.

public override void SetAttributeValue(Element element, string name, object value)

Parameters

element Element

The element instance used.

name string

The name of the attribute (lowercased).

value object

The attribute value to be set.