org.openqa.selenium.chrome
Class ChromeDriver
java.lang.Object
org.openqa.selenium.remote.RemoteWebDriver
org.openqa.selenium.chrome.ChromeDriver
- All Implemented Interfaces:
- HasCapabilities, HasInputDevices, FindsByClassName, FindsByCssSelector, FindsById, FindsByLinkText, FindsByName, FindsByTagName, FindsByXPath, JavascriptExecutor, SearchContext, TakesScreenshot, WebDriver
public class ChromeDriver
- extends RemoteWebDriver
- implements TakesScreenshot
Methods inherited from class org.openqa.selenium.remote.RemoteWebDriver |
actionsBuilder, close, execute, executeAsyncScript, executeScript, findElement, findElement, findElementByClassName, findElementByCssSelector, findElementById, findElementByLinkText, findElementByName, findElementByPartialLinkText, findElementByTagName, findElementByXPath, findElements, findElements, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByName, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, get, getCapabilities, getCommandExecutor, getCurrentUrl, getElementConverter, getErrorHandler, getKeyboard, getMouse, getPageSource, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, quit, setCommandExecutor, setElementConverter, startSession, switchTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ACCEPT_UNTRUSTED_CERTIFICATES
public static final boolean ACCEPT_UNTRUSTED_CERTIFICATES
- See Also:
- Constant Field Values
ChromeDriver
public ChromeDriver(ChromeBinary binary)
ChromeDriver
public ChromeDriver(ChromeProfile profile,
ChromeExtension extension)
- Starts up a new instance of Chrome using the specified profile and
extension.
- Parameters:
profile
- The profile to use.extension
- The extension to use.
ChromeDriver
public ChromeDriver()
- Starts up a new instance of Chrome, with the required extension loaded,
and has it connect to a new ChromeCommandExecutor on its port
- See Also:
ChromeDriver(ChromeProfile, ChromeExtension)
startClient
protected void startClient()
- By default will try to load Chrome from system property
webdriver.chrome.bin and the extension from
webdriver.chrome.extensiondir. If the former fails, will try to guess the
path to Chrome. If the latter fails, will try to unzip from the JAR we
hope we're in. If these fail, throws exceptions.
- Overrides:
startClient
in class RemoteWebDriver
stopClient
protected void stopClient()
- Kills the started Chrome process and ChromeCommandExecutor if they exist
- Overrides:
stopClient
in class RemoteWebDriver
execute
protected Response execute(java.lang.String driverCommand,
java.util.Map<java.lang.String,?> parameters)
- Executes a passed command using the current ChromeCommandExecutor
- Overrides:
execute
in class RemoteWebDriver
- Parameters:
driverCommand
- command to executeparameters
- parameters of command being executed
- Returns:
- response to the command (a Response wrapping a null value if none)
isJavascriptEnabled
public boolean isJavascriptEnabled()
- Specified by:
isJavascriptEnabled
in interface JavascriptExecutor
- Overrides:
isJavascriptEnabled
in class RemoteWebDriver
newRemoteWebElement
protected RemoteWebElement newRemoteWebElement()
- Overrides:
newRemoteWebElement
in class RemoteWebDriver
getScreenshotAs
public <X> X getScreenshotAs(OutputType<X> target)
- Specified by:
getScreenshotAs
in interface TakesScreenshot
Copyright © 2011. All Rights Reserved.