HtmlElement.Net
|
Models HTML select element and provides access to it's options More...
Inherits HtmlElements.Elements.HtmlControl, and IList< HtmlSelectOption >.
Public Member Functions | |
HtmlSelect (IWebElement webElement) | |
Initializes new instance of HTML element by calling base class constructor More... | |
void | RemoveAt (int index) |
Not supported. Calling it will trigger System.NotSupportedException. More... | |
void | Insert (int index, HtmlSelectOption item) |
Not supported. Calling it will trigger System.NotSupportedException. More... | |
int | IndexOf (HtmlSelectOption item) |
Determines the index of a specific option among other select options. More... | |
bool | Remove (HtmlSelectOption item) |
Not supported. Calling it will trigger System.NotSupportedException. More... | |
void | CopyTo (HtmlSelectOption[] array, int arrayIndex) |
Copies select element options to an System.Array, starting at a particular System.Array index. More... | |
bool | Contains (HtmlSelectOption item) |
Determines whether the select element contains a specific option. More... | |
void | Add (HtmlSelectOption item) |
Not supported. Calling it will trigger System.NotSupportedException. More... | |
IEnumerator< HtmlSelectOption > | GetEnumerator () |
Returns an enumerator that iterates through select options. More... | |
void | SelectByText (string text) |
Select all options by the text displayed. More... | |
void | SelectByValue (string value) |
Select an option by the value. More... | |
void | DeselectAll () |
Clear all selected entries. This is only valid when the SELECT supports multiple selections. More... | |
void | DeselectByText (string text) |
Deselect the option by the text displayed. More... | |
void | DeselectByValue (string value) |
Deselect the option having value matching the specified text. More... | |
![]() | |
HtmlElement (IWebElement webElement) | |
void | Clear () |
Clears the content of this element. More... | |
void | SendKeys (string text) |
Simulates typing text into the element. More... | |
void | Submit () |
Submits this element to the web server. More... | |
void | Click () |
Clicks this element. More... | |
string | GetAttribute (string attributeName) |
Gets the value of the specified attribute for this element. More... | |
string | GetProperty (string propertyName) |
Gets the value of a JavaScript property of this element. More... | |
string | GetCssValue (string propertyName) |
Gets the value of a CSS property of this element. More... | |
void | EnterText (string text) |
Replace existing text input with provided. More... | |
TPage | Open< TPage > () |
Clicks on a wrapped WebElement and creates new page object instance of given type. More... | |
TPage | OpenInNewWindow< TPage > () |
Clicks on wrapped WebElement, waits until new window is opened and switches to it. More... | |
![]() | |
object | ExecuteScript (string script, params object[] args) |
Executes JavaScript in the context of the currently selected frame or window. More... | |
object | ExecuteAsyncScript (string script, params object[] args) |
Executes JavaScript asynchronously in the context of the currently selected frame or window. More... | |
ReadOnlyCollection< IWebElement > | FindElements (By @by) |
Finds all IWebElements within the current context using the given mechanism. More... | |
IWebElement | FindElement (By @by) |
Finds the first T:OpenQA.Selenium.IWebElement using the given method. More... | |
TElement | FindElement< TElement > (By @by) |
Finds the first IWebElement using given method and creates a page object of given type wrapping the element. More... | |
IList< TElement > | FindElements< TElement > (By @by) |
Finds all IWebElements within the current context using the given mechanism and creates page objects wrapping it. More... | |
override string | ToString () |
Describes actual page object type and wrapped search context. More... | |
Properties | |
bool | IsMultiple [get] |
Gets a value indicating whether select element supports multiple selections. More... | |
IList< HtmlSelectOption > | Options [get] |
Gets the list of options for the select element. More... | |
HtmlSelectOption | SelectedOption [get] |
Gets the selected item within the select element. If more than one item is selected this will return the first item. More... | |
IList< HtmlSelectOption > | SelectedOptions [get] |
Gets all of the selected options within the select element More... | |
HtmlSelectOption | this[int index] [get, set] |
Gets select option at the specified index. Using setter will trigger System.NotSupportedException More... | |
bool | IsReadOnly [get] |
Always returns truesince list is read-only More... | |
int | Count [get] |
Gets the number of options contained in select element. More... | |
![]() | |
bool | Disabled [get, set] |
Disabled/enabled control state More... | |
string | Value [get, set] |
Value assigned to control More... | |
![]() | |
string | Class [get, set] |
Gets or sets 'class' attribute of the underlying DOM element or null if it does not exist More... | |
IWebElement | FirstChild [get] |
First child node of the web element, as a web element More... | |
string | Id [get, set] |
Gets or sets 'id' attribute of the underlying DOM element or null if it does not exist More... | |
string | InnerHtml [get, set] |
HTML content of an element More... | |
IWebElement | LastChild [get] |
Last child node of the current element, as a web element More... | |
string | Name [get, set] |
Gets or sets 'name' attribute of the underlying DOM element or null if it does not exist More... | |
IWebElement | NextSibling [get] |
The next node of current web element, in the same tree level More... | |
IWebElement | ParentNode [get] |
A WebElement, representing the parent node of current element, or null if it has no parent More... | |
IWebElement | PreviousSibling [get] |
A previous node of current web element, in the same tree level More... | |
string | Style [get, set] |
Gets or sets 'style' attribute of the underlying DOM element or null if it does not exist More... | |
string | TextContent [get, set] |
Returns or sets the text from the element. On returning text, this property returns the value of all text nodes within the element node. On setting text, this property removes all child nodes and replaces them with a single text node. More... | |
string | Title [get, set] |
Gets or sets 'title' attribute of the underlying DOM element or null if it does not exist More... | |
IWebElement | WrappedElement [get] |
Returns underlying web element wrapped by current HtmlElement More... | |
string | TagName [get] |
Gets the tag name of this element. More... | |
string | Text [get] |
Gets the innerText of this element, without any leading or trailing whitespace, and with other whitespace collapsed. More... | |
bool | Enabled [get] |
Gets a value indicating whether or not this element is enabled. More... | |
bool | Selected [get] |
Gets a value indicating whether or not this element is selected. More... | |
Point | Location [get] |
Gets a Point object containing the coordinates of the upper-left corner of this element relative to the upper-left corner of the page. More... | |
Size | Size [get] |
Gets object containing the height and width of this element. More... | |
bool | Displayed [get] |
Gets a value indicating whether or not this element is displayed. More... | |
![]() | |
IPageObjectFactory | PageObjectFactory [get] |
Gets the page object factory used to initialize current page object instance. More... | |
IWebDriver | WrappedDriver [get] |
Gets the T:OpenQA.Selenium.IWebDriver wrapped by current page object instance. More... | |
Additional Inherited Members | |
![]() | |
HtmlControl (IWebElement webElement) | |
Initializes new instance of HTML element by calling base class constructor More... | |
![]() | |
WebDriverWrapper (ISearchContext webDriverOrWrapper) | |
Initializes wrapper converting provided object to WebDriver More... | |
Models HTML select element and provides access to it's options
HtmlElements.Elements.HtmlSelect.HtmlSelect | ( | IWebElement | webElement | ) |
Initializes new instance of HTML element by calling base class constructor
webElement | WebElement wrapping WebDriver instance |
void HtmlElements.Elements.HtmlSelect.Add | ( | HtmlSelectOption | item | ) |
Not supported. Calling it will trigger System.NotSupportedException.
System.NotSupportedException | Thrown on any attempt to use method. |
bool HtmlElements.Elements.HtmlSelect.Contains | ( | HtmlSelectOption | item | ) |
Determines whether the select element contains a specific option.
item |
void HtmlElements.Elements.HtmlSelect.CopyTo | ( | HtmlSelectOption[] | array, |
int | arrayIndex | ||
) |
Copies select element options to an System.Array, starting at a particular System.Array index.
array | The one-dimensional System.Array that is the destination of the copied select options. The System.Array must have zero-based indexing. |
arrayIndex | The zero-based index in array at which copying begins. |
void HtmlElements.Elements.HtmlSelect.DeselectAll | ( | ) |
Clear all selected entries. This is only valid when the SELECT supports multiple selections.
OpenQA.Selenium.WebDriverException | Thrown when attempting to deselect all options from a SELECT that does not support multiple selections. |
void HtmlElements.Elements.HtmlSelect.DeselectByText | ( | string | text | ) |
Deselect the option by the text displayed.
text | The text of the option to be deselected. |
void HtmlElements.Elements.HtmlSelect.DeselectByValue | ( | string | value | ) |
Deselect the option having value matching the specified text.
value | The value of the option to deselect. |
IEnumerator<HtmlSelectOption> HtmlElements.Elements.HtmlSelect.GetEnumerator | ( | ) |
Returns an enumerator that iterates through select options.
int HtmlElements.Elements.HtmlSelect.IndexOf | ( | HtmlSelectOption | item | ) |
Determines the index of a specific option among other select options.
item | The options to locate in select element. |
void HtmlElements.Elements.HtmlSelect.Insert | ( | int | index, |
HtmlSelectOption | item | ||
) |
Not supported. Calling it will trigger System.NotSupportedException.
System.NotSupportedException | Thrown on any attempt to use method. |
bool HtmlElements.Elements.HtmlSelect.Remove | ( | HtmlSelectOption | item | ) |
Not supported. Calling it will trigger System.NotSupportedException.
System.NotSupportedException | Thrown on any attempt to use method. |
void HtmlElements.Elements.HtmlSelect.RemoveAt | ( | int | index | ) |
Not supported. Calling it will trigger System.NotSupportedException.
System.NotSupportedException | Thrown on any attempt to use method. |
void HtmlElements.Elements.HtmlSelect.SelectByText | ( | string | text | ) |
Select all options by the text displayed.
text | The text of the option to be selected. If an exact match is not found, this method will perform a substring match. |
void HtmlElements.Elements.HtmlSelect.SelectByValue | ( | string | value | ) |
Select an option by the value.
value | The value of the option to be selected. |
|
get |
Gets the number of options contained in select element.
|
get |
Gets a value indicating whether select element supports multiple selections.
|
get |
Always returns truesince list is read-only
|
get |
Gets the list of options for the select element.
|
get |
Gets the selected item within the select element. If more than one item is selected this will return the first item.
OpenQA.Selenium.NoSuchElementException | Thrown if no option is selected. |
|
get |
Gets all of the selected options within the select element
|
getset |
Gets select option at the specified index. Using setter will trigger System.NotSupportedException
index | The zero-based index of the select option to get. |
NotSupportedException | Thrown when attempted to set property value. |