public class RemoteWebDriver
extends java.lang.Object
implements org.openqa.selenium.WebDriver, org.openqa.selenium.JavascriptExecutor, org.openqa.selenium.internal.FindsById, org.openqa.selenium.internal.FindsByClassName, org.openqa.selenium.internal.FindsByLinkText, org.openqa.selenium.internal.FindsByName, org.openqa.selenium.internal.FindsByCssSelector, org.openqa.selenium.internal.FindsByTagName, org.openqa.selenium.internal.FindsByXPath, org.openqa.selenium.interactions.HasInputDevices, org.openqa.selenium.HasCapabilities, org.openqa.selenium.interactions.Interactive, org.openqa.selenium.TakesScreenshot
| Modifier and Type | Class and Description |
|---|---|
protected class |
RemoteWebDriver.RemoteTargetLocator |
protected class |
RemoteWebDriver.RemoteWebDriverOptions |
static class |
RemoteWebDriver.When |
org.openqa.selenium.WebDriver.ImeHandler, org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window| Modifier | Constructor and Description |
|---|---|
protected |
RemoteWebDriver() |
|
RemoteWebDriver(org.openqa.selenium.Capabilities capabilities) |
|
RemoteWebDriver(CommandExecutor executor,
org.openqa.selenium.Capabilities capabilities) |
|
RemoteWebDriver(java.net.URL remoteAddress,
org.openqa.selenium.Capabilities capabilities) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected Response |
execute(java.lang.String command) |
protected Response |
execute(java.lang.String driverCommand,
java.util.Map<java.lang.String,?> parameters) |
java.lang.Object |
executeAsyncScript(java.lang.String script,
java.lang.Object... args) |
java.lang.Object |
executeScript(java.lang.String script,
java.lang.Object... args) |
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.By by) |
protected org.openqa.selenium.WebElement |
findElement(java.lang.String by,
java.lang.String using) |
org.openqa.selenium.WebElement |
findElementByClassName(java.lang.String using) |
org.openqa.selenium.WebElement |
findElementByCssSelector(java.lang.String using) |
org.openqa.selenium.WebElement |
findElementById(java.lang.String using) |
org.openqa.selenium.WebElement |
findElementByLinkText(java.lang.String using) |
org.openqa.selenium.WebElement |
findElementByName(java.lang.String using) |
org.openqa.selenium.WebElement |
findElementByPartialLinkText(java.lang.String using) |
org.openqa.selenium.WebElement |
findElementByTagName(java.lang.String using) |
org.openqa.selenium.WebElement |
findElementByXPath(java.lang.String using) |
java.util.List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.By by) |
protected java.util.List<org.openqa.selenium.WebElement> |
findElements(java.lang.String by,
java.lang.String using) |
java.util.List<org.openqa.selenium.WebElement> |
findElementsByClassName(java.lang.String using) |
java.util.List<org.openqa.selenium.WebElement> |
findElementsByCssSelector(java.lang.String using) |
java.util.List<org.openqa.selenium.WebElement> |
findElementsById(java.lang.String using) |
java.util.List<org.openqa.selenium.WebElement> |
findElementsByLinkText(java.lang.String using) |
java.util.List<org.openqa.selenium.WebElement> |
findElementsByName(java.lang.String using) |
java.util.List<org.openqa.selenium.WebElement> |
findElementsByPartialLinkText(java.lang.String using) |
java.util.List<org.openqa.selenium.WebElement> |
findElementsByTagName(java.lang.String using) |
java.util.List<org.openqa.selenium.WebElement> |
findElementsByXPath(java.lang.String using) |
void |
get(java.lang.String url) |
org.openqa.selenium.Capabilities |
getCapabilities() |
CommandExecutor |
getCommandExecutor() |
java.lang.String |
getCurrentUrl() |
protected JsonToWebElementConverter |
getElementConverter() |
ErrorHandler |
getErrorHandler() |
protected ExecuteMethod |
getExecuteMethod() |
FileDetector |
getFileDetector() |
org.openqa.selenium.interactions.Keyboard |
getKeyboard() |
org.openqa.selenium.interactions.Mouse |
getMouse() |
java.lang.String |
getPageSource() |
<X> X |
getScreenshotAs(org.openqa.selenium.OutputType<X> outputType) |
SessionId |
getSessionId() |
java.lang.String |
getTitle() |
java.lang.String |
getWindowHandle() |
java.util.Set<java.lang.String> |
getWindowHandles() |
protected void |
log(SessionId sessionId,
java.lang.String commandName,
java.lang.Object toLog,
RemoteWebDriver.When when)
Override this to be notified at key points in the execution of a command.
|
org.openqa.selenium.WebDriver.Options |
manage() |
org.openqa.selenium.WebDriver.Navigation |
navigate() |
void |
perform(java.util.Collection<org.openqa.selenium.interactions.Sequence> actions) |
void |
quit() |
void |
resetInputState() |
protected void |
setCommandExecutor(CommandExecutor executor) |
protected void |
setElementConverter(JsonToWebElementConverter converter) |
void |
setErrorHandler(ErrorHandler handler) |
void |
setFileDetector(FileDetector detector)
Set the file detector to be used when sending keyboard input.
|
protected void |
setFoundBy(org.openqa.selenium.SearchContext context,
org.openqa.selenium.WebElement element,
java.lang.String by,
java.lang.String using) |
void |
setLogLevel(java.util.logging.Level level)
Sets the RemoteWebDriver's client log level.
|
protected void |
setSessionId(java.lang.String opaqueKey) |
protected void |
startClient()
Deprecated.
No longer used, as behaviour is now in
CommandExecutor instances. |
protected void |
startClient(org.openqa.selenium.Capabilities capabilities)
Deprecated.
No longer used, as behaviour is now in
CommandExecutor instances. |
protected void |
startSession(org.openqa.selenium.Capabilities capabilities) |
protected void |
stopClient()
Deprecated.
No longer used, as behaviour is now in
CommandExecutor instances. |
protected void |
stopClient(org.openqa.selenium.Capabilities capabilities)
Deprecated.
No longer used, as behaviour is now in
CommandExecutor instances. |
org.openqa.selenium.WebDriver.TargetLocator |
switchTo() |
java.lang.String |
toString() |
protected RemoteWebDriver()
public RemoteWebDriver(org.openqa.selenium.Capabilities capabilities)
public RemoteWebDriver(CommandExecutor executor, org.openqa.selenium.Capabilities capabilities)
public RemoteWebDriver(java.net.URL remoteAddress,
org.openqa.selenium.Capabilities capabilities)
public void setFileDetector(FileDetector detector)
detector - The detector to use. Must not be null.FileDetector,
LocalFileDetector,
UselessFileDetectorpublic SessionId getSessionId()
protected void setSessionId(java.lang.String opaqueKey)
protected void startSession(org.openqa.selenium.Capabilities capabilities)
@Deprecated protected void startClient()
CommandExecutor instances.starting a new session. The default
implementation is a no-op, but subtypes should override this method to define custom behavior.@Deprecated protected void startClient(org.openqa.selenium.Capabilities capabilities)
CommandExecutor instances.starting a new session. The default
implementation is a no-op, but subtypes should override this method to define custom behavior.@Deprecated protected void stopClient()
CommandExecutor instances.quit() command. The default implementation is a no-op,
but subtypes should override this method to define custom behavior.@Deprecated protected void stopClient(org.openqa.selenium.Capabilities capabilities)
CommandExecutor instances.quit() command. The default implementation is a no-op,
but subtypes should override this method to define custom behavior.public ErrorHandler getErrorHandler()
public void setErrorHandler(ErrorHandler handler)
public CommandExecutor getCommandExecutor()
protected void setCommandExecutor(CommandExecutor executor)
public org.openqa.selenium.Capabilities getCapabilities()
getCapabilities in interface org.openqa.selenium.HasCapabilitiespublic void get(java.lang.String url)
get in interface org.openqa.selenium.WebDriverpublic java.lang.String getTitle()
getTitle in interface org.openqa.selenium.WebDriverpublic java.lang.String getCurrentUrl()
getCurrentUrl in interface org.openqa.selenium.WebDriverpublic <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> outputType)
throws org.openqa.selenium.WebDriverException
getScreenshotAs in interface org.openqa.selenium.TakesScreenshotorg.openqa.selenium.WebDriverExceptionpublic java.util.List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
findElements in interface org.openqa.selenium.SearchContextfindElements in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
findElement in interface org.openqa.selenium.SearchContextfindElement in interface org.openqa.selenium.WebDriverprotected org.openqa.selenium.WebElement findElement(java.lang.String by,
java.lang.String using)
protected void setFoundBy(org.openqa.selenium.SearchContext context,
org.openqa.selenium.WebElement element,
java.lang.String by,
java.lang.String using)
protected java.util.List<org.openqa.selenium.WebElement> findElements(java.lang.String by,
java.lang.String using)
public org.openqa.selenium.WebElement findElementById(java.lang.String using)
findElementById in interface org.openqa.selenium.internal.FindsByIdpublic java.util.List<org.openqa.selenium.WebElement> findElementsById(java.lang.String using)
findElementsById in interface org.openqa.selenium.internal.FindsByIdpublic org.openqa.selenium.WebElement findElementByLinkText(java.lang.String using)
findElementByLinkText in interface org.openqa.selenium.internal.FindsByLinkTextpublic java.util.List<org.openqa.selenium.WebElement> findElementsByLinkText(java.lang.String using)
findElementsByLinkText in interface org.openqa.selenium.internal.FindsByLinkTextpublic org.openqa.selenium.WebElement findElementByPartialLinkText(java.lang.String using)
findElementByPartialLinkText in interface org.openqa.selenium.internal.FindsByLinkTextpublic java.util.List<org.openqa.selenium.WebElement> findElementsByPartialLinkText(java.lang.String using)
findElementsByPartialLinkText in interface org.openqa.selenium.internal.FindsByLinkTextpublic org.openqa.selenium.WebElement findElementByTagName(java.lang.String using)
findElementByTagName in interface org.openqa.selenium.internal.FindsByTagNamepublic java.util.List<org.openqa.selenium.WebElement> findElementsByTagName(java.lang.String using)
findElementsByTagName in interface org.openqa.selenium.internal.FindsByTagNamepublic org.openqa.selenium.WebElement findElementByName(java.lang.String using)
findElementByName in interface org.openqa.selenium.internal.FindsByNamepublic java.util.List<org.openqa.selenium.WebElement> findElementsByName(java.lang.String using)
findElementsByName in interface org.openqa.selenium.internal.FindsByNamepublic org.openqa.selenium.WebElement findElementByClassName(java.lang.String using)
findElementByClassName in interface org.openqa.selenium.internal.FindsByClassNamepublic java.util.List<org.openqa.selenium.WebElement> findElementsByClassName(java.lang.String using)
findElementsByClassName in interface org.openqa.selenium.internal.FindsByClassNamepublic org.openqa.selenium.WebElement findElementByCssSelector(java.lang.String using)
findElementByCssSelector in interface org.openqa.selenium.internal.FindsByCssSelectorpublic java.util.List<org.openqa.selenium.WebElement> findElementsByCssSelector(java.lang.String using)
findElementsByCssSelector in interface org.openqa.selenium.internal.FindsByCssSelectorpublic org.openqa.selenium.WebElement findElementByXPath(java.lang.String using)
findElementByXPath in interface org.openqa.selenium.internal.FindsByXPathpublic java.util.List<org.openqa.selenium.WebElement> findElementsByXPath(java.lang.String using)
findElementsByXPath in interface org.openqa.selenium.internal.FindsByXPathpublic java.lang.String getPageSource()
getPageSource in interface org.openqa.selenium.WebDriverpublic void close()
close in interface org.openqa.selenium.WebDriverpublic void quit()
quit in interface org.openqa.selenium.WebDriverpublic java.util.Set<java.lang.String> getWindowHandles()
getWindowHandles in interface org.openqa.selenium.WebDriverpublic java.lang.String getWindowHandle()
getWindowHandle in interface org.openqa.selenium.WebDriverpublic java.lang.Object executeScript(java.lang.String script,
java.lang.Object... args)
executeScript in interface org.openqa.selenium.JavascriptExecutorpublic java.lang.Object executeAsyncScript(java.lang.String script,
java.lang.Object... args)
executeAsyncScript in interface org.openqa.selenium.JavascriptExecutorpublic org.openqa.selenium.WebDriver.TargetLocator switchTo()
switchTo in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.WebDriver.Navigation navigate()
navigate in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.WebDriver.Options manage()
manage in interface org.openqa.selenium.WebDriverprotected void setElementConverter(JsonToWebElementConverter converter)
protected JsonToWebElementConverter getElementConverter()
public void setLogLevel(java.util.logging.Level level)
level - The log level to use.protected Response execute(java.lang.String driverCommand, java.util.Map<java.lang.String,?> parameters)
protected Response execute(java.lang.String command)
protected ExecuteMethod getExecuteMethod()
public void perform(java.util.Collection<org.openqa.selenium.interactions.Sequence> actions)
perform in interface org.openqa.selenium.interactions.Interactivepublic void resetInputState()
resetInputState in interface org.openqa.selenium.interactions.Interactivepublic org.openqa.selenium.interactions.Keyboard getKeyboard()
getKeyboard in interface org.openqa.selenium.interactions.HasInputDevicespublic org.openqa.selenium.interactions.Mouse getMouse()
getMouse in interface org.openqa.selenium.interactions.HasInputDevicesprotected void log(SessionId sessionId, java.lang.String commandName, java.lang.Object toLog, RemoteWebDriver.When when)
sessionId - the session id.commandName - the command that is being executed.toLog - any data that might be interesting.when - verb tense of "Execute" to prefix messagepublic FileDetector getFileDetector()
public java.lang.String toString()
toString in class java.lang.Object