ClassAssertSelect
Assert methods for an HtmlSelect control
Definition
Namespace:ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts
Assembly:ArtOfTest.WebAii.dll
Syntax:
public class AssertSelect : BaseControlAssert<HtmlSelect>
Inheritance: objectBaseControlAssert<HtmlSelect>AssertSelect
Inherited Members
Constructors
AssertSelect(HtmlSelect)
Create a new AssertSelect object and assign it to an existing control.
Declaration
public AssertSelect(HtmlSelect select)
Parameters
select
The target HtmlSelect to assign to this AssertSelect object.
AssertSelect(HtmlSelect, bool)
Create a new AssertSelect object and assign it to an existing control.
Declaration
public AssertSelect(HtmlSelect select, bool throwOnFailure)
Parameters
select
The target HtmlSelect to assign to this AssertSelect object.
throwOnFailure
Whether this object throws an exception if a check fails
Methods
ItemsCountIs(NumberCompareType, int)
Assert if the number of options in this HtmlSelect does not match.
Declaration
public bool ItemsCountIs(NumberCompareType compareType, int expectedValue)
Parameters
compareType
The integer compare type.
expectedValue
The expected value.
Returns
True if the values match else will throw an AssertException.
SelectedIndex(NumberCompareType, int)
Assert if the selected index does not match.
Declaration
public bool SelectedIndex(NumberCompareType compareType, int index)
Parameters
compareType
The number compare type.
index
The expected index.
Returns
True if the values match else will throw an AssertException.
SelectedText(StringCompareType, string)
Assert if the selected text does not match.
Declaration
public bool SelectedText(StringCompareType compareType, string expectedText)
Parameters
compareType
The string compare type.
expectedText
The expected text.
Returns
True if the values match else will throw an AssertException.
SelectedValue(StringCompareType, string)
Assert if the selected value does not match.
Declaration
public bool SelectedValue(StringCompareType compareType, string expectedValue)
Parameters
compareType
The string compare type.
expectedValue
The expected value.
Returns
True if the values match else will throw an AssertException.
TextExists(string)
Assert if a particular text value does not exist in the HtmlSelect options list.
TextExistsNot(string)
Assert if a particular text value does exist in the HtmlSelect options list.
ValueExists(string)
Assert if a particular option value does not exist in the HtmlSelect options list.
ValueExistsNot(string)
Assert if a particular option value does exist in the HtmlSelect options list.