C# 클래스 OpenQA.Selenium.Support.Events.EventFiringWebDriver

A wrapper around an arbitrary WebDriver instance which supports registering for events, e.g. for logging purposes.
상속: IWebDriver, IJavaScriptExecutor, ITakesScreenshot, IWrapsDriver
파일 보기 프로젝트 열기: asynchrony/Selenium2 1 사용 예제들

공개 메소드들

메소드 설명
Close ( ) : void

Close the current window, quitting the browser if it is the last window currently open.

Dispose ( ) : void

Frees all managed and unmanaged resources used by this instance.

EventFiringWebDriver ( IWebDriver parentDriver ) : System

Initializes a new instance of the EventFiringWebDriver class.

ExecuteAsyncScript ( string script ) : object

Executes JavaScript asynchronously in the context of the currently selected frame or window.

ExecuteScript ( string script ) : object

Executes JavaScript in the context of the currently selected frame or window.

The ExecuteScriptmethod executes JavaScript in the context of the currently selected frame or window. This means that "document" will refer to the current document. If the script has a return value, then the following steps will be taken:

For an HTML element, this method returns a IWebElement For a number, a System.Int64 is returned For a boolean, a System.Boolean is returned For all other cases a System.String is returned. For an array,we check the first element, and attempt to return a List{T} of that type, following the rules above. Nested lists are not supported. If the value is null or there is no return value, is returned.

Arguments must be a number (which will be converted to a System.Int64), a System.Boolean, a System.String or a IWebElement. An exception will be thrown if the arguments do not meet these criteria. The arguments will be made available to the JavaScript via the "arguments" magic variable, as if the function were called via "Function.apply"

FindElement ( By by ) : IWebElement

Find the first IWebElement using the given method.

FindElements ( By by ) : ReadOnlyCollection

Find all IWebElements within the current context using the given mechanism.

GetScreenshot ( ) : Screenshot

Gets a Screenshot object representing the image of the page on the screen.

Manage ( ) : IOptions

Instructs the driver to change its settings.

Navigate ( ) : INavigation

Instructs the driver to navigate the browser to another location.

Quit ( ) : void

Quits this driver, closing every associated window.

SwitchTo ( ) : ITargetLocator

Instructs the driver to send future commands to a different frame or window.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Frees all managed and, optionally, unmanaged resources used by this instance.

OnElementClicked ( OpenQA.Selenium.Support.Events.WebElementEventArgs e ) : void

Raises the ElementClicked event.

OnElementClicking ( OpenQA.Selenium.Support.Events.WebElementEventArgs e ) : void

Raises the ElementClicking event.

OnElementValueChanged ( OpenQA.Selenium.Support.Events.WebElementEventArgs e ) : void

Raises the ElementValueChanged event.

OnElementValueChanging ( OpenQA.Selenium.Support.Events.WebElementEventArgs e ) : void

Raises the ElementValueChanging event.

OnException ( OpenQA.Selenium.Support.Events.WebDriverExceptionEventArgs e ) : void

Raises the ExceptionThrown event.

OnFindElementCompleted ( OpenQA.Selenium.Support.Events.FindElementEventArgs e ) : void

Raises the FindElementCompleted event.

OnFindingElement ( OpenQA.Selenium.Support.Events.FindElementEventArgs e ) : void

Raises the FindingElement event.

OnNavigated ( WebDriverNavigationEventArgs e ) : void

Raises the Navigated event.

OnNavigatedBack ( WebDriverNavigationEventArgs e ) : void

Raises the NavigatedBack event.

OnNavigatedForward ( WebDriverNavigationEventArgs e ) : void

Raises the NavigatedForward event.

OnNavigating ( WebDriverNavigationEventArgs e ) : void

Raises the Navigating event.

OnNavigatingBack ( WebDriverNavigationEventArgs e ) : void

Raises the NavigatingBack event.

OnNavigatingForward ( WebDriverNavigationEventArgs e ) : void

Raises the NavigatingForward event.

OnScriptExecuted ( OpenQA.Selenium.Support.Events.WebDriverScriptEventArgs e ) : void

Raises the ScriptExecuted event.

OnScriptExecuting ( OpenQA.Selenium.Support.Events.WebDriverScriptEventArgs e ) : void

Raises the ScriptExecuting event.

비공개 메소드들

메소드 설명
UnwrapElementArguments ( object args ) : object[]
WrapElement ( IWebElement underlyingElement ) : IWebElement

메소드 상세

Close() 공개 메소드

Close the current window, quitting the browser if it is the last window currently open.
public Close ( ) : void
리턴 void

Dispose() 공개 메소드

Frees all managed and unmanaged resources used by this instance.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Frees all managed and, optionally, unmanaged resources used by this instance.
protected Dispose ( bool disposing ) : void
disposing bool to dispose of only managed resources; /// to dispose of managed and unmanaged resources.
리턴 void

EventFiringWebDriver() 공개 메소드

Initializes a new instance of the EventFiringWebDriver class.
public EventFiringWebDriver ( IWebDriver parentDriver ) : System
parentDriver IWebDriver The driver to register events for.
리턴 System

ExecuteAsyncScript() 공개 메소드

Executes JavaScript asynchronously in the context of the currently selected frame or window.
public ExecuteAsyncScript ( string script ) : object
script string The JavaScript code to execute.
리턴 object

ExecuteScript() 공개 메소드

Executes JavaScript in the context of the currently selected frame or window.

The ExecuteScriptmethod executes JavaScript in the context of the currently selected frame or window. This means that "document" will refer to the current document. If the script has a return value, then the following steps will be taken:

For an HTML element, this method returns a IWebElement For a number, a System.Int64 is returned For a boolean, a System.Boolean is returned For all other cases a System.String is returned. For an array,we check the first element, and attempt to return a List{T} of that type, following the rules above. Nested lists are not supported. If the value is null or there is no return value, is returned.

Arguments must be a number (which will be converted to a System.Int64), a System.Boolean, a System.String or a IWebElement. An exception will be thrown if the arguments do not meet these criteria. The arguments will be made available to the JavaScript via the "arguments" magic variable, as if the function were called via "Function.apply"

public ExecuteScript ( string script ) : object
script string The JavaScript code to execute.
리턴 object

FindElement() 공개 메소드

Find the first IWebElement using the given method.
If no element matches the criteria.
public FindElement ( By by ) : IWebElement
by By The locating mechanism to use.
리턴 IWebElement

FindElements() 공개 메소드

Find all IWebElements within the current context using the given mechanism.
public FindElements ( By by ) : ReadOnlyCollection
by By The locating mechanism to use.
리턴 ReadOnlyCollection

GetScreenshot() 공개 메소드

Gets a Screenshot object representing the image of the page on the screen.
public GetScreenshot ( ) : Screenshot
리턴 Screenshot

Manage() 공개 메소드

Instructs the driver to change its settings.
public Manage ( ) : IOptions
리턴 IOptions

Navigate() 공개 메소드

Instructs the driver to navigate the browser to another location.
public Navigate ( ) : INavigation
리턴 INavigation

OnElementClicked() 보호된 메소드

Raises the ElementClicked event.
protected OnElementClicked ( OpenQA.Selenium.Support.Events.WebElementEventArgs e ) : void
e OpenQA.Selenium.Support.Events.WebElementEventArgs A that contains the event data.
리턴 void

OnElementClicking() 보호된 메소드

Raises the ElementClicking event.
protected OnElementClicking ( OpenQA.Selenium.Support.Events.WebElementEventArgs e ) : void
e OpenQA.Selenium.Support.Events.WebElementEventArgs A that contains the event data.
리턴 void

OnElementValueChanged() 보호된 메소드

Raises the ElementValueChanged event.
protected OnElementValueChanged ( OpenQA.Selenium.Support.Events.WebElementEventArgs e ) : void
e OpenQA.Selenium.Support.Events.WebElementEventArgs A that contains the event data.
리턴 void

OnElementValueChanging() 보호된 메소드

Raises the ElementValueChanging event.
protected OnElementValueChanging ( OpenQA.Selenium.Support.Events.WebElementEventArgs e ) : void
e OpenQA.Selenium.Support.Events.WebElementEventArgs A that contains the event data.
리턴 void

OnException() 보호된 메소드

Raises the ExceptionThrown event.
protected OnException ( OpenQA.Selenium.Support.Events.WebDriverExceptionEventArgs e ) : void
e OpenQA.Selenium.Support.Events.WebDriverExceptionEventArgs A that contains the event data.
리턴 void

OnFindElementCompleted() 보호된 메소드

Raises the FindElementCompleted event.
protected OnFindElementCompleted ( OpenQA.Selenium.Support.Events.FindElementEventArgs e ) : void
e OpenQA.Selenium.Support.Events.FindElementEventArgs A that contains the event data.
리턴 void

OnFindingElement() 보호된 메소드

Raises the FindingElement event.
protected OnFindingElement ( OpenQA.Selenium.Support.Events.FindElementEventArgs e ) : void
e OpenQA.Selenium.Support.Events.FindElementEventArgs A that contains the event data.
리턴 void

OnNavigated() 보호된 메소드

Raises the Navigated event.
protected OnNavigated ( WebDriverNavigationEventArgs e ) : void
e WebDriverNavigationEventArgs A that contains the event data.
리턴 void

OnNavigatedBack() 보호된 메소드

Raises the NavigatedBack event.
protected OnNavigatedBack ( WebDriverNavigationEventArgs e ) : void
e WebDriverNavigationEventArgs A that contains the event data.
리턴 void

OnNavigatedForward() 보호된 메소드

Raises the NavigatedForward event.
protected OnNavigatedForward ( WebDriverNavigationEventArgs e ) : void
e WebDriverNavigationEventArgs A that contains the event data.
리턴 void

OnNavigating() 보호된 메소드

Raises the Navigating event.
protected OnNavigating ( WebDriverNavigationEventArgs e ) : void
e WebDriverNavigationEventArgs A that contains the event data.
리턴 void

OnNavigatingBack() 보호된 메소드

Raises the NavigatingBack event.
protected OnNavigatingBack ( WebDriverNavigationEventArgs e ) : void
e WebDriverNavigationEventArgs A that contains the event data.
리턴 void

OnNavigatingForward() 보호된 메소드

Raises the NavigatingForward event.
protected OnNavigatingForward ( WebDriverNavigationEventArgs e ) : void
e WebDriverNavigationEventArgs A that contains the event data.
리턴 void

OnScriptExecuted() 보호된 메소드

Raises the ScriptExecuted event.
protected OnScriptExecuted ( OpenQA.Selenium.Support.Events.WebDriverScriptEventArgs e ) : void
e OpenQA.Selenium.Support.Events.WebDriverScriptEventArgs A that contains the event data.
리턴 void

OnScriptExecuting() 보호된 메소드

Raises the ScriptExecuting event.
protected OnScriptExecuting ( OpenQA.Selenium.Support.Events.WebDriverScriptEventArgs e ) : void
e OpenQA.Selenium.Support.Events.WebDriverScriptEventArgs A that contains the event data.
리턴 void

Quit() 공개 메소드

Quits this driver, closing every associated window.
public Quit ( ) : void
리턴 void

SwitchTo() 공개 메소드

Instructs the driver to send future commands to a different frame or window.
public SwitchTo ( ) : ITargetLocator
리턴 ITargetLocator