com.atlassian.selenium.browsers.firefox
Class DisplayAwareFirefoxChromeLauncher

java.lang.Object
  extended by org.openqa.selenium.server.browserlaunchers.AbstractBrowserLauncher
      extended by com.atlassian.selenium.browsers.firefox.DisplayAwareFirefoxChromeLauncher
All Implemented Interfaces:
org.openqa.selenium.browserlaunchers.BrowserLauncher

public class DisplayAwareFirefoxChromeLauncher
extends org.openqa.selenium.server.browserlaunchers.AbstractBrowserLauncher

This is an override of the FirefoxChromeLauncher class from selenium so we can control the display system property to get xvfb to work.


Nested Class Summary
static class DisplayAwareFirefoxChromeLauncher.ChromeUrlConvert
           
protected  class DisplayAwareFirefoxChromeLauncher.FileLockRemainedException
           
 
Field Summary
 
Fields inherited from class org.openqa.selenium.server.browserlaunchers.AbstractBrowserLauncher
browserConfigurationOptions, sessionId
 
Constructor Summary
DisplayAwareFirefoxChromeLauncher(org.openqa.selenium.Capabilities browserOptions, org.openqa.selenium.server.RemoteControlConfiguration configuration, String sessionId, org.openqa.selenium.browserlaunchers.locators.BrowserInstallation browserInstallation)
           
DisplayAwareFirefoxChromeLauncher(org.openqa.selenium.Capabilities browserOptions, org.openqa.selenium.server.RemoteControlConfiguration configuration, String sessionId, String browserString)
           
 
Method Summary
 void close()
           
protected  void copyCert8db(File firefoxProfileTemplate)
           
protected  void copyDirectory(File sourceDir, File destDir)
           
protected  void copySingleFileWithOverwrite(File sourceFile, File destFile)
           
protected  void createCustomProfileDir()
           
protected  void extractProfileFromJar()
           
protected  void generatePacAndPrefJs(String homePage)
           
protected  File getFileFromParent(File parent, String child)
           
protected  File initProfileTemplate()
           
protected  void killFirefoxProcess()
          Wrapper to allow for stubbed-out testing *
protected  void launch(String url)
           
 void launchHTMLSuite(String suiteUrl, String browserURL)
           
 void launchRemoteSession(String browserURL)
           
protected  org.openqa.selenium.os.CommandLine prepareCommand(String... commands)
           
protected  void removeCustomProfileDir()
          Wrapper to allow for stubbed-out testing *
protected  void setCommandLine(org.openqa.selenium.os.CommandLine p)
           
protected  void setCustomProfileDir(File value)
           
 
Methods inherited from class org.openqa.selenium.server.browserlaunchers.AbstractBrowserLauncher
getCommandLineFlags, getCommandLineFlagsAsArray, getConfiguration, getPort, getTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisplayAwareFirefoxChromeLauncher

public DisplayAwareFirefoxChromeLauncher(org.openqa.selenium.Capabilities browserOptions,
                                         org.openqa.selenium.server.RemoteControlConfiguration configuration,
                                         String sessionId,
                                         String browserString)
                                  throws org.openqa.selenium.server.browserlaunchers.InvalidBrowserExecutableException
Throws:
org.openqa.selenium.server.browserlaunchers.InvalidBrowserExecutableException

DisplayAwareFirefoxChromeLauncher

public DisplayAwareFirefoxChromeLauncher(org.openqa.selenium.Capabilities browserOptions,
                                         org.openqa.selenium.server.RemoteControlConfiguration configuration,
                                         String sessionId,
                                         org.openqa.selenium.browserlaunchers.locators.BrowserInstallation browserInstallation)
Method Detail

launch

protected void launch(String url)
Specified by:
launch in class org.openqa.selenium.server.browserlaunchers.AbstractBrowserLauncher

prepareCommand

protected org.openqa.selenium.os.CommandLine prepareCommand(String... commands)

createCustomProfileDir

protected void createCustomProfileDir()

copyDirectory

protected void copyDirectory(File sourceDir,
                             File destDir)

initProfileTemplate

protected File initProfileTemplate()

extractProfileFromJar

protected void extractProfileFromJar()
                              throws IOException
Throws:
IOException

copySingleFileWithOverwrite

protected void copySingleFileWithOverwrite(File sourceFile,
                                           File destFile)

getFileFromParent

protected File getFileFromParent(File parent,
                                 String child)

copyCert8db

protected void copyCert8db(File firefoxProfileTemplate)

generatePacAndPrefJs

protected void generatePacAndPrefJs(String homePage)
                             throws IOException
Throws:
IOException

close

public void close()

removeCustomProfileDir

protected void removeCustomProfileDir()
                               throws RuntimeException
Wrapper to allow for stubbed-out testing *

Throws:
RuntimeException

killFirefoxProcess

protected void killFirefoxProcess()
                           throws DisplayAwareFirefoxChromeLauncher.FileLockRemainedException
Wrapper to allow for stubbed-out testing *

Throws:
DisplayAwareFirefoxChromeLauncher.FileLockRemainedException

setCustomProfileDir

protected void setCustomProfileDir(File value)

setCommandLine

protected void setCommandLine(org.openqa.selenium.os.CommandLine p)

launchHTMLSuite

public void launchHTMLSuite(String suiteUrl,
                            String browserURL)
Specified by:
launchHTMLSuite in interface org.openqa.selenium.browserlaunchers.BrowserLauncher
Overrides:
launchHTMLSuite in class org.openqa.selenium.server.browserlaunchers.AbstractBrowserLauncher

launchRemoteSession

public void launchRemoteSession(String browserURL)
Specified by:
launchRemoteSession in interface org.openqa.selenium.browserlaunchers.BrowserLauncher
Overrides:
launchRemoteSession in class org.openqa.selenium.server.browserlaunchers.AbstractBrowserLauncher


Copyright © 2014 Atlassian. All rights reserved.