WebDriver Methods

The WebDriver type exposes the following members.

Methods
  NameDescription
Public methodActiveElement
Returns the element with focus, or BODY if nothing has focus.
Public methodAddArgument
Add an argument to be appended to the command line to launch the browser.
Public methodAddExtension
Add an extension to the browser (For Firefox and Chrome only)
Public methodCacheStatus
Get the status of the html5 application cache.
Public methodClose
Closes the current window.
Public methodDispose
Release the resources.
Public methodCode exampleExecuteAsyncScript
Execute an asynchronous piece of JavaScript in the context of the current frame or window.
Public methodCode exampleExecuteScript
Execute a piece of JavaScript in the context of the currently selected frame or window
Public methodCode exampleFindElement
Find the first WebElement using the given method.
(Inherited from SearchContext.)
Public methodFindElementBy
Finds the first child element matching the given mechanism and value.
(Inherited from SearchContext.)
Public methodFindElementByClass
Finds the first element matching the specified CSS class.
(Inherited from SearchContext.)
Public methodFindElementByCss
Finds the first element matching the specified CSS selector.
(Inherited from SearchContext.)
Public methodFindElementById
Finds the first element matching the specified id.
(Inherited from SearchContext.)
Public methodFindElementByLinkText
Finds the first element matching the specified link text.
(Inherited from SearchContext.)
Public methodFindElementByName
Finds the first element matching the specified name.
(Inherited from SearchContext.)
Public methodFindElementByPartialLinkText
Finds the first of elements that match the part of the link text supplied
(Inherited from SearchContext.)
Public methodFindElementByTag
Finds the first element matching the specified tag name.
(Inherited from SearchContext.)
Public methodFindElementByXPath
Finds the first element matching the specified XPath query.
(Inherited from SearchContext.)
Public methodCode exampleFindElements
Find all elements within the current context using the given mechanism.
(Inherited from SearchContext.)
Public methodFindElementsBy
Finds all child elements matching the given mechanism and value.
(Inherited from SearchContext.)
Public methodFindElementsByClass
Finds elements matching the specified CSS class.
(Inherited from SearchContext.)
Public methodFindElementsByCss
Finds elements matching the specified CSS selector.
(Inherited from SearchContext.)
Public methodFindElementsById
Finds elements matching the specified id.
(Inherited from SearchContext.)
Public methodFindElementsByLinkText
Finds elements matching the specified link text.
(Inherited from SearchContext.)
Public methodFindElementsByName
Finds elements matching the specified name.
(Inherited from SearchContext.)
Public methodFindElementsByPartialLinkText
Finds the first of elements that match the part of the link text supplied
(Inherited from SearchContext.)
Public methodFindElementsByTag
Finds elements matching the specified tag name.
(Inherited from SearchContext.)
Public methodFindElementsByXPath
Finds elements matching the specified XPath query.
(Inherited from SearchContext.)
Public methodGet
Loads a web page in the current browser session. Same as Open method.
Public methodGetClipBoard
Returns the text from the Clipboard
Public methodGoBack
Goes one step backward in the browser history.
Public methodGoForward
Goes one step forward in the browser history.
Public methodIsElementPresent
"Verifies that the specified element is somewhere on the page."
(Inherited from SearchContext.)
Public methodPageSource
Gets the source of the page last loaded by the browser.
Public methodPageSourceMatch
Returns the first occurence matching the regular expression.
Public methodPageSourceMatches
Returns all the occurences matching the regular expression.
Public methodQuit
Close the Browser and Dispose of WebDriver
Public methodRefresh
Refreshes the current page.
Public methodCode exampleSend
Sends a customized command
Public methodCode exampleSendKeys
Sends a sequence of keystrokes to the browser.
Public methodSetBinary
Set the path to the browser executable to use
Public methodSetCapability
Set a specific capability for the webdriver
Public methodSetClipBoard
Sets the text in the Clipboard
Public methodSetPreference
Set a specific preference for the firefox webdriver
Public methodCode exampleSetProfile
Set a specific profile for the firefox webdriver
Public methodCode exampleStart
Starts a new Selenium testing session
Public methodCode exampleStartRemotely
Starts remotely a new Selenium testing session
Public methodSwitchToAlert
Switch focus to an alert on the page.
Public methodSwitchToDefaultContent
Select either the first frame on the page or the main document when a page contains iFrames.
Public methodSwitchToFrame
Switch focus to the specified frame, by index(zero based), name or WebElement.
Public methodSwitchToNextWindow
Switch the focus to the next window.
Public methodSwitchToParentFrame
Select the parent frame of the currently selected frame.
Public methodSwitchToPreviousWindow
Switch the focus to the previous window
Public methodSwitchToWindowByName
Switch focus to the specified window by name.
Public methodSwitchToWindowByTitle
Switch focus to the specified window by title.
Public methodTakeScreenshot
Takes the screenshot of the current window
Public methodUntilT
Waits for the delegate function to return not null or true
Public methodWait
Wait the specified time in millisecond before executing the next command
Public methodWaitForScript
Waits for a piece of JavaScript to return true or not null.
Public methodWaitNotElement
Waits for an element to be missing.
(Inherited from SearchContext.)
Top
See Also