Ajocado API 1.0.0.Alpha2

org.jboss.arquillian.ajocado.browser
Enum BrowserMode

java.lang.Object
  extended by java.lang.Enum<BrowserMode>
      extended by org.jboss.arquillian.ajocado.browser.BrowserMode
All Implemented Interfaces:
Serializable, Comparable<BrowserMode>

public enum BrowserMode
extends Enum<BrowserMode>

Encapsulates execution mode of browser runned by Selenium.

Enumerates all the browsers supported by Selenium.

Version:
$Revision$
Author:
Lukas Fryc

Enum Constant Summary
CHROME
          FirefoxChromeLauncher
FIREFOX
          FirefoxLauncher
FIREFOX_CHROME
          FirefoxChromeLauncher
FIREFOX_PROXY
          FirefoxCustomProfileLauncher
FIREFOX_PROXY_INJECTION
          ProxyInjectionFirefoxCustomProfileLauncher
FIREFOX2
          Firefox2Launcher
FIREFOX3
          Firefox3Launcher
GOOGLE_CHROME
          GoogleChromeLauncher
IEXPLORE
          InternetExplorerLauncher
IEXPLORE_HTA
          HTABrowserLauncher
IEXPLORE_PROXY
          InternetExplorerCustomProxyLauncher
IEXPLORE_PROXY_INJECTION
          ProxyInjectionInternetExplorerCustomProxyLauncher
KONQUEROR
          KonquerorLauncher
MOCK
          MockBrowserLauncher
OPERA
          OperaCustomProfileLauncher
SAFARI
          SafariLauncher
SAFARI_PROXY
          SafariCustomProfileLauncher
SAFARI_PROXY_INJECTION
          Deprecated. 
 
Method Summary
 BrowserType getBrowserType()
          Gets the browser type.
 String getMode()
          Gets string representations of mode.
static EnumSet<BrowserMode> getModesFromTypes(EnumSet<BrowserType> types)
          Gets the set of browser modes, which are associated with browsers given by types (see BrowserType).
static BrowserMode parseMode(String browserMode)
           Parses the mode from given string representation.
static EnumSet<BrowserMode> parseModes(String browserModesEnumeration)
           Returns set of browser modes derived from string enumeration of comma- and/or space-separated representation of browser modes (parseMode(String)).
static BrowserMode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static BrowserMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FIREFOX_PROXY

public static final BrowserMode FIREFOX_PROXY
FirefoxCustomProfileLauncher


FIREFOX

public static final BrowserMode FIREFOX
FirefoxLauncher


CHROME

public static final BrowserMode CHROME
FirefoxChromeLauncher


FIREFOX_CHROME

public static final BrowserMode FIREFOX_CHROME
FirefoxChromeLauncher


FIREFOX2

public static final BrowserMode FIREFOX2
Firefox2Launcher


FIREFOX3

public static final BrowserMode FIREFOX3
Firefox3Launcher


IEXPLORE_PROXY

public static final BrowserMode IEXPLORE_PROXY
InternetExplorerCustomProxyLauncher


SAFARI

public static final BrowserMode SAFARI
SafariLauncher


SAFARI_PROXY

public static final BrowserMode SAFARI_PROXY
SafariCustomProfileLauncher


IEXPLORE_HTA

public static final BrowserMode IEXPLORE_HTA
HTABrowserLauncher


IEXPLORE

public static final BrowserMode IEXPLORE
InternetExplorerLauncher


OPERA

public static final BrowserMode OPERA
OperaCustomProfileLauncher


IEXPLORE_PROXY_INJECTION

public static final BrowserMode IEXPLORE_PROXY_INJECTION
ProxyInjectionInternetExplorerCustomProxyLauncher


FIREFOX_PROXY_INJECTION

public static final BrowserMode FIREFOX_PROXY_INJECTION
ProxyInjectionFirefoxCustomProfileLauncher


KONQUEROR

public static final BrowserMode KONQUEROR
KonquerorLauncher


MOCK

public static final BrowserMode MOCK
MockBrowserLauncher


GOOGLE_CHROME

public static final BrowserMode GOOGLE_CHROME
GoogleChromeLauncher


SAFARI_PROXY_INJECTION

@Deprecated
public static final BrowserMode SAFARI_PROXY_INJECTION
Deprecated. 

ProxyInjectionSafariCustomProfileLauncher

Deprecated - isn't working yet

Method Detail

values

public static BrowserMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (BrowserMode c : BrowserMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static BrowserMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

parseMode

public static BrowserMode parseMode(String browserMode)

Parses the mode from given string representation.

String representation is derived from string representing mode in Selenium.

E.g.: for "*pifirefox" string you get FIREFOX_PROXY_INJECTION mode

Parameters:
browserMode - the browser mode string representation
Returns:
the browser mode
Throws:
IllegalArgumentException - if the given browserMode isn't supported

parseModes

public static EnumSet<BrowserMode> parseModes(String browserModesEnumeration)

Returns set of browser modes derived from string enumeration of comma- and/or space-separated representation of browser modes (parseMode(String)).

Parameters:
browserModesEnumeration - comma and/or spaces separated string enumeration of string representation of browser modes
Returns:
the set of browser modes
Throws:
IllegalArgumentException - if one of the given browser modes isn't supported

getModesFromTypes

public static EnumSet<BrowserMode> getModesFromTypes(EnumSet<BrowserType> types)
Gets the set of browser modes, which are associated with browsers given by types (see BrowserType).

Parameters:
types - the set of browser types
Returns:
the browsers associated with browser by given set of types

getMode

public String getMode()
Gets string representations of mode.

Returns:
the mode

getBrowserType

public BrowserType getBrowserType()
Gets the browser type.

Returns:
the browser type

Ajocado API 1.0.0.Alpha2

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.