Class AutoSuggestBox
Defines a
Implements
Inherited Members
Namespace: Legerity.Windows.Elements.Core
Assembly: Legerity.Windows.dll
Syntax
public class AutoSuggestBox : WindowsElementWrapper, IElementWrapper<WindowsElement>
Constructors
| Improve this Doc View SourceAutoSuggestBox(WindowsElement)
Initializes a new instance of the AutoSuggestBox class.
Declaration
public AutoSuggestBox(WindowsElement element)
Parameters
Type | Name | Description |
---|---|---|
WindowsElement | element | The |
Properties
| Improve this Doc View SourceSuggestionList
Gets the element associated with the suggestion list when the SuggestionsPopup is shown.
Declaration
public virtual ListView SuggestionList { get; }
Property Value
Type | Description |
---|---|
ListView |
SuggestionsPopup
Gets the element associated with the suggestions popup.
Declaration
public virtual AppiumWebElement SuggestionsPopup { get; }
Property Value
Type | Description |
---|---|
AppiumWebElement |
Text
Gets the value of the auto-suggest box.
Declaration
public virtual string Text { get; }
Property Value
Type | Description |
---|---|
System.String |
TextBox
Gets the element associated with the text box.
Declaration
public virtual TextBox TextBox { get; }
Property Value
Type | Description |
---|---|
TextBox |
Methods
| Improve this Doc View SourceSelectSuggestion(String)
Selects a suggestion from the auto-suggest box.
Declaration
public virtual void SelectSuggestion(string suggestion)
Parameters
Type | Name | Description |
---|---|---|
System.String | suggestion | The suggestion to select. |
Exceptions
Type | Condition |
---|---|
ElementNotShownException | Thrown when the suggestions popup is not shown. |
ElementsNotShownException | Thrown when no elements are shown for the expected locator. |
SelectSuggestion(String, String, Int32)
Selects a suggestion from the auto-suggest box.
Declaration
public virtual void SelectSuggestion(string value, string suggestion, int popupWaitTimeout = 2000)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The initial value to set. |
System.String | suggestion | The suggestion to select. |
System.Int32 | popupWaitTimeout | The timeout to wait for the suggestions popup to appear. Defaults to 2000ms. |
Exceptions
Type | Condition |
---|---|
ElementNotShownException | Thrown when the suggestions popup is not shown. |
ElementsNotShownException | Thrown when no elements are shown for the expected locator. |
SelectSuggestionByPartialSuggestion(String, String, Int32)
Selects a suggestion from the auto-suggest box.
Declaration
public virtual void SelectSuggestionByPartialSuggestion(string value, string partialSuggestion, int popupWaitTimeout = 2000)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The initial value to set. |
System.String | partialSuggestion | The partial suggestion match to select. |
System.Int32 | popupWaitTimeout | The timeout to wait for the suggestions popup to appear. Defaults to 2000ms. |
Exceptions
Type | Condition |
---|---|
ElementNotShownException | Thrown when the suggestions popup is not shown. |
ElementsNotShownException | Thrown when no elements are shown for the expected locator. |
SetText(String)
Sets the value of the auto-suggest box.
Declaration
public virtual void SetText(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The value to set. |
Operators
| Improve this Doc View SourceImplicit(AppiumWebElement to AutoSuggestBox)
Allows conversion of a
Declaration
public static implicit operator AutoSuggestBox(AppiumWebElement element)
Parameters
Type | Name | Description |
---|---|---|
AppiumWebElement | element | The |
Returns
Type | Description |
---|---|
AutoSuggestBox | The AutoSuggestBox. |
Implicit(RemoteWebElement to AutoSuggestBox)
Allows conversion of a
Declaration
public static implicit operator AutoSuggestBox(RemoteWebElement element)
Parameters
Type | Name | Description |
---|---|---|
RemoteWebElement | element | The |
Returns
Type | Description |
---|---|
AutoSuggestBox | The AutoSuggestBox. |
Implicit(WindowsElement to AutoSuggestBox)
Allows conversion of a
Declaration
public static implicit operator AutoSuggestBox(WindowsElement element)
Parameters
Type | Name | Description |
---|---|---|
WindowsElement | element | The |
Returns
Type | Description |
---|---|
AutoSuggestBox | The AutoSuggestBox. |