org.openqa.selenium.server.htmlrunner
Class HTMLLauncher

java.lang.Object
  extended by org.openqa.selenium.server.htmlrunner.HTMLLauncher
All Implemented Interfaces:
HTMLResultsListener

public class HTMLLauncher
extends java.lang.Object
implements HTMLResultsListener

Runs HTML Selenium test suites.

Author:
dfabulich

Constructor Summary
HTMLLauncher(SeleniumServer remoteControl)
           
 
Method Summary
protected  BrowserLauncher getBrowserLauncher(java.lang.String browser, java.lang.String sessionId, RemoteControlConfiguration configuration, Capabilities browserOptions)
           
protected  java.io.FileWriter getFileWriter(java.io.File outputFile)
           
 HTMLTestResults getResults()
           
static void main(java.lang.String[] args)
           
static int mainInt(java.lang.String... args)
           
 void processResults(HTMLTestResults resultsParm)
          Accepts HTMLTestResults for later asynchronous handling
 java.lang.String runHTMLSuite(java.lang.String browser, java.lang.String browserURL, java.io.File suiteFile, java.io.File outputFile, long timeoutInSeconds, boolean multiWindow)
          Launches a single HTML Selenium test suite.
 java.lang.String runHTMLSuite(java.lang.String browser, java.lang.String browserURL, java.lang.String suiteURL, java.io.File outputFile, long timeoutInSeconds, boolean multiWindow)
          Launches a single HTML Selenium test suite.
 void setResults(HTMLTestResults results)
           
protected  void sleepTight(long timeoutInMs)
           
protected  void writeResults(java.io.File outputFile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLLauncher

public HTMLLauncher(SeleniumServer remoteControl)
Method Detail

runHTMLSuite

public java.lang.String runHTMLSuite(java.lang.String browser,
                                     java.lang.String browserURL,
                                     java.lang.String suiteURL,
                                     java.io.File outputFile,
                                     long timeoutInSeconds,
                                     boolean multiWindow)
                              throws java.io.IOException
Launches a single HTML Selenium test suite.

Parameters:
browser - - the browserString ("*firefox", "*iexplore" or an executable path)
browserURL - - the start URL for the browser
suiteURL - - the relative URL to the HTML suite
outputFile - - The file to which we'll output the HTML results
timeoutInSeconds - - the amount of time (in seconds) to wait for the browser to finish
multiWindow - TODO
Returns:
PASS or FAIL
Throws:
java.io.IOException - if we can't write the output file

getBrowserLauncher

protected BrowserLauncher getBrowserLauncher(java.lang.String browser,
                                             java.lang.String sessionId,
                                             RemoteControlConfiguration configuration,
                                             Capabilities browserOptions)

sleepTight

protected void sleepTight(long timeoutInMs)

getFileWriter

protected java.io.FileWriter getFileWriter(java.io.File outputFile)
                                    throws java.io.IOException
Throws:
java.io.IOException

writeResults

protected void writeResults(java.io.File outputFile)
                     throws java.io.IOException
Throws:
java.io.IOException

runHTMLSuite

public java.lang.String runHTMLSuite(java.lang.String browser,
                                     java.lang.String browserURL,
                                     java.io.File suiteFile,
                                     java.io.File outputFile,
                                     long timeoutInSeconds,
                                     boolean multiWindow)
                              throws java.io.IOException
Launches a single HTML Selenium test suite.

Parameters:
browser - - the browserString ("*firefox", "*iexplore" or an executable path)
browserURL - - the start URL for the browser
suiteFile - - a file containing the HTML suite to run
outputFile - - The file to which we'll output the HTML results
timeoutInSeconds - - the amount of time (in seconds) to wait for the browser to finish
multiWindow - - whether to run the browser in multiWindow or else framed mode
Returns:
PASSED or FAIL
Throws:
java.io.IOException - if we can't write the output file

processResults

public void processResults(HTMLTestResults resultsParm)
Accepts HTMLTestResults for later asynchronous handling

Specified by:
processResults in interface HTMLResultsListener

mainInt

public static int mainInt(java.lang.String... args)
                   throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

getResults

public HTMLTestResults getResults()

setResults

public void setResults(HTMLTestResults results)


Copyright © 2011. All Rights Reserved.