public class Runner extends Object implements Context, ScreenshotHandler, HighlightHandler, JUnitResultHolder, HtmlResultHolder
| Constructor and Description |
|---|
Runner()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Result |
execute(Selenese selenese)
Execute test-suite / test-case.
|
void |
finish()
Finish test.
|
String |
getBaseURL()
Deprecated.
|
CollectionMap |
getCollectionMap()
Get collection map.
|
CommandFactory |
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.
|
org.openqa.selenium.WebDriver |
getDriver()
Deprecated.
|
WebDriverElementFinder |
getElementFinder()
Get elemnt finder.
|
Eval |
getEval()
Get evaluater.
|
HtmlResult |
getHtmlResult()
Get HTML result instance.
|
long |
getInitialSpeed()
Get initial speed at starting test-suite.
|
String |
getInitialWindowHandle()
Get initial window handle.
|
JUnitResult |
getJUnitResult()
Get JUnit result instance.
|
PageInformation |
getLatestPageInformation()
Get latest page information.
|
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.
|
org.openqa.selenium.WebDriver |
getWrappedDriver() |
void |
highlight(String locator,
HighlightStyle highlightStyle)
Highlight and backup specified locator.
|
boolean |
isHighlight()
Get locator highlighting.
|
boolean |
isIgnoredScreenshotCommand()
Get ignore screenshot command flag.
|
boolean |
isIgnoreScreenshotCommand()
Deprecated.
|
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.
|
Result |
run(String... filenames)
Run Selenese script files.
|
Result |
run(String filename,
InputStream is)
Run Selenese script from input stream.
|
void |
setBaseURL(String baseURL)
Deprecated.
Replaced by
setOverridingBaseURL(String) |
void |
setCommandLineArgs(String[] args)
Set command line arguments.
|
void |
setCookieFilter(CookieFilter cookieFilter)
Set cookie filter.
|
void |
setCurrentTestCase(TestCase currentTestCase)
Set current test-case.
|
void |
setDriver(org.openqa.selenium.WebDriver driver)
Set WebDriver.
|
void |
setHighlight(boolean isHighlight)
Set locator highlighting.
|
void |
setHtmlResultDir(String dir)
Initialize HTMLResult.
|
void |
setIgnoredScreenshotCommand(boolean isIgnoredScreenshotCommand)
Set ignore screenshot command flag.
|
void |
setIgnoreScreenshotCommand(boolean isIgnoredScreenshotCommand)
Deprecated.
|
void |
setInitialSpeed(long initialSpeed)
Set initial speed at starting test-suite.
|
void |
setJUnitResultDir(String dir)
Initialize JUnitResult.
|
void |
setLatestPageInformation(PageInformation pageInformation)
Set latest page information.
|
void |
setOverridingBaseURL(String overridingBaseURL)
Set URL for overriding test-case base URL.
|
void |
setPrintStream(PrintStream ps)
Set PrintStream for logging.
|
void |
setScreenshotAllDir(String screenshotAllDir)
Set directory for storing screenshots at all commands.
|
void |
setScreenshotDir(String screenshotDir)
Set directory for storing screenshots.
|
void |
setScreenshotOnFailDir(String screenshotOnFailDir)
Set directory for storing screenshot on fail.
|
void |
setSpeed(long speed)
Set speed for setSpeed command.
|
void |
setTimeout(int timeout)
Set timeout for waiting.
|
void |
setVarsMap(VarsMap varsMap)
Set variables map used for this session.
|
void |
setWebDriverPreparator(WebDriverPreparator preparator)
Set WebDriverPreparator.
|
String |
takeScreenshot(String filename)
Take screenshot to filename.
|
String |
takeScreenshotAll(String prefix,
int index)
Take screenshot at all commands if --screenshot-all option specified.
|
String |
takeScreenshotOnFail(String prefix,
int index)
Take screenshot on fail commands if --screenshot-on-fail option specified.
|
void |
unhighlight()
Unhighlight backed up styles.
|
void |
waitSpeed()
Wait according to speed setting.
|
public void setCommandLineArgs(String[] args)
args - command line arguments.public TestCase getCurrentTestCase()
ContextgetCurrentTestCase in interface Contextpublic void setCurrentTestCase(TestCase currentTestCase)
ContextsetCurrentTestCase in interface ContextcurrentTestCase - current test-case.public void setPrintStream(PrintStream ps)
ps - PrintStream for logging.public PrintStream getPrintStream()
ContextgetPrintStream in interface Contextpublic String takeScreenshot(String filename) throws org.openqa.selenium.WebDriverException, UnsupportedOperationException
ScreenshotHandlertakeScreenshot in interface ScreenshotHandlerfilename - filename.UnsupportedOperationException - WebDriver does not supoort capturing screenshot.org.openqa.selenium.WebDriverExceptionpublic String takeScreenshotAll(String prefix, int index)
ScreenshotHandlertakeScreenshotAll in interface ScreenshotHandlerprefix - prefix name.index - command index.public String takeScreenshotOnFail(String prefix, int index)
ScreenshotHandlertakeScreenshotOnFail in interface ScreenshotHandlerprefix - prefix name.index - command index.@Deprecated public org.openqa.selenium.WebDriver getDriver()
Internal use only.
public org.openqa.selenium.WebDriver getWrappedDriver()
getWrappedDriver in interface org.openqa.selenium.internal.WrapsDriverpublic String getInitialWindowHandle()
ContextgetInitialWindowHandle in interface Contextpublic void setDriver(org.openqa.selenium.WebDriver driver)
driver - WebDriver.public void prepareWebDriver()
ContextprepareWebDriver in interface Contextpublic void setWebDriverPreparator(WebDriverPreparator preparator)
preparator - WebDriverPreparator.public void setScreenshotDir(String screenshotDir) throws IllegalArgumentException
screenshotDir - directory.IllegalArgumentException - throws if screenshotDir is not directory.public void setScreenshotAllDir(String screenshotAllDir) throws IllegalArgumentException
screenshotAllDir - directory.IllegalArgumentException - throws if screenshotAllDir is not directory.public void setScreenshotOnFailDir(String screenshotOnFailDir)
screenshotOnFailDir - directory.@Deprecated public String getBaseURL()
@Deprecated public void setBaseURL(String baseURL)
setOverridingBaseURL(String)baseURL - base URL.public String getCurrentBaseURL()
ContextgetCurrentBaseURL in interface Contextpublic void setOverridingBaseURL(String overridingBaseURL)
overridingBaseURL - base URL.public String getOverridingBaseURL()
ContextgetOverridingBaseURL in interface Context@Deprecated public void setIgnoreScreenshotCommand(boolean isIgnoredScreenshotCommand)
setIgnoredScreenshotCommand(boolean)isIgnoredScreenshotCommand - set true if you want to ignore "captureEntirePageScreenshot"public void setIgnoredScreenshotCommand(boolean isIgnoredScreenshotCommand)
isIgnoredScreenshotCommand - set true if you want to ignore "captureEntirePageScreenshot"@Deprecated public boolean isIgnoreScreenshotCommand()
isIgnoredScreenshotCommand()public boolean isIgnoredScreenshotCommand()
ScreenshotHandlerisIgnoredScreenshotCommand in interface ScreenshotHandlerpublic boolean isHighlight()
HighlightHandlerisHighlight in interface HighlightHandlerpublic void setHighlight(boolean isHighlight)
isHighlight - true if use locator highlighting.public int getTimeout()
ContextgetTimeout in interface Contextpublic void setTimeout(int timeout)
ContextsetTimeout in interface Contexttimeout - for waiting.public long getInitialSpeed()
public void setInitialSpeed(long initialSpeed)
initialSpeed - initial speed.public void resetSpeed()
ContextresetSpeed in interface Contextpublic long getSpeed()
Contextpublic void setSpeed(long speed)
Contextpublic void waitSpeed()
Contextpublic SubCommandMap getSubCommandMap()
ContextgetSubCommandMap in interface Contextpublic CommandFactory getCommandFactory()
ContextgetCommandFactory in interface Contextpublic CommandListIterator getCommandListIterator()
ContextgetCommandListIterator in interface Contextpublic void pushCommandListIterator(CommandListIterator commandListIterator)
ContextpushCommandListIterator in interface ContextcommandListIterator - CommanListIterator.public void popCommandListIterator()
ContextpopCommandListIterator in interface Contextpublic VarsMap getVarsMap()
ContextgetVarsMap in interface Contextpublic void setVarsMap(VarsMap varsMap)
varsMap - the evaluated variables (state) for the current context.public CollectionMap getCollectionMap()
ContextgetCollectionMap in interface Contextpublic RollupRules getRollupRules()
ContextgetRollupRules in interface Contextpublic WebDriverElementFinder getElementFinder()
ContextgetElementFinder in interface Contextpublic PageInformation getLatestPageInformation()
ContextgetLatestPageInformation in interface Contextpublic void setLatestPageInformation(PageInformation pageInformation)
ContextsetLatestPageInformation in interface ContextpageInformation - page information.public CookieFilter getCookieFilter()
ContextgetCookieFilter in interface Contextpublic void setCookieFilter(CookieFilter cookieFilter)
ContextsetCookieFilter in interface ContextcookieFilter - cookie filter.public Result execute(Selenese selenese)
selenese - test-suite or test-case.public boolean isTrue(String expr)
Contextpublic Result run(String... filenames)
filenames - Selenese script filenames.public Result run(String filename, InputStream is)
filename - selenese script file. (not open. used for label or generating output filename)is - input stream of script file. (test-case or test-suite)public void setJUnitResultDir(String dir)
dir - JUnit result directory.public JUnitResult getJUnitResult()
JUnitResultHoldergetJUnitResult in interface JUnitResultHolderpublic void setHtmlResultDir(String dir)
dir - HTML result directory.public HtmlResult getHtmlResult()
HtmlResultHoldergetHtmlResult in interface HtmlResultHolderpublic void finish()
public void highlight(String locator, HighlightStyle highlightStyle)
HighlightHandlerhighlight in interface HighlightHandlerlocator - locator.highlightStyle - highlight style.public void unhighlight()
HighlightHandlerunhighlight in interface HighlightHandlerCopyright © 2016. All rights reserved.