C# Class TestAutomationEssentials.Selenium.ElementsContainer

Acts as a base class for all objects that can contain DOM elements
显示文件 Open project: arnonax/TestEssentials Class Usage Examples

Public Methods

Method Description
ElementAppears ( By by ) : bool
FindElements ( By @by, string description ) : IEnumerable
GetFrame ( By @by, string description ) : Frame

Returns the frame that matches the 'by' criteria which is contained inside the current container

If more than 1 frame matches the specified criteria, the first match is returned;

GetFrame ( string frameName, string description ) : Frame

Returns the specified frame which is contained inside the current container

WaitForElement ( By by, string description, int seconds = DefaultWaitTimeout ) : BrowserElement

Protected Methods

Method Description
Activate ( ) : void
ElementsContainer ( string description ) : System

Initializes the instance of ElementsContainer with the specified description

GetSearchContext ( ) : ISearchContext

Method Details

Activate() protected abstract method

protected abstract Activate ( ) : void
return void

ElementAppears() public method

public ElementAppears ( By by ) : bool
by OpenQA.Selenium.By
return bool

ElementsContainer() protected method

Initializes the instance of ElementsContainer with the specified description
is null
protected ElementsContainer ( string description ) : System
description string A description representing the element in the log
return System

FindElements() public method

public FindElements ( By @by, string description ) : IEnumerable
@by OpenQA.Selenium.By
description string
return IEnumerable

GetFrame() public method

Returns the frame that matches the 'by' criteria which is contained inside the current container
If more than 1 frame matches the specified criteria, the first match is returned;
Any of the arguments is null The frame wasn't found after seconds
public GetFrame ( By @by, string description ) : Frame
@by OpenQA.Selenium.By
description string A description representing the frame in the log
return Frame

GetFrame() public method

Returns the specified frame which is contained inside the current container
Any of the arguments is null The frame wasn't found after seconds
public GetFrame ( string frameName, string description ) : Frame
frameName string The name of the frame
description string A description representing the frame in the log
return Frame

GetSearchContext() protected method

protected GetSearchContext ( ) : ISearchContext
return ISearchContext

WaitForElement() public method

public WaitForElement ( By by, string description, int seconds = DefaultWaitTimeout ) : BrowserElement
by OpenQA.Selenium.By
description string
seconds int
return BrowserElement