public class JBrowserDriver
extends org.openqa.selenium.remote.RemoteWebDriver
See https://github.com/machinepublishers/jbrowserdriver#usage for basic usage info.
Licensed under the Apache License version 2.0.
org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions, org.openqa.selenium.remote.RemoteWebDriver.Whenorg.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| Constructor and Description |
|---|
JBrowserDriver()
Constructs a browser with default settings, UTC timezone, and no proxy.
|
JBrowserDriver(org.openqa.selenium.Capabilities capabilities)
Use
Settings.builder() ...buildCapabilities() to create settings to pass to this constructor. |
JBrowserDriver(Settings settings)
Use
Settings.builder() ...build() to create settings to pass to this constructor. |
| Modifier and Type | Method and Description |
|---|---|
File |
attachmentsDir() |
File |
cacheDir() |
void |
close() |
Object |
executeAsyncScript(String script,
Object... args) |
Object |
executeScript(String script,
Object... args) |
protected void |
finalize() |
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.By by) |
org.openqa.selenium.WebElement |
findElementByClassName(String cssClass) |
org.openqa.selenium.WebElement |
findElementByCssSelector(String expr) |
org.openqa.selenium.WebElement |
findElementById(String id) |
org.openqa.selenium.WebElement |
findElementByLinkText(String text) |
org.openqa.selenium.WebElement |
findElementByName(String name) |
org.openqa.selenium.WebElement |
findElementByPartialLinkText(String text) |
org.openqa.selenium.WebElement |
findElementByTagName(String tagName) |
org.openqa.selenium.WebElement |
findElementByXPath(String expr) |
List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.By by) |
List<org.openqa.selenium.WebElement> |
findElementsByClassName(String cssClass) |
List<org.openqa.selenium.WebElement> |
findElementsByCssSelector(String expr) |
List<org.openqa.selenium.WebElement> |
findElementsById(String id) |
List<org.openqa.selenium.WebElement> |
findElementsByLinkText(String text) |
List<org.openqa.selenium.WebElement> |
findElementsByName(String name) |
List<org.openqa.selenium.WebElement> |
findElementsByPartialLinkText(String text) |
List<org.openqa.selenium.WebElement> |
findElementsByTagName(String tagName) |
List<org.openqa.selenium.WebElement> |
findElementsByXPath(String expr) |
void |
get(String url) |
org.openqa.selenium.Capabilities |
getCapabilities() |
org.openqa.selenium.remote.CommandExecutor |
getCommandExecutor() |
String |
getCurrentUrl() |
org.openqa.selenium.remote.ErrorHandler |
getErrorHandler() |
org.openqa.selenium.remote.FileDetector |
getFileDetector() |
org.openqa.selenium.interactions.Keyboard |
getKeyboard() |
org.openqa.selenium.interactions.Mouse |
getMouse() |
String |
getPageSource() |
<X> X |
getScreenshotAs(org.openqa.selenium.OutputType<X> outputType) |
org.openqa.selenium.remote.SessionId |
getSessionId() |
int |
getStatusCode() |
String |
getTitle() |
String |
getWindowHandle() |
Set<String> |
getWindowHandles() |
void |
init()
Optionally call this method if you want JavaFX initialized and the browser
window opened immediately.
|
static void |
initWorkThread() |
void |
kill() |
org.openqa.selenium.WebDriver.Options |
manage() |
File |
mediaDir() |
org.openqa.selenium.WebDriver.Navigation |
navigate() |
void |
pageWait()
Waits until requests are completed and idle for a certain
amount of time.
|
void |
perform(Collection<org.openqa.selenium.interactions.Sequence> actions) |
void |
quit() |
void |
reset()
Reset the state of the browser.
|
void |
reset(org.openqa.selenium.Capabilities capabilities)
Reset the state of the browser.
|
void |
reset(Settings settings)
Reset the state of the browser.
|
org.openqa.selenium.WebDriver.TargetLocator |
switchTo() |
static List<String> |
test()
Run diagnostic tests.
|
builder, execute, execute, findElement, findElements, getElementConverter, getExecuteMethod, log, resetInputState, setCommandExecutor, setElementConverter, setErrorHandler, setFileDetector, setFoundBy, setLogLevel, setSessionId, startSession, toStringpublic JBrowserDriver()
public JBrowserDriver(org.openqa.selenium.Capabilities capabilities)
Settings.builder() ...buildCapabilities() to create settings to pass to this constructor.
This constructor is mostly useful for Selenium Server itself to use.capabilities - public JBrowserDriver(Settings settings)
Settings.builder() ...build() to create settings to pass to this constructor.settings - public File attachmentsDir()
public File cacheDir()
public void close()
close in interface org.openqa.selenium.WebDriverclose in class org.openqa.selenium.remote.RemoteWebDriverpublic Object executeAsyncScript(String script, Object... args)
executeAsyncScript in interface org.openqa.selenium.JavascriptExecutorexecuteAsyncScript in class org.openqa.selenium.remote.RemoteWebDriverpublic Object executeScript(String script, Object... args)
executeScript in interface org.openqa.selenium.JavascriptExecutorexecuteScript in class org.openqa.selenium.remote.RemoteWebDriverprotected void finalize()
throws Throwable
public org.openqa.selenium.WebElement findElement(org.openqa.selenium.By by)
findElement in interface org.openqa.selenium.SearchContextfindElement in interface org.openqa.selenium.WebDriverfindElement in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.WebElement findElementByClassName(String cssClass)
findElementByClassName in interface org.openqa.selenium.internal.FindsByClassNamefindElementByClassName in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.WebElement findElementByCssSelector(String expr)
findElementByCssSelector in interface org.openqa.selenium.internal.FindsByCssSelectorfindElementByCssSelector in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.WebElement findElementById(String id)
findElementById in interface org.openqa.selenium.internal.FindsByIdfindElementById in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.WebElement findElementByLinkText(String text)
findElementByLinkText in interface org.openqa.selenium.internal.FindsByLinkTextfindElementByLinkText in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.WebElement findElementByName(String name)
findElementByName in interface org.openqa.selenium.internal.FindsByNamefindElementByName in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.WebElement findElementByPartialLinkText(String text)
findElementByPartialLinkText in interface org.openqa.selenium.internal.FindsByLinkTextfindElementByPartialLinkText in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.WebElement findElementByTagName(String tagName)
findElementByTagName in interface org.openqa.selenium.internal.FindsByTagNamefindElementByTagName in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.WebElement findElementByXPath(String expr)
findElementByXPath in interface org.openqa.selenium.internal.FindsByXPathfindElementByXPath in class org.openqa.selenium.remote.RemoteWebDriverpublic List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By by)
findElements in interface org.openqa.selenium.SearchContextfindElements in interface org.openqa.selenium.WebDriverfindElements in class org.openqa.selenium.remote.RemoteWebDriverpublic List<org.openqa.selenium.WebElement> findElementsByClassName(String cssClass)
findElementsByClassName in interface org.openqa.selenium.internal.FindsByClassNamefindElementsByClassName in class org.openqa.selenium.remote.RemoteWebDriverpublic List<org.openqa.selenium.WebElement> findElementsByCssSelector(String expr)
findElementsByCssSelector in interface org.openqa.selenium.internal.FindsByCssSelectorfindElementsByCssSelector in class org.openqa.selenium.remote.RemoteWebDriverpublic List<org.openqa.selenium.WebElement> findElementsById(String id)
findElementsById in interface org.openqa.selenium.internal.FindsByIdfindElementsById in class org.openqa.selenium.remote.RemoteWebDriverpublic List<org.openqa.selenium.WebElement> findElementsByLinkText(String text)
findElementsByLinkText in interface org.openqa.selenium.internal.FindsByLinkTextfindElementsByLinkText in class org.openqa.selenium.remote.RemoteWebDriverpublic List<org.openqa.selenium.WebElement> findElementsByName(String name)
findElementsByName in interface org.openqa.selenium.internal.FindsByNamefindElementsByName in class org.openqa.selenium.remote.RemoteWebDriverpublic List<org.openqa.selenium.WebElement> findElementsByPartialLinkText(String text)
findElementsByPartialLinkText in interface org.openqa.selenium.internal.FindsByLinkTextfindElementsByPartialLinkText in class org.openqa.selenium.remote.RemoteWebDriverpublic List<org.openqa.selenium.WebElement> findElementsByTagName(String tagName)
findElementsByTagName in interface org.openqa.selenium.internal.FindsByTagNamefindElementsByTagName in class org.openqa.selenium.remote.RemoteWebDriverpublic List<org.openqa.selenium.WebElement> findElementsByXPath(String expr)
findElementsByXPath in interface org.openqa.selenium.internal.FindsByXPathfindElementsByXPath in class org.openqa.selenium.remote.RemoteWebDriverpublic void get(String url)
get in interface org.openqa.selenium.WebDriverget in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.Capabilities getCapabilities()
getCapabilities in interface org.openqa.selenium.HasCapabilitiesgetCapabilities in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.remote.CommandExecutor getCommandExecutor()
getCommandExecutor in class org.openqa.selenium.remote.RemoteWebDriverpublic String getCurrentUrl()
getCurrentUrl in interface org.openqa.selenium.WebDrivergetCurrentUrl in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.remote.ErrorHandler getErrorHandler()
getErrorHandler in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.remote.FileDetector getFileDetector()
getFileDetector in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.interactions.Keyboard getKeyboard()
getKeyboard in interface org.openqa.selenium.interactions.HasInputDevicesgetKeyboard in class org.openqa.selenium.remote.RemoteWebDriverpublic org.openqa.selenium.interactions.Mouse getMouse()
getMouse in interface org.openqa.selenium.interactions.HasInputDevicesgetMouse in class org.openqa.selenium.remote.RemoteWebDriverpublic String getPageSource()
getPageSource in interface org.openqa.selenium.WebDrivergetPageSource in class org.openqa.selenium.remote.RemoteWebDriverpublic <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> outputType)
throws org.openqa.selenium.WebDriverException
getScreenshotAs in interface org.openqa.selenium.TakesScreenshotgetScreenshotAs in class org.openqa.selenium.remote.RemoteWebDriverorg.openqa.selenium.WebDriverExceptionpublic org.openqa.selenium.remote.SessionId getSessionId()
getSessionId in class org.openqa.selenium.remote.RemoteWebDriverpublic int getStatusCode()
public String getTitle()
getTitle in interface org.openqa.selenium.WebDrivergetTitle in class org.openqa.selenium.remote.RemoteWebDriverpublic String getWindowHandle()
getWindowHandle in interface org.openqa.selenium.WebDrivergetWindowHandle in class org.openqa.selenium.remote.RemoteWebDriverpublic Set<String> getWindowHandles()
getWindowHandles in interface org.openqa.selenium.WebDrivergetWindowHandles in class org.openqa.selenium.remote.RemoteWebDriverpublic void init()
public static void initWorkThread()
public void kill()
public org.openqa.selenium.WebDriver.Options manage()
manage in interface org.openqa.selenium.WebDrivermanage in class org.openqa.selenium.remote.RemoteWebDriverpublic File mediaDir()
public org.openqa.selenium.WebDriver.Navigation navigate()
navigate in interface org.openqa.selenium.WebDrivernavigate in class org.openqa.selenium.remote.RemoteWebDriverpublic void pageWait()
The behavior of this wait algorithm can be configured by
Settings.Builder.ajaxWait(long) and
Settings.Builder.ajaxResourceTimeout(long).
public void perform(Collection<org.openqa.selenium.interactions.Sequence> actions)
perform in interface org.openqa.selenium.interactions.Interactiveperform in class org.openqa.selenium.remote.RemoteWebDriverpublic void quit()
quit in interface org.openqa.selenium.WebDriverquit in class org.openqa.selenium.remote.RemoteWebDriverpublic void reset()
public void reset(org.openqa.selenium.Capabilities capabilities)
Note: it's not possible to switch between headless and GUI mode. You must quit this browser and create a new instance.
capabilities - Capabilities to take effect, superseding the original onespublic void reset(Settings settings)
Note: it's not possible to switch between headless and GUI mode. You must quit this browser and create a new instance.
settings - New settings to take effect, superseding the original onespublic org.openqa.selenium.WebDriver.TargetLocator switchTo()
switchTo in interface org.openqa.selenium.WebDriverswitchTo in class org.openqa.selenium.remote.RemoteWebDriverCopyright © 2014-2018 jBrowserDriver committers.
Project homepage: https://github.com/machinepublishers/jbrowserdriver