public interface Context
extends org.openqa.selenium.internal.WrapsDriver
| Modifier and Type | Method and Description |
|---|---|
default <T> T |
executeScript(String script,
Object... args)
Executes JavaScript in the context of the currently selected frame or window.
|
default org.openqa.selenium.WebElement |
findElement(String locator)
Find an element
|
default List<org.openqa.selenium.WebElement> |
findElements(String locator)
Find elements
|
default String |
getBrowserName()
Get browser name.
|
CollectionMap |
getCollectionMap()
Get collection map.
|
ICommandFactory |
getCommandFactory()
Get CommandFactory instance.
|
CommandListIterator |
getCommandListIterator()
Get current CommandListIterator.
|
CookieFilter |
getCookieFilter()
Get cookie filter.
|
String |
getCurrentBaseURL()
Get current base URL.
|
TestCase |
getCurrentTestCase()
Get current test-case.
|
WebDriverElementFinder |
getElementFinder()
Get elemnt finder.
|
Eval |
getEval()
Get evaluater.
|
String |
getInitialWindowHandle()
Get initial window handle.
|
JSLibrary |
getJSLibrary()
Get JavaScript library handler.
|
PageInformation |
getLatestPageInformation()
Get latest page information.
|
ModifierKeyState |
getModifierKeyState()
Get modifier key state.
|
String |
getOverridingBaseURL()
Get base URL for overriding test-case base URL.
|
PrintStream |
getPrintStream()
Get PrintStream for logging.
|
RollupRules |
getRollupRules()
Get rollup rules.
|
long |
getSpeed()
Get speed for setSpeed command.
|
SubCommandMap |
getSubCommandMap()
Get SubCommandMap instance.
|
int |
getTimeout()
Get timeout for waiting.
|
VarsMap |
getVarsMap()
Get variables map.
|
default boolean |
isBrowser(String name)
Test browser name.
|
boolean |
isInteractive()
Get interactive.
|
boolean |
isTrue(String expr)
Get boolean value of expr.
|
void |
popCommandListIterator()
Pop CommandListIterator.
|
void |
prepareWebDriver()
Prepare WebDriver.
|
void |
pushCommandListIterator(CommandListIterator commandListIterator)
Push CommandListIterator.
|
void |
resetSpeed()
Reset speed as initial speed.
|
void |
resetState()
Reset internal state.
|
void |
setCookieFilter(CookieFilter cookieFilter)
Set cookie filter.
|
void |
setCurrentTestCase(TestCase testCase)
Set current test-case.
|
void |
setJSLibrary(JSLibrary jsLibrary)
Set JavaScript library handler.
|
void |
setLatestPageInformation(PageInformation pageInformation)
Set latest page information.
|
void |
setSpeed(long speed)
Set speed for setSpeed command.
|
void |
setTimeout(int timeout)
Set timeout for waiting.
|
void |
waitSpeed()
Wait according to speed setting.
|
void prepareWebDriver()
default String getBrowserName()
default boolean isBrowser(String name)
name - browser name.TestCase getCurrentTestCase()
void setCurrentTestCase(TestCase testCase)
testCase - current test-case.PrintStream getPrintStream()
String getOverridingBaseURL()
String getCurrentBaseURL()
ICommandFactory getCommandFactory()
CommandListIterator getCommandListIterator()
void pushCommandListIterator(CommandListIterator commandListIterator)
commandListIterator - CommanListIterator.void popCommandListIterator()
VarsMap getVarsMap()
RollupRules getRollupRules()
CollectionMap getCollectionMap()
String getInitialWindowHandle()
WebDriverElementFinder getElementFinder()
default List<org.openqa.selenium.WebElement> findElements(String locator)
locator - locator.default org.openqa.selenium.WebElement findElement(String locator)
locator - locator.org.openqa.selenium.NoSuchElementException - throw if element not found.Eval getEval()
boolean isTrue(String expr)
expr - expression.SubCommandMap getSubCommandMap()
int getTimeout()
void setTimeout(int timeout)
timeout - for waiting.void resetSpeed()
long getSpeed()
void setSpeed(long speed)
speed - speed.void waitSpeed()
PageInformation getLatestPageInformation()
void setLatestPageInformation(PageInformation pageInformation)
pageInformation - page information.CookieFilter getCookieFilter()
void setCookieFilter(CookieFilter cookieFilter)
cookieFilter - cookie filter.JSLibrary getJSLibrary()
void setJSLibrary(JSLibrary jsLibrary)
jsLibrary - JavaScript library handler.ModifierKeyState getModifierKeyState()
void resetState()
boolean isInteractive()
default <T> T executeScript(String script, Object... args)
JavascriptExecutor.executeScript(String, Object...).T - type of return value.script - The JavaScript to executeargs - The arguments to the script. May be emptyCopyright © 2017. All rights reserved.