mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/WebDriverFactory.java
private static FirefoxDriver createFirefoxDriverWithProfile()
    {
        File profileDir = new File(ResourceLocatorUtil.getGuiIntegrationPath(), "/firefox_profile");
        FirefoxProfile profile = new FirefoxProfile(profileDir);
        profile.setEnableNativeEvents(true);
        try
        {
            JavaScriptError.addExtension(profile);
        }
        catch (IOException e)
        {
            throw new IllegalStateException("Unable to install Firefox Javascript error extension.", e);
        }
        LOG.info("Using Firefox profile in: " + profileDir.getAbsolutePath());
        
        String firefoxBinaryPath = System.getProperty(FIREFOX_BINARY);
        if (Strings.isNullOrEmpty(firefoxBinaryPath))
        {
            LOG.info("Using standard Firefox driver");
            return new FirefoxDriver(profile);
        }
        else
        {
            File firefoxBinary = new File(firefoxBinaryPath);
            LOG.info("Using Firefox driver with binary at: " + firefoxBinary.getAbsolutePath());
            return new FirefoxDriver(new FirefoxBinary(firefoxBinary), profile);
        }
    }
/**
     * Creates a Firefox driver with a custom profile. This is used to ensure no dialog windows pop up and that Firefox
     * will occupy the full screen. Mainly needed for running integration tests on a server where there will be no user
     * interaction to assist the test.
     * 
     * @return
     *      {@link FirefoxDriver} with the specified user profile.
     */
Creates a Firefox driver with a custom profile. This is used to ensure no dialog windows pop up and that Firefox
will occupy the full screen. Mainly needed for running integration tests on a server where there will be no user
interaction to assist the test.

@return
FirefoxDriver with the specified user profile.
Creates a Firefox driver with a custom profile . This is used to ensure no dialog windows pop up and that Firefox will occupy the full screen . Mainly needed for running integration tests on a server where there will be no user interaction to assist the test . @return FirefoxDriver with the specified user profile .
private static FirefoxDriver createFirefoxDriverWithProfile()
    {
        File profileDir = new File(ResourceLocatorUtil.getGuiIntegrationPath(), "/firefox_profile");
        FirefoxProfile profile = new FirefoxProfile(profileDir);
        profile.setEnableNativeEvents(true);
        try
        {
            JavaScriptError.addExtension(profile);
        }
        catch (IOException e)
        {
            throw new IllegalStateException("Unable to install Firefox Javascript error extension.", e);
        }
        LOG.info("Using Firefox profile in: " + profileDir.getAbsolutePath());
        String firefoxBinaryPath = System.getProperty(FIREFOX_BINARY);
        if (Strings.isNullOrEmpty(firefoxBinaryPath))
        {
            LOG.info("Using standard Firefox driver");
            return new FirefoxDriver(profile);
        }
        else
        {
            File firefoxBinary = new File(firefoxBinaryPath);
            LOG.info("Using Firefox driver with binary at: " + firefoxBinary.getAbsolutePath());
            return new FirefoxDriver(new FirefoxBinary(firefoxBinary), profile);
        }
    }
private static FirefoxDriver createFirefoxDriverWithProfile ( ) { File profileDir = new File ( ResourceLocatorUtil . getGuiIntegrationPath ( ) , "/firefox_profile" ) ; FirefoxProfile profile = new FirefoxProfile ( profileDir ) ; profile . setEnableNativeEvents ( true ) ; try { JavaScriptError . addExtension ( profile ) ; } catch ( IOException e ) { throw new IllegalStateException ( "Unable to install Firefox Javascript error extension." , e ) ; } LOG . info ( "Using Firefox profile in: " + profileDir . getAbsolutePath ( ) ) ; String firefoxBinaryPath = System . getProperty ( FIREFOX_BINARY ) ; if ( Strings . isNullOrEmpty ( firefoxBinaryPath ) ) { LOG . info ( "Using standard Firefox driver" ) ; return new FirefoxDriver ( profile ) ; } else { File firefoxBinary = new File ( firefoxBinaryPath ) ; LOG . info ( "Using Firefox driver with binary at: " + firefoxBinary . getAbsolutePath ( ) ) ; return new FirefoxDriver ( new FirefoxBinary ( firefoxBinary ) , profile ) ; } }
Creates a Firefox driver with a custom profile.
Creates a Firefox driver with a custom profile .