Table of Contents

Class RadioButton

Namespace
Ranorex
Assembly
Ranorex.Core.dll

Represents a radio button which enables the user to select a single option from a group of choices.

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

Constructors

RadioButton()

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

protected RadioButton()

RadioButton(Element)

Creates a new RadioButton adapter instance.

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

Checked

True if the radio button is currently selected.

public virtual bool Checked { get; }

Property Value

bool

RequiredCapabilities

Capabilities required by the adapter implementation.

protected override string[] RequiredCapabilities { get; }

Property Value

string[]

Text

The text associated with the radio button.

public virtual string Text { get; }

Property Value

string

Methods

FromElement(Element)

Converts an Element to an instance of this class.

public static RadioButton FromElement(Element element)

Parameters

element Element

The element to convert.

Returns

RadioButton

The RadioButton.

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

Parameters

path string

The search path.

Returns

RadioButton

The RadioButton.

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.

Select()

Selects the radio button.

public virtual void Select()

Exceptions

ActionFailedException

Thrown if invoking the action failed.

Operators

implicit operator RadioButton(Element)

Implicitly converts an Element to an instance of this class.

public static implicit operator RadioButton(Element element)

Parameters

element Element

The element to convert.

Returns

RadioButton

The RadioButton.

Exceptions

ArgumentNullException

If element is null.

CapabilityNotSupportedException

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

implicit operator RadioButton(string)

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

public static implicit operator RadioButton(string path)

Parameters

path string

The search path.

Returns

RadioButton

The RadioButton.

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.