public class TestBenchDriverProxy extends Object implements org.openqa.selenium.WebDriver, org.openqa.selenium.internal.WrapsDriver, HasTestBenchCommandExecutor, org.openqa.selenium.HasCapabilities, org.openqa.selenium.TakesScreenshot, org.openqa.selenium.JavascriptExecutor
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 |
TestBenchDriverProxy(org.openqa.selenium.WebDriver webDriver,
TestBenchCommandExecutor commandExecutor) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Object |
executeAsyncScript(String script,
Object... args) |
Object |
executeScript(String script,
Object... args) |
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.By arg0) |
List<org.openqa.selenium.WebElement> |
findElements(org.openqa.selenium.By arg0) |
void |
get(String arg0) |
org.openqa.selenium.Capabilities |
getCapabilities() |
TestBenchCommandExecutor |
getCommandExecutor()
Return a reference to the related
TestBenchCommandExecutor
instance. |
String |
getCurrentUrl() |
String |
getPageSource() |
<X> X |
getScreenshotAs(org.openqa.selenium.OutputType<X> target) |
String |
getTitle() |
String |
getWindowHandle() |
Set<String> |
getWindowHandles() |
org.openqa.selenium.WebDriver |
getWrappedDriver() |
org.openqa.selenium.WebDriver.Options |
manage() |
org.openqa.selenium.WebDriver.Navigation |
navigate() |
void |
quit() |
org.openqa.selenium.WebDriver.TargetLocator |
switchTo() |
protected static Object |
wrapElementOrElements(Object elementElementsOrValues,
TestBenchCommandExecutor tbCommandExecutor)
Wraps any
WebElement found inside the object inside a
TestBenchElement. |
protected TestBenchDriverProxy(org.openqa.selenium.WebDriver webDriver,
TestBenchCommandExecutor commandExecutor)
public void close()
close in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.WebElement findElement(org.openqa.selenium.By arg0)
findElement in interface org.openqa.selenium.SearchContextfindElement in interface org.openqa.selenium.WebDriverpublic List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.By arg0)
findElements in interface org.openqa.selenium.SearchContextfindElements in interface org.openqa.selenium.WebDriverpublic void get(String arg0)
get in interface org.openqa.selenium.WebDriverpublic String getCurrentUrl()
getCurrentUrl in interface org.openqa.selenium.WebDriverpublic String getPageSource()
getPageSource in interface org.openqa.selenium.WebDriverpublic String getTitle()
getTitle in interface org.openqa.selenium.WebDriverpublic String getWindowHandle()
getWindowHandle in interface org.openqa.selenium.WebDriverpublic Set<String> getWindowHandles()
getWindowHandles in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.WebDriver.Options manage()
manage in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.WebDriver.Navigation navigate()
navigate in interface org.openqa.selenium.WebDriverpublic void quit()
quit in interface org.openqa.selenium.WebDriverpublic org.openqa.selenium.WebDriver.TargetLocator switchTo()
switchTo in interface org.openqa.selenium.WebDriverpublic TestBenchCommandExecutor getCommandExecutor()
HasTestBenchCommandExecutorTestBenchCommandExecutor
instance.getCommandExecutor in interface HasTestBenchCommandExecutorpublic org.openqa.selenium.Capabilities getCapabilities()
getCapabilities in interface org.openqa.selenium.HasCapabilitiespublic org.openqa.selenium.WebDriver getWrappedDriver()
getWrappedDriver in interface org.openqa.selenium.internal.WrapsDriverprotected static Object wrapElementOrElements(Object elementElementsOrValues, TestBenchCommandExecutor tbCommandExecutor)
WebElement found inside the object inside a
TestBenchElement.
Traverses through any List found inside the object and wraps any
elements inside the list, recursively. The behavior is compatible with
what executeScript(String, Object...) and
executeAsyncScript(String, Object...) returns.
Does not modify the argument, instead creates a new object containing the wrapped elements and other possible values.
This method is protected for testing purposes only.
elementElementsOrValues - an object containing a WebElement, a List of
WebElements or something completely
different.tbCommandExecutor - the TestBenchCommandExecutor related to the driver
instancepublic Object executeScript(String script, Object... args)
executeScript in interface org.openqa.selenium.JavascriptExecutorpublic Object executeAsyncScript(String script, Object... args)
executeAsyncScript in interface org.openqa.selenium.JavascriptExecutorpublic <X> X getScreenshotAs(org.openqa.selenium.OutputType<X> target)
throws org.openqa.selenium.WebDriverException
getScreenshotAs in interface org.openqa.selenium.TakesScreenshotorg.openqa.selenium.WebDriverExceptionCopyright © 2018. All rights reserved.