C# Class Affecto.Testing.UI.Selenium.WebHostDriver

Inheritance: IDisposable
Show file Open project: affecto/dotnet-Testing.UI.Selenium Class Usage Examples

Public Methods

Method Description
ClickElement ( string elementId ) : void
ClickElementWithWait ( string elementId, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : void
ClickLink ( string linkText ) : void
Dispose ( ) : void
ElementHasAnyText ( string elementId ) : bool
ElementHasAnyTextWithWait ( string elementId, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : bool
ElementHasText ( string elementId, string textToFind ) : bool
ElementHasTextWithWait ( string elementId, string textToFind, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : bool
FindElementByIdWithWait ( string elementId, int maxWaitTimeInMilliseconds = MaxWaitDefaultInMilliseconds ) : IWebElement
GetDropDownListContent ( string elementId ) : List
GetDropDownListContent ( string labelAndDropDownListElementId, string label ) : List
GetDropDownListSelection ( string elementId ) : string
GetDropDownListSelection ( string labelAndDropDownListElementId, string label ) : string
GetDropDownListSelectionWithWait ( string elementId, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : string
InputHasText ( string elementId, string textToFind ) : bool
InputHasTextWithWait ( string elementId, string textToFind, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : bool
IsDropDownListEnabled ( string labelAndDropDownListElementId, string elementLabel ) : bool
IsElementDisplayed ( string elementId ) : bool
IsElementDisplayedWithWait ( string elementId, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : bool
IsElementEnabled ( string elementId ) : bool
IsElementEnabledWithWait ( string elementId, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : bool
IsElementPresent ( string elementId ) : bool
IsElementPresentWithWait ( string elementId, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : bool
IsTableCellLinkPresent ( string tableElementId, string linkText ) : bool
NavigateTo ( string url ) : void
SelectDropDownListItem ( string elementId, string itemText ) : void
SelectDropDownListItem ( string labelAndDropDownListElementId, string elementLabel, string itemText ) : void
SelectDropDownListItemWithWait ( string elementId, string itemText, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : void
TypeText ( string inputElementId, string text ) : void
TypeTextWithWait ( string inputElementId, string text, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : void
WebHostDriver ( string browserName ) : System

Private Methods

Method Description
ClearAndTypeText ( string text, IWebElement inputElement ) : void
FindElementAndSleep ( string elementId ) : IWebElement
FindElementsAndSleep ( string elementId ) : ReadOnlyCollection
FindElementsByIdWithWait ( string elementId, int maxWaitTimeInMilliseconds ) : ReadOnlyCollection
GetDropDownListContent ( ISearchContext selectDocumentTypeDropDown ) : List
GetDropDownListElement ( string labelAndDropDownListElementId, string label ) : IWebElement
SelectItem ( IWebElement dropDownElement, string itemText ) : void
VerifyIsSingleElementPresent ( string elementId, ReadOnlyCollection elements ) : bool

Method Details

ClickElement() public method

public ClickElement ( string elementId ) : void
elementId string
return void

ClickElementWithWait() public method

public ClickElementWithWait ( string elementId, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : void
elementId string
maxWaitInMilliseconds int
return void

ClickLink() public method

public ClickLink ( string linkText ) : void
linkText string
return void

Dispose() public method

public Dispose ( ) : void
return void

ElementHasAnyText() public method

public ElementHasAnyText ( string elementId ) : bool
elementId string
return bool

ElementHasAnyTextWithWait() public method

public ElementHasAnyTextWithWait ( string elementId, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : bool
elementId string
maxWaitInMilliseconds int
return bool

ElementHasText() public method

public ElementHasText ( string elementId, string textToFind ) : bool
elementId string
textToFind string
return bool

ElementHasTextWithWait() public method

public ElementHasTextWithWait ( string elementId, string textToFind, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : bool
elementId string
textToFind string
maxWaitInMilliseconds int
return bool

FindElementByIdWithWait() public method

public FindElementByIdWithWait ( string elementId, int maxWaitTimeInMilliseconds = MaxWaitDefaultInMilliseconds ) : IWebElement
elementId string
maxWaitTimeInMilliseconds int
return IWebElement

GetDropDownListContent() public method

public GetDropDownListContent ( string elementId ) : List
elementId string
return List

GetDropDownListContent() public method

public GetDropDownListContent ( string labelAndDropDownListElementId, string label ) : List
labelAndDropDownListElementId string
label string
return List

GetDropDownListSelection() public method

public GetDropDownListSelection ( string elementId ) : string
elementId string
return string

GetDropDownListSelection() public method

public GetDropDownListSelection ( string labelAndDropDownListElementId, string label ) : string
labelAndDropDownListElementId string
label string
return string

GetDropDownListSelectionWithWait() public method

public GetDropDownListSelectionWithWait ( string elementId, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : string
elementId string
maxWaitInMilliseconds int
return string

InputHasText() public method

public InputHasText ( string elementId, string textToFind ) : bool
elementId string
textToFind string
return bool

InputHasTextWithWait() public method

public InputHasTextWithWait ( string elementId, string textToFind, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : bool
elementId string
textToFind string
maxWaitInMilliseconds int
return bool

IsDropDownListEnabled() public method

public IsDropDownListEnabled ( string labelAndDropDownListElementId, string elementLabel ) : bool
labelAndDropDownListElementId string
elementLabel string
return bool

IsElementDisplayed() public method

public IsElementDisplayed ( string elementId ) : bool
elementId string
return bool

IsElementDisplayedWithWait() public method

public IsElementDisplayedWithWait ( string elementId, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : bool
elementId string
maxWaitInMilliseconds int
return bool

IsElementEnabled() public method

public IsElementEnabled ( string elementId ) : bool
elementId string
return bool

IsElementEnabledWithWait() public method

public IsElementEnabledWithWait ( string elementId, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : bool
elementId string
maxWaitInMilliseconds int
return bool

IsElementPresent() public method

public IsElementPresent ( string elementId ) : bool
elementId string
return bool

IsElementPresentWithWait() public method

public IsElementPresentWithWait ( string elementId, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : bool
elementId string
maxWaitInMilliseconds int
return bool

IsTableCellLinkPresent() public method

public IsTableCellLinkPresent ( string tableElementId, string linkText ) : bool
tableElementId string
linkText string
return bool

NavigateTo() public method

public NavigateTo ( string url ) : void
url string
return void

SelectDropDownListItem() public method

public SelectDropDownListItem ( string elementId, string itemText ) : void
elementId string
itemText string
return void

SelectDropDownListItem() public method

public SelectDropDownListItem ( string labelAndDropDownListElementId, string elementLabel, string itemText ) : void
labelAndDropDownListElementId string
elementLabel string
itemText string
return void

SelectDropDownListItemWithWait() public method

public SelectDropDownListItemWithWait ( string elementId, string itemText, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : void
elementId string
itemText string
maxWaitInMilliseconds int
return void

TypeText() public method

public TypeText ( string inputElementId, string text ) : void
inputElementId string
text string
return void

TypeTextWithWait() public method

public TypeTextWithWait ( string inputElementId, string text, int maxWaitInMilliseconds = MaxWaitDefaultInMilliseconds ) : void
inputElementId string
text string
maxWaitInMilliseconds int
return void

WebHostDriver() public method

public WebHostDriver ( string browserName ) : System
browserName string
return System