Class
HtmlSelect

Test class for an HtmlSelect element <select>...</select>

Definition

Namespace:ArtOfTest.WebAii.Controls.HtmlControls

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
public class HtmlSelect : HtmlContainerControl

Inheritance: objectControlHtmlControlHtmlContainerControlHtmlSelect

Inherited Members HtmlContainerControl.TextContentHtmlContainerControl.InnerTextHtmlControl.FindParentContainer<TContainerControl>()HtmlControl.ValidateTag(string)HtmlControl.ValidateControl()HtmlControl.ParseResponseValue<T>(string, T)HtmlControl.GetAttributeAsString(string)HtmlControl.InitializeMappings(MappingsCollection)HtmlControl.GetRectangle()HtmlControl.IsVisible()HtmlControl.GetStyleValue(string)HtmlControl.GetStyle(string)HtmlControl.GetComputedStyleValue(string)HtmlControl.GetComputedStyle(string)HtmlControl.Parent<TContainerControl>()HtmlControl.Capture()HtmlControl.Capture(string, string)HtmlControl.Capture(string)HtmlControl.InvokeEvent(ScriptEventType)HtmlControl.InvokeEvent(ScriptEventType, bool)HtmlControl.InvokeEvent(ScriptEvent)HtmlControl.InvokeEvent(ScriptEvent, bool)HtmlControl.AddEventListener(string, EventHandler<JavascriptEventArgs>)HtmlControl.RemoveEventListener(string, EventHandler<JavascriptEventArgs>)HtmlControl.MouseClick()HtmlControl.MouseClick(MouseClickType)HtmlControl.MouseClick(MouseClickType, int, int)HtmlControl.MouseClick(MouseClickType, Point, OffsetReference)HtmlControl.MouseClick(MouseClickType, int, int, OffsetReference)HtmlControl.MouseHover()HtmlControl.MouseHover(Point)HtmlControl.MouseHover(int, int)HtmlControl.MouseHover(int, int, OffsetReference)HtmlControl.Click()HtmlControl.Click(bool)HtmlControl.ScrollToVisible()HtmlControl.ScrollToVisible(ScrollToVisibleType)HtmlControl.ScrollToVisible(ScrollToVisibleType, Rectangle)HtmlControl.Download(bool, DownloadOption, string, int)HtmlControl.CallMethod(string)HtmlControl.CallMethod<T>(string)HtmlControl.CallMethod<T>(string, T)HtmlControl.GetValue<T>(string)HtmlControl.GetValue<T>(string, T)HtmlControl.GetValue<T>(string, bool)HtmlControl.GetValue<T>(string, bool, T)HtmlControl.SetValue<T>(string, T)HtmlControl.SetValue<T>(string, T, bool)HtmlControl.Focus()HtmlControl.DragTo(OffsetReference, Point, int, int)HtmlControl.DragTo(OffsetReference, int, int, Rectangle, OffsetReference, int, int)HtmlControl.DragTo(Point)HtmlControl.DragTo(int, int)HtmlControl.DragTo(HtmlControl)HtmlControl.DragTo(HtmlControl, OffsetReference, Point)HtmlControl.DragTo(OffsetReference, Point, HtmlControl)HtmlControl.DragTo(OffsetReference, Point, HtmlControl, OffsetReference, Point)HtmlControl.DragTo(OffsetReference, int, int, bool, HtmlControl, OffsetReference, int, int, bool)HtmlControl.DragToWindowLocation(OffsetReference, int, int, bool, OffsetReference, int, int, bool)HtmlControl.ToString()HtmlControl.AsjQueryControl()HtmlControl.GetElementByTagNameClientSideLocatorHtmlControl.GetElementByIdClientSideLocatorHtmlControl.FindHtmlControl.ClientSideLocatorHtmlControl.ScrollTopHtmlControl.ScrollLeftHtmlControl.WaitHtmlControl.IDHtmlControl.CssClassHtmlControl.AttributesHtmlControl.MappingsHtmlControl.StylesHtmlControl.EventsHtmlControl.TagNameHtmlControl.ChildNodesHtmlControl.IsActiveElementHtmlControl.IsEnabledControl.Refresh()Control.AssignFailed(Exception)Control.SetTelerikComponentsVersion(TelerikComponentsVersion?)Control.MatchControl(Element, FindParam)Control.GetFamilyElement(int, Element)Control.ThrowOnInvalidAssignmentControl.TelerikComponentsVersionControl.IsRefreshControl.BaseElementControl.OwnerBrowserControl.LocatorControl.LocatorExpression

Constructors

HtmlSelect()

Create a new control.

Declaration

cs-api-definition
public HtmlSelect()

HtmlSelect(Element)

Create a new control.

Declaration

cs-api-definition
public HtmlSelect(Element element)

Parameters

element

Element

The base element.

Properties

Options

Gets the List of Options.

Declaration

cs-api-definition
public ReadOnlyCollection<HtmlOption> Options { get; }

Property Value

ReadOnlyCollection<HtmlOption>

SelectedIndex

Gets the selected index.

Declaration

cs-api-definition
public int SelectedIndex { get; }

Property Value

int

SelectedOption

Gets the HtmlOption that is currently selected.

Declaration

cs-api-definition
public HtmlOption SelectedOption { get; }

Property Value

HtmlOption

this[int]

Gets Html Option by its index.

Declaration

cs-api-definition
public HtmlOption this[int index] { get; }

Parameters

index

int

The desired index.

Property Value

HtmlOption

The html option.

Methods

AssignElement(Element)

Assign element and initialize this control.

Declaration

cs-api-definition
public override void AssignElement(Element e)

Parameters

e

Element

The base element.

Overrides HtmlContainerControl.AssignElement(Element)

InvokeOnChange(bool)

Declaration

cs-api-definition
protected virtual void InvokeOnChange(bool initEvent)

Parameters

initEvent

bool

MultiSelect(params HtmlOption[])

Multi select a set of options on the select drop down. You can also set the .Selected value on any HtmlOption.

Declaration

cs-api-definition
public void MultiSelect(params HtmlOption[] options)

Parameters

options

HtmlOption[]

The list of options to select. These can be accessed fro the Options[] collection.

MultiSelectByIndex(params int[])

Multi select a set of options by passing in the indexes of these options.

Declaration

cs-api-definition
public void MultiSelectByIndex(params int[] indexes)

Parameters

indexes

int[]

The indexes to select

MultiSelectByText(params string[])

Multi select a set of options by passing in the text of these options.

Declaration

cs-api-definition
public void MultiSelectByText(params string[] textStrings)

Parameters

textStrings

string[]

The array of strings option texts to select.

MultiSelectByValue(params string[])

Mutli select a set of options by passing in the values of these options to select.

Declaration

cs-api-definition
public void MultiSelectByValue(params string[] values)

Parameters

values

string[]

The arrary of value of options to select.

SelectByIndex(int)

Select a option by index.

Declaration

cs-api-definition
public void SelectByIndex(int index)

Parameters

index

int

Index to select.

SelectByIndex(int, bool, bool)

Select ption by Index.

Declaration

cs-api-definition
public void SelectByIndex(int index, bool invokeOnChangeEvent, bool initEvent = true)

Parameters

index

int

Index to select.

invokeOnChangeEvent

bool

Whether to invoke the OnChange event.

initEvent

bool

Whether to try to invoke selection changed using the initEvent JS function

SelectByPartialText(string, bool)

Select an option by partial text.

Declaration

cs-api-definition
public void SelectByPartialText(string partialText, bool invokeOnChangeEvent)

Parameters

partialText

string

The partial text to look for.

invokeOnChangeEvent

bool

Whether to invoke the onchange event.

Exceptions

ArgumentException

Thrown when an option containing the partial text was not found.

SelectByPartialValue(string, bool)

Select an option by partial value.

Declaration

cs-api-definition
public void SelectByPartialValue(string partialValue, bool invokeOnChangeEvent)

Parameters

partialValue

string

The partial text to look for.

invokeOnChangeEvent

bool

Whether to invoke the onchange event.

Exceptions

ArgumentException

Thrown when an option containing the partial value was not found.

SelectByText(string)

Select a option by text.

Declaration

cs-api-definition
public void SelectByText(string text)

Parameters

text

string

Text of the option to select.

SelectByText(string, bool, bool)

Select Option by Text.

Declaration

cs-api-definition
public void SelectByText(string text, bool invokeOnChangeEvent, bool initEvent = true)

Parameters

text

string

Text of the option to select.

invokeOnChangeEvent

bool

Whether to invoke the OnChange event.

initEvent

bool

Whether to try to invoke selection changed using the initEvent JS function

SelectByValue(string)

Select Option by Value.

Declaration

cs-api-definition
public void SelectByValue(string value)

Parameters

value

string

Value of option to select.

SelectByValue(string, bool, bool)

Select Option by Value.

Declaration

cs-api-definition
public void SelectByValue(string value, bool invokeOnChangeEvent, bool initEvent = true)

Parameters

value

string

Value of option to select.

invokeOnChangeEvent

bool

Whether to invoke the onchange event.

initEvent

bool

Whether to try to invoke selection changed using the initEvent JS function

Extension Methods