Class
AssertSelect

Assert methods for an HtmlSelect control

Definition

Namespace:ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts

Assembly:ArtOfTest.WebAii.dll

Syntax:

cs-api-definition
public class AssertSelect : BaseControlAssert<HtmlSelect>

Inheritance: objectBaseControlAssert<HtmlSelect>AssertSelect

Inherited Members BaseControlAssert<HtmlSelect>.NotFoundBaseControlAssert<HtmlSelect>.NumberCompareRange(int, int, int, NumberRangeCompareType)BaseControlAssert<HtmlSelect>.NumberCompare(int, int, NumberCompareType)BaseControlAssert<HtmlSelect>.StringCompare(string, string, StringCompareType)BaseControlAssert<HtmlSelect>.AssertNumber(int, int, NumberCompareType, bool)BaseControlAssert<HtmlSelect>.AssertString(string, string, StringCompareType, bool)BaseControlAssert<HtmlSelect>.Assert(bool, string, string, string, bool)BaseControlAssert<HtmlSelect>.Assert(bool, string, string, string)BaseControlAssert<HtmlSelect>.Target

Constructors

AssertSelect()

Create a new AssertSelect object.

Declaration

cs-api-definition
public AssertSelect()

AssertSelect(HtmlSelect)

Create a new AssertSelect object and assign it to an existing control.

Declaration

cs-api-definition
public AssertSelect(HtmlSelect select)

Parameters

select

HtmlSelect

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

cs-api-definition
public AssertSelect(HtmlSelect select, bool throwOnFailure)

Parameters

select

HtmlSelect

The target HtmlSelect to assign to this AssertSelect object.

throwOnFailure

bool

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

cs-api-definition
public bool ItemsCountIs(NumberCompareType compareType, int expectedValue)

Parameters

compareType

NumberCompareType

The integer compare type.

expectedValue

int

The expected value.

Returns

bool

True if the values match else will throw an AssertException.

SelectedIndex(NumberCompareType, int)

Assert if the selected index does not match.

Declaration

cs-api-definition
public bool SelectedIndex(NumberCompareType compareType, int index)

Parameters

compareType

NumberCompareType

The number compare type.

index

int

The expected index.

Returns

bool

True if the values match else will throw an AssertException.

SelectedText(StringCompareType, string)

Assert if the selected text does not match.

Declaration

cs-api-definition
public bool SelectedText(StringCompareType compareType, string expectedText)

Parameters

compareType

StringCompareType

The string compare type.

expectedText

string

The expected text.

Returns

bool

True if the values match else will throw an AssertException.

SelectedValue(StringCompareType, string)

Assert if the selected value does not match.

Declaration

cs-api-definition
public bool SelectedValue(StringCompareType compareType, string expectedValue)

Parameters

compareType

StringCompareType

The string compare type.

expectedValue

string

The expected value.

Returns

bool

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.

Declaration

cs-api-definition
public bool TextExists(string expectedText)

Parameters

expectedText

string

Returns

bool

True if the values match else will throw an AssertException.

TextExistsNot(string)

Assert if a particular text value does exist in the HtmlSelect options list.

Declaration

cs-api-definition
public bool TextExistsNot(string expectedText)

Parameters

expectedText

string

The expected text to verify it does not exist.

Returns

bool

True if the values match else will throw an AssertException.

ValueExists(string)

Assert if a particular option value does not exist in the HtmlSelect options list.

Declaration

cs-api-definition
public bool ValueExists(string expectedValue)

Parameters

expectedValue

string

The expected value.

Returns

bool

True if the values match else will throw an AssertException.

ValueExistsNot(string)

Assert if a particular option value does exist in the HtmlSelect options list.

Declaration

cs-api-definition
public bool ValueExistsNot(string expectedValue)

Parameters

expectedValue

string

The expected value to verify it does not exist.

Returns

bool

True if the values match else will throw an AssertException.