C# 클래스 OpenQA.Selenium.Remote.RemoteWebDriver

Provides a way to use the driver through
상속: IWebDriver, ISearchContext, IJavaScriptExecutor, IFindsById, IFindsByClassName, IFindsByLinkText, IFindsByName, IFindsByTagName, IFindsByXPath, IFindsByPartialLinkText, IFindsByCssSelector, IHasInputDevices, IHasCapabilities, IAllowsFileDetection
파일 보기 프로젝트 열기: asynchrony/Selenium2 1 사용 예제들

공개 메소드들

메소드 설명
Close ( ) : void

Closes the Browser

Dispose ( ) : void

Dispose the RemoteWebDriver Instance

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

FindElement ( By by ) : IWebElement

Finds the first element in the page that matches the By object

FindElementByClassName ( string className ) : IWebElement

Finds the first element in the page that matches the CSS Class supplied

FindElementByCssSelector ( string cssSelector ) : IWebElement

Finds the first element matching the specified CSS selector.

FindElementById ( string id ) : IWebElement

Finds the first element in the page that matches the ID supplied

FindElementByLinkText ( string linkText ) : IWebElement

Finds the first of elements that match the link text supplied

FindElementByName ( string name ) : IWebElement

Finds the first of elements that match the name supplied

FindElementByPartialLinkText ( string partialLinkText ) : IWebElement

Finds the first of elements that match the part of the link text supplied

FindElementByTagName ( string tagName ) : IWebElement

Finds the first of elements that match the DOM Tag supplied

FindElementByXPath ( string xpath ) : IWebElement

Finds the first of elements that match the XPath supplied

FindElements ( By by ) : ReadOnlyCollection

Finds the elements on the page by using the By object and returns a ReadOnlyCollection of the Elements on the page

FindElementsByClassName ( string className ) : ReadOnlyCollection

Finds a list of elements that match the classname supplied

FindElementsByCssSelector ( string cssSelector ) : ReadOnlyCollection

Finds all elements matching the specified CSS selector.

FindElementsById ( string id ) : ReadOnlyCollection

Finds the first element in the page that matches the ID supplied

FindElementsByLinkText ( string linkText ) : ReadOnlyCollection

Finds a list of elements that match the link text supplied

FindElementsByName ( string name ) : ReadOnlyCollection

Finds a list of elements that match the name supplied

FindElementsByPartialLinkText ( string partialLinkText ) : ReadOnlyCollection

Finds a list of elements that match the classname supplied

FindElementsByTagName ( string tagName ) : ReadOnlyCollection

Finds a list of elements that match the DOM Tag supplied

FindElementsByXPath ( string xpath ) : ReadOnlyCollection

Finds a list of elements that match the XPath supplied

Manage ( ) : IOptions

Method For getting an object to set the Speen

Navigate ( ) : INavigation

Method to allow you to Navigate with WebDriver

Quit ( ) : void

Close the Browser and Dispose of WebDriver

RemoteWebDriver ( ICapabilities desiredCapabilities ) : System

Initializes a new instance of the RemoteWebDriver class. This constructor defaults proxy to http://127.0.0.1:4444/wd/hub

RemoteWebDriver ( ICommandExecutor commandExecutor, ICapabilities desiredCapabilities ) : System

Initializes a new instance of the RemoteWebDriver class

RemoteWebDriver ( Uri remoteAddress, ICapabilities desiredCapabilities ) : System

Initializes a new instance of the RemoteWebDriver class

RemoteWebDriver ( Uri remoteAddress, ICapabilities desiredCapabilities, System.TimeSpan commandTimeout ) : System

Initializes a new instance of the RemoteWebDriver class using the specified remote address, desired capabilties, and command timeout.

SwitchTo ( ) : ITargetLocator

Method to give you access to switch frames and windows

보호된 메소드들

메소드 설명
CreateElement ( string elementId ) : RemoteWebElement

Creates a RemoteWebElement with the specified ID.

Dispose ( bool disposing ) : void

Stops the client from running

Execute ( DriverCommand driverCommandToExecute, object>.Dictionary parameters ) : OpenQA.Selenium.Remote.Response

Executes a command with this driver .

FindElement ( string mechanism, string value ) : IWebElement

Finds an element matching the given mechanism and value.

FindElements ( string mechanism, string value ) : ReadOnlyCollection

Finds all elements matching the given mechanism and value.

StartClient ( ) : void

Starts the command executor, enabling communication with the browser.

StartSession ( ICapabilities desiredCapabilities ) : void

Starts a session with the driver

StopClient ( ) : void

Stops the command executor, ending further communication with the browser.

비공개 메소드들

메소드 설명
ConvertArgumentsToJavaScriptObjects ( object args ) : object[]
ConvertObjectToJavaScriptObject ( object arg ) : object
ExecuteScriptInternal ( string script, bool async ) : object
GetElementFromResponse ( OpenQA.Selenium.Remote.Response response ) : IWebElement

Find the element in the response

GetElementsFromResponse ( OpenQA.Selenium.Remote.Response response ) : ReadOnlyCollection

Finds the elements that are in the response

InternalExecute ( DriverCommand driverCommandToExecute, object>.Dictionary parameters ) : OpenQA.Selenium.Remote.Response

Executes commands with the driver

ParseJavaScriptReturnValue ( object responseValue ) : object
UnpackAndThrowOnError ( OpenQA.Selenium.Remote.Response errorResponse ) : void

메소드 상세

Close() 공개 메소드

Closes the Browser
public Close ( ) : void
리턴 void

CreateElement() 보호된 메소드

Creates a RemoteWebElement with the specified ID.
protected CreateElement ( string elementId ) : RemoteWebElement
elementId string The ID of this element.
리턴 RemoteWebElement

Dispose() 공개 메소드

Dispose the RemoteWebDriver Instance
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Stops the client from running
protected Dispose ( bool disposing ) : void
disposing bool if its in the process of disposing
리턴 void

Execute() 보호된 메소드

Executes a command with this driver .
protected Execute ( DriverCommand driverCommandToExecute, object>.Dictionary parameters ) : OpenQA.Selenium.Remote.Response
driverCommandToExecute DriverCommand A value representing the command to execute.
parameters object>.Dictionary A containing the names and values of the parameters of the command.
리턴 OpenQA.Selenium.Remote.Response

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
public ExecuteScript ( string script ) : object
script string The JavaScript code to execute.
리턴 object

FindElement() 공개 메소드

Finds the first element in the page that matches the By object
public FindElement ( By by ) : IWebElement
by By By mechanism to find the object
리턴 IWebElement

FindElement() 보호된 메소드

Finds an element matching the given mechanism and value.
protected FindElement ( string mechanism, string value ) : IWebElement
mechanism string The mechanism by which to find the element.
value string The value to use to search for the element.
리턴 IWebElement

FindElementByClassName() 공개 메소드

Finds the first element in the page that matches the CSS Class supplied
public FindElementByClassName ( string className ) : IWebElement
className string className of the
리턴 IWebElement

FindElementByCssSelector() 공개 메소드

Finds the first element matching the specified CSS selector.
public FindElementByCssSelector ( string cssSelector ) : IWebElement
cssSelector string The CSS selector to match.
리턴 IWebElement

FindElementById() 공개 메소드

Finds the first element in the page that matches the ID supplied
public FindElementById ( string id ) : IWebElement
id string ID of the element
리턴 IWebElement

FindElementByLinkText() 공개 메소드

Finds the first of elements that match the link text supplied
public FindElementByLinkText ( string linkText ) : IWebElement
linkText string Link text of element
리턴 IWebElement

FindElementByName() 공개 메소드

Finds the first of elements that match the name supplied
public FindElementByName ( string name ) : IWebElement
name string Name of the element on the page
리턴 IWebElement

FindElementByPartialLinkText() 공개 메소드

Finds the first of elements that match the part of the link text supplied
public FindElementByPartialLinkText ( string partialLinkText ) : IWebElement
partialLinkText string part of the link text
리턴 IWebElement

FindElementByTagName() 공개 메소드

Finds the first of elements that match the DOM Tag supplied
public FindElementByTagName ( string tagName ) : IWebElement
tagName string DOM tag Name of the element being searched
리턴 IWebElement

FindElementByXPath() 공개 메소드

Finds the first of elements that match the XPath supplied
public FindElementByXPath ( string xpath ) : IWebElement
xpath string xpath to the element
리턴 IWebElement

FindElements() 공개 메소드

Finds the elements on the page by using the By object and returns a ReadOnlyCollection of the Elements on the page
public FindElements ( By by ) : ReadOnlyCollection
by By By mechanism to find the element
리턴 ReadOnlyCollection

FindElements() 보호된 메소드

Finds all elements matching the given mechanism and value.
protected FindElements ( string mechanism, string value ) : ReadOnlyCollection
mechanism string The mechanism by which to find the elements.
value string The value to use to search for the elements.
리턴 ReadOnlyCollection

FindElementsByClassName() 공개 메소드

Finds a list of elements that match the classname supplied
public FindElementsByClassName ( string className ) : ReadOnlyCollection
className string CSS class Name on the element
리턴 ReadOnlyCollection

FindElementsByCssSelector() 공개 메소드

Finds all elements matching the specified CSS selector.
public FindElementsByCssSelector ( string cssSelector ) : ReadOnlyCollection
cssSelector string The CSS selector to match.
리턴 ReadOnlyCollection

FindElementsById() 공개 메소드

Finds the first element in the page that matches the ID supplied
public FindElementsById ( string id ) : ReadOnlyCollection
id string ID of the Element
리턴 ReadOnlyCollection

FindElementsByLinkText() 공개 메소드

Finds a list of elements that match the link text supplied
public FindElementsByLinkText ( string linkText ) : ReadOnlyCollection
linkText string Link text of element
리턴 ReadOnlyCollection

FindElementsByName() 공개 메소드

Finds a list of elements that match the name supplied
public FindElementsByName ( string name ) : ReadOnlyCollection
name string Name of element
리턴 ReadOnlyCollection

FindElementsByPartialLinkText() 공개 메소드

Finds a list of elements that match the classname supplied
public FindElementsByPartialLinkText ( string partialLinkText ) : ReadOnlyCollection
partialLinkText string part of the link text
리턴 ReadOnlyCollection

FindElementsByTagName() 공개 메소드

Finds a list of elements that match the DOM Tag supplied
public FindElementsByTagName ( string tagName ) : ReadOnlyCollection
tagName string DOM tag Name of element being searched
리턴 ReadOnlyCollection

FindElementsByXPath() 공개 메소드

Finds a list of elements that match the XPath supplied
public FindElementsByXPath ( string xpath ) : ReadOnlyCollection
xpath string xpath to the element
리턴 ReadOnlyCollection

Manage() 공개 메소드

Method For getting an object to set the Speen
public Manage ( ) : IOptions
리턴 IOptions

Navigate() 공개 메소드

Method to allow you to Navigate with WebDriver
public Navigate ( ) : INavigation
리턴 INavigation

Quit() 공개 메소드

Close the Browser and Dispose of WebDriver
public Quit ( ) : void
리턴 void

RemoteWebDriver() 공개 메소드

Initializes a new instance of the RemoteWebDriver class. This constructor defaults proxy to http://127.0.0.1:4444/wd/hub
public RemoteWebDriver ( ICapabilities desiredCapabilities ) : System
desiredCapabilities ICapabilities An object containing the desired capabilities of the browser.
리턴 System

RemoteWebDriver() 공개 메소드

Initializes a new instance of the RemoteWebDriver class
public RemoteWebDriver ( ICommandExecutor commandExecutor, ICapabilities desiredCapabilities ) : System
commandExecutor ICommandExecutor An object which executes commands for the driver.
desiredCapabilities ICapabilities An object containing the desired capabilities of the browser.
리턴 System

RemoteWebDriver() 공개 메소드

Initializes a new instance of the RemoteWebDriver class
public RemoteWebDriver ( Uri remoteAddress, ICapabilities desiredCapabilities ) : System
remoteAddress System.Uri URI containing the address of the WebDriver remote server (e.g. http://127.0.0.1:4444/wd/hub).
desiredCapabilities ICapabilities An object containing the desired capabilities of the browser.
리턴 System

RemoteWebDriver() 공개 메소드

Initializes a new instance of the RemoteWebDriver class using the specified remote address, desired capabilties, and command timeout.
public RemoteWebDriver ( Uri remoteAddress, ICapabilities desiredCapabilities, System.TimeSpan commandTimeout ) : System
remoteAddress System.Uri URI containing the address of the WebDriver remote server (e.g. http://127.0.0.1:4444/wd/hub).
desiredCapabilities ICapabilities An object containing the desired capabilities of the browser.
commandTimeout System.TimeSpan The maximum amount of time to wait for each command.
리턴 System

StartClient() 보호된 메소드

Starts the command executor, enabling communication with the browser.
protected StartClient ( ) : void
리턴 void

StartSession() 보호된 메소드

Starts a session with the driver
protected StartSession ( ICapabilities desiredCapabilities ) : void
desiredCapabilities ICapabilities Capabilities of the browser
리턴 void

StopClient() 보호된 메소드

Stops the command executor, ending further communication with the browser.
protected StopClient ( ) : void
리턴 void

SwitchTo() 공개 메소드

Method to give you access to switch frames and windows
public SwitchTo ( ) : ITargetLocator
리턴 ITargetLocator