Table of Contents

Class Capability

Namespace
Ranorex.Core
Assembly
Ranorex.Core.dll

A capability is a logical grouping of actions and attributes which belong together.

public class Capability : Descriptor, IEquatable<Descriptor>, IComparable<Descriptor>, IEquatable<Capability>
Inheritance
Capability
Implements
Derived
Inherited Members

Constructors

Capability(string, string, Image, bool, IList<ActionDescriptor>, IList<AttributeDescriptor>, string, string)

Creates a new capability.

public Capability(string displayName, string description, Image icon, bool isUsefulContainer, IList<ActionDescriptor> actions, IList<AttributeDescriptor> attributes, string labelAttributeName, string contentAttributeName)

Parameters

displayName string

The name of the capability. This should be CamelCased.

description string

A short description of the capability.

icon Image

An icon which represents the capability, or null to use the default icon.

isUsefulContainer bool

If true, the capability represents, from a user interface perspective, a useful/logical container. and is used alternatively to the name in RxPath.

actions IList<ActionDescriptor>

A list of actions provided by this capability.

attributes IList<AttributeDescriptor>

A list of attributes provided by this capability.

labelAttributeName string

Name of the attribute which acts as a label (can be null).

contentAttributeName string

Name of the attribute which represents the content of an element (can be null).

Capability(string, string, string, Image, bool, IList<ActionDescriptor>, IList<AttributeDescriptor>)

Creates a new capability.

public Capability(string displayName, string shortName, string description, Image icon, bool isUsefulContainer, IList<ActionDescriptor> actions, IList<AttributeDescriptor> attributes)

Parameters

displayName string

The name of the capability. This should be CamelCased.

shortName string

The shorthand name of the capability. This is not required to be unique.

description string

A short description of the capability.

icon Image

An icon which represents the capability, or null to use the default icon.

isUsefulContainer bool

If true, the capability represents, from a user interface perspective, a useful/logical container. and is used alternatively to the name in RxPath.

actions IList<ActionDescriptor>

A list of actions provided by this capability.

attributes IList<AttributeDescriptor>

A list of attributes provided by this capability.

Capability(string, string, string, Image, bool, IList<ActionDescriptor>, IList<AttributeDescriptor>, string, string)

Creates a new capability.

public Capability(string displayName, string shortName, string description, Image icon, bool isUsefulContainer, IList<ActionDescriptor> actions, IList<AttributeDescriptor> attributes, string labelAttributeName, string contentAttributeName)

Parameters

displayName string

The name of the capability. This should be CamelCased.

shortName string

The shorthand name of the capability. This is not required to be unique.

description string

A short description of the capability.

icon Image

An icon which represents the capability, or null to use the default icon.

isUsefulContainer bool

If true, the capability represents, from a user interface perspective, a useful/logical container. and is used alternatively to the name in RxPath.

actions IList<ActionDescriptor>

A list of actions provided by this capability.

attributes IList<AttributeDescriptor>

A list of attributes provided by this capability.

labelAttributeName string

Name of the attribute which acts as a label (can be null).

contentAttributeName string

Name of the attribute which represents the content of an element (can be null).

Fields

Checkable

Represents a check box that allows the user to select a true or false condition.

public static readonly Capability Checkable

Field Value

Capability

DynamicCapabilityDisplayName

Defines the name for the "Dynamic" capability, providing dynamic attributes and actions of an element.

public static readonly string DynamicCapabilityDisplayName

Field Value

string

Properties

Actions

A list of actions, provided as a by-name dictionary.

[TypeConverter(typeof(CollectionConverter))]
public IDictionary<string, ActionDescriptor> Actions { get; }

Property Value

IDictionary<string, ActionDescriptor>

Attributes

A list of attributes, provided as a by-name dictionary.

[TypeConverter(typeof(CollectionConverter))]
public IDictionary<string, AttributeDescriptor> Attributes { get; }

Property Value

IDictionary<string, AttributeDescriptor>

ContentAttributeName

The name of the attribute for this capability which represents the content of an element. or null if the capability has no content attribute.

public string ContentAttributeName { get; }

Property Value

string

Icon

An icon representing the capability. Should be 16x16 pixels.

public Image Icon { get; }

Property Value

Image

IsUsefulContainer

If true, the capability represents, from a user interface perspective, a useful/logical container.

public bool IsUsefulContainer { get; }

Property Value

bool

LabelAttributeName

The name of the attribute for this capability which acts as a label for an element. or null if the capability has no label attribute.

public string LabelAttributeName { get; }

Property Value

string

ShortDisplayName

The shorthand display name of this capability.

public string ShortDisplayName { get; }

Property Value

string

ShortName

The shorthand name of this capability.

public string ShortName { get; }

Property Value

string

Methods

Equals(Capability)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Capability other)

Parameters

other Capability

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to this instance.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with this instance.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

GetHashCode()

Returns a hash code for this instance.

public override int GetHashCode()

Returns

int

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

GetPredefinedCapabilities()

Returns a list of predefined capabilites.

public static IList<Capability> GetPredefinedCapabilities()

Returns

IList<Capability>

A list of predefined capabilites.

ToString()

To string.

public override string ToString()

Returns

string

String.

Operators

operator ==(Capability, Capability)

Implements the operator ==.

public static bool operator ==(Capability c1, Capability c2)

Parameters

c1 Capability

Capability 1.

c2 Capability

Capability 2.

Returns

bool

True if the two Capability instances have the same Name, otherwise false.

operator !=(Capability, Capability)

Implements the operator !=.

public static bool operator !=(Capability c1, Capability c2)

Parameters

c1 Capability

Capability 1.

c2 Capability

Capability 2.

Returns

bool

True if the two Capability instances do not have the same Name, otherwise false.