C# 클래스 TestAutomationEssentials.Selenium.BrowserElement

Represents a single DOM element in a browser
This class wraps Selenium's IWebElement to provide additional capabilities for logging, automatic waiting and more.
상속: ElementsContainer, IWebElement, IWrapsElement
파일 보기 프로젝트 열기: arnonax/TestEssentials 1 사용 예제들

Private Properties

프로퍼티 타입 설명
BrowserElement System
CreateActionsSequence OpenQA.Selenium.Interactions.Actions
GetParentLocator OpenQA.Selenium.By
GetWebElement IWebElement
GetWebElement IWebElement
ISearchContext IWebElement
ISearchContext ReadOnlyCollection
IWebElement string
IWebElement void
IWebElement void
IsAvailable bool
IsReady bool
SafeGetDOMRoot IDOMRoot

공개 메소드들

메소드 설명
BrowserElement ( ElementsContainer container, By by, Func selector, string description ) : System

Initializes a new instance of BrowserElement given its container, a 'By' filter a selector and description

BrowserElement ( ElementsContainer container, By by, string description ) : System

Initialized a new instance of BrowserElement given its container, a specific 'By' filter and description

Click ( ) : void
DoubleClick ( ) : void

Performs a double-click on the element

DragAndDrop ( BrowserElement target ) : void

Drags the current element onto the target element

GetAttribute ( string attributeName ) : string
GetParent ( string description ) : BrowserElement

Returns the immediate parent element containing the current element

Hover ( ) : void

Hovers the mouse over the element

WaitToDisappear ( int seconds = DefaultWaitTimeout ) : void

Waits for the current element to disappear. That is, either become invisible or completely removed from the DOM

보호된 메소드들

메소드 설명
Activate ( ) : void
BrowserElement ( BrowserElement otherElement ) : System

Copy constructor

BrowserElement ( BrowserElement otherElement, string description ) : System

Constructs a new instance of BrowserElement by copying its properties, except of its description from another element

GetSearchContext ( ) : ISearchContext

비공개 메소드들

메소드 설명
BrowserElement ( IDOMRoot domRoot, Func getWebElement, string description ) : System
CreateActionsSequence ( ) : OpenQA.Selenium.Interactions.Actions
GetParentLocator ( ) : By
GetWebElement ( ) : IWebElement
GetWebElement ( ElementsContainer elementsContainer, By by, Func selector, string description ) : IWebElement
ISearchContext ( By by ) : IWebElement
ISearchContext ( By by ) : ReadOnlyCollection
IWebElement ( string propertyName ) : string
IWebElement ( ) : void
IWebElement ( string text ) : void
IsAvailable ( IWebElement el ) : bool
IsReady ( ) : bool
SafeGetDOMRoot ( ElementsContainer otherElement, string paramName ) : IDOMRoot

메소드 상세

Activate() 보호된 메소드

protected Activate ( ) : void
리턴 void

BrowserElement() 보호된 메소드

Copy constructor
protected BrowserElement ( BrowserElement otherElement ) : System
otherElement BrowserElement Other object from which to copy the properties into the new object
리턴 System

BrowserElement() 보호된 메소드

Constructs a new instance of BrowserElement by copying its properties, except of its description from another element
is null
protected BrowserElement ( BrowserElement otherElement, string description ) : System
otherElement BrowserElement The existing element to copy its properties from
description string The new description to use for the new object
리턴 System

BrowserElement() 공개 메소드

Initializes a new instance of BrowserElement given its container, a 'By' filter a selector and description
Any of the arguments is null
public BrowserElement ( ElementsContainer container, By by, Func selector, string description ) : System
container ElementsContainer The container that contains the relevant element. Typically this is a , , or a containing
by OpenQA.Selenium.By A filter mechanism used to filter the matching elements
selector Func A delegate that is used to select the sepecific element from the filtered elements
description string The description of the new element
리턴 System

BrowserElement() 공개 메소드

Initialized a new instance of BrowserElement given its container, a specific 'By' filter and description
Any of the arguments is null
public BrowserElement ( ElementsContainer container, By by, string description ) : System
container ElementsContainer The container that contains the relevant element. Typically this is a , , or a containing
by OpenQA.Selenium.By A filter mechanism used to find the element. If multiple elements match the filter, the first one is used
description string The description of the new element
리턴 System

Click() 공개 메소드

public Click ( ) : void
리턴 void

DoubleClick() 공개 메소드

Performs a double-click on the element
public DoubleClick ( ) : void
리턴 void

DragAndDrop() 공개 메소드

Drags the current element onto the target element
is null
public DragAndDrop ( BrowserElement target ) : void
target BrowserElement The target element to drop the current element onto
리턴 void

GetAttribute() 공개 메소드

public GetAttribute ( string attributeName ) : string
attributeName string
리턴 string

GetParent() 공개 메소드

Returns the immediate parent element containing the current element
public GetParent ( string description ) : BrowserElement
description string The description to give to the parent element
리턴 BrowserElement

GetSearchContext() 보호된 메소드

protected GetSearchContext ( ) : ISearchContext
리턴 ISearchContext

Hover() 공개 메소드

Hovers the mouse over the element
public Hover ( ) : void
리턴 void

WaitToDisappear() 공개 메소드

Waits for the current element to disappear. That is, either become invisible or completely removed from the DOM
The current element hasn't been disappeared for the specified period
public WaitToDisappear ( int seconds = DefaultWaitTimeout ) : void
seconds int Timeout in seconds to wait for the element to disappear
리턴 void