Graphene Selenium: API 2.0.0.Alpha1

org.jboss.arquillian.ajocado.browser
Class Browser

java.lang.Object
  extended by org.jboss.arquillian.ajocado.browser.Browser
All Implemented Interfaces:
SeleniumRepresentable

public class Browser
extends Object
implements SeleniumRepresentable

Encapsulates execution properties of selected browser.

Consists from browser mode (including its type) and associated executable file

Version:
$Revision$
Author:
Lukas Fryc

Constructor Summary
Browser(BrowserMode browserMode)
          Instantiates a new browser by given browserMode
Browser(BrowserMode browserMode, File executableFile)
          Instantiates a new browser by given browserMode and executableFile.
Browser(String stringRepresentation)
           Instantiates a new browser from string representation defined by Selenium framework
 
Method Summary
 boolean equals(Object obj)
           
 BrowserMode getMode()
          Gets the browser's mode (see BrowserMode).
 BrowserType getType()
           Gets the type of browser.
 int hashCode()
           
 String inSeleniumRepresentation()
           Gets a string representation of browser.
 String toString()
          Returns a string representation of the object in human-readable format.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Browser

public Browser(String stringRepresentation)

Instantiates a new browser from string representation defined by Selenium framework

e.g. "*pifirefox /some/path/firefox-bin"

Parameters:
stringRepresentation - the string representation

Browser

public Browser(BrowserMode browserMode)
Instantiates a new browser by given browserMode

Parameters:
browserMode - the browser mode

Browser

public Browser(BrowserMode browserMode,
               File executableFile)
Instantiates a new browser by given browserMode and executableFile.

Parameters:
browserMode - the browser mode
executableFile - the executable file
Method Detail

getMode

public BrowserMode getMode()
Gets the browser's mode (see BrowserMode).

Returns:
the mode

getType

public BrowserType getType()

Gets the type of browser.

Shortcut for BrowserMode.getType().

Returns:
the type

inSeleniumRepresentation

public String inSeleniumRepresentation()

Gets a string representation of browser.

Specified by:
inSeleniumRepresentation in interface SeleniumRepresentable
Returns:
the string representation of browser
See Also:
Browser(String)

toString

public String toString()
Returns a string representation of the object in human-readable format.

Overrides:
toString in class Object
Returns:
the human-readable string representation of this object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

Graphene Selenium: API 2.0.0.Alpha1

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.