public class SeleniumServerRunner extends JavaJVMConsole
 Optional parameters:
 -port N, optional, the port number for Selenium Server. If not provided, the default port will be used.
                   For "standalone" and "hub" the default port number is 4444; While for "node", it is 5555.
                   
 -role TheServerRole, optional, if not provided, a standalone server will be launched.
                                         TheServerRole could be "hub", and selenium server will be launched
                                         as a hub (in grid mode) for other node to connect.
                                         TheServerRole could be "node", and selenium server will be launched
                                         as a node (in grid mode) to connect a hub. **Note** Hub's information must also 
                                         be provided. Ex: -role node -hub http://hub.machine:port/grid/register
                                         
 -outputToConsole, optional, if provided, the console message will also be printed to standard out/err.
 -state MAX|MIN|NORMAL, optional, the console windows will be maximized, minimized or as it is.
 
Other JVM params--including those needed by Selenium Server ( -Dwebdriver...)--must also be provided and will have already been applied to this JVM process.
Consequently, a typical command-line invocation of this Java program would look like:
 <pathTo>/bin/java 
 
     -Xms51m -Xmx1g (or -Xmx2g)
     -cp <pathTo>/seleniumplus.jar;<pathTo>/JSTAFEmbedded.jar;<pathTo>selenium-server-standalone-<version>.jar
     
     -Dwebdriver.log.file="webdriver.console" 
     -Dwebdriver.firefox.logfile="firefox.console" 
     -Dwebdriver.safari.logfile="safari.console" 
     -Dwebdriver.ie.logfile="ie.console" 
     -Dwebdriver.opera.logfile="opera.console" 
     -Dwebdriver.chrome.logfile="chrome.console" 
     -Dwebdriver.chrome.driver="<pathTo/chromedriver.exe" 
     -Dwebdriver.ie.driver="<pathTo/IEDriverServer.exe"
     
     org.safs.selenium.util.SeleniumServerRunner 
     
     -jar <pathTo>/selenium-server-standalone-<version>.jar;
     -timeout=20
     -browserTimeout=60
 
 When being used as the SeleniumPlus RMI bootstrap mechanism on a remote standalone/node Selenium Server, 
 the following additional command-line arguments are necessary:
 
     -Djava.rmi.server.hostname=<full hostname or ip address>
     
       The correct hostname is imperative as later versions of Java seem to resolve the 
       our hostname to "localhost" or "127.0.0.1" which will cause connection failures on 
       remote systems trying to communicate with this RMI Server.)
     One of the following:
     
     -safs.rmi.server  (no arg: default SeleniumPlus RMI Server)
     -safs.rmi.server <full.package.classname>   (alternative/custom RMI Server)  
     -Dsafs.rmi.server <full.package.classname>  (alternative/custom RMI Server)  
SeleniumRMIServer, 
SeleniumServer, 
SeleniumRMIAgent, 
SeleniumAgent, 
Serialized Formjavax.swing.JFrame.AccessibleJFramejava.awt.Window.AccessibleAWTWindow, java.awt.Window.Type| Modifier and Type | Field and Description | 
|---|---|
| protected static boolean | isRMIServer | 
| static java.lang.String | PARAM_JAR'-jar' specifies the jar file to put dynamically in the classpath. -jar fullpath/to/selenium-server-standalone*.jar | 
| static java.lang.String | PARAM_OUTPUTCONSOLE'-outputToConsole' specifies if the 'execution message' will also be printed to standard out/err. | 
| static java.lang.String | PARAM_RMI'-safs.rmi.server' specifies the name of RMI server class to start with. '-safs.rmi.server', without value the default RMI DriverConstant.DEFAULT_RMISERVER_CLASSNAMEwill be used.'-safs.rmi.server full.pacakge.RMIServer', 'full.pacakge.RMIServer' will start with this console. | 
| protected static java.lang.String | rmiServerClassnameThe default value is null, so the console start without RMI server. | 
| static java.lang.String | TITLE"Selenium Server", The title will be shown. | 
DEFAULT_RMISERVER_CLASSNAME, DEFAULT_SEARCH_MATCH_CASE, display, keep_mode, KEEP_MODE_FIFO, lastFoundPosition, MENU_EDIT, MENU_FILE, MENU_ITEM_CLEAR, MENU_ITEM_EXIT, MENU_ITEM_FIND, MENU_ITEM_FIND_NEXT, MENU_ITEM_FIND_PREVIOUS, MENU_ITEM_SAVE, MENU_SEARCH, numberOfrows, outputToConsole, PARAM_STATE, PAUSE_BEFORE_OUTPUT_READY, pauseBeforeReady, PROPERTY_RMISERVER, shutdown, state, STATE_DEFAULT, STATE_MAX, STATE_MAXIMIZE, STATE_MIN, STATE_MINIMIZE, STATE_NORMAL, token, tokenCombobox, tokenMatchCaseCheckboxaccessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabledCROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSORBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Modifier and Type | Method and Description | 
|---|---|
| void | init()Initialize the console's UI elements. Start a thread to redirect the stdout/stderr. This method MUST be called after calling the constructors. | 
| protected static void | launchRMIServer()Start an RMI Server class specified on the command-line, if any. | 
| static void | main(java.lang.String[] args)Is expected to be able to run in its own standalone Java process. | 
| protected static java.lang.String[] | processArgs(java.lang.String[] args) | 
actionPerformed, addFile, addFile, addURL, clearHighLight, createJMenuItem, displayLine, getPauseBeforeReady, highLight, highlightInDispaly, maximize, minimize, restore, run, search, setPauseBeforeReady, setState, showSearchDialogaddImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateaddNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFrontadd, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected static boolean isRMIServer
protected static java.lang.String rmiServerClassname
public static final java.lang.String TITLE
public static final java.lang.String PARAM_OUTPUTCONSOLE
public static final java.lang.String PARAM_JAR
public static final java.lang.String PARAM_RMI
DriverConstant.DEFAULT_RMISERVER_CLASSNAME will be used.public void init()
JavaJVMConsoleinit in class JavaJVMConsoleprotected static java.lang.String[] processArgs(java.lang.String[] args)
                                         throws java.io.IOException
java.io.IOExceptionprotected static void launchRMIServer()
                               throws java.lang.InstantiationException,
                                      java.lang.IllegalAccessException,
                                      java.lang.ClassNotFoundException
java.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionjava.lang.InstantiationExceptionpublic static void main(java.lang.String[] args)
args - expects:
 
 -jar fullpath/to/selenium-server-standalone*.jar
 -timeout=N Controls how long (in seconds) the client is allowed to be gone before the session is reclaimed
 -browserTimeout=N Controls how long (in seconds) the browser is allowed to hang
 -port N, optional, the port number for Selenium Server. If not provided, the default port will be used.
                   For "standalone" and "hub" the default port number is 4444; While for "node", it is 5555.
                   
 -role TheServerRole, optional, if not provided, a standalone server will be launched.
                                         TheServerRole could be "hub", and selenium server will be launched
                                         as a hub (in grid mode) for other node to connect.
                                         TheServerRole could be "node", and selenium server will be launched
                                         as a node (in grid mode) to connect a hub. **Note** Hub's information must also 
                                         be provided. Ex: -role node -hub http://hub.machine:port/grid/register
                                         
 -outputToConsole, optional, if provided, the console message will also be printed to standard out/err.
 -state MAX|MIN|NORMAL, optional, the console windows will be maximized, minimized or as it is.
 
Other JVM params--including those needed by standalone Selenium Server ( -Dwebdriver...)--must also be provided and will have already been applied to this JVM process.
When being used as the SeleniumPlus RMI bootstrap mechanism on a remote standalone/node Selenium Server, the following additional command-line arguments are necessary:
     -Djava.rmi.server.hostname=<full hostname or ip address>
     
       The correct hostname is imperative as later versions of Java seem to resolve the 
       our hostname to "localhost" or "127.0.0.1" which will cause connection failures on 
       remote systems trying to communicate with this RMI Server.)
     One of the following:
     
     -safs.rmi.server  (no arg: default SeleniumPlus RMI Server)
     -safs.rmi.server <full.package.classname>   (alternative/custom RMI Server)  
     -Dsafs.rmi.server <full.package.classname>  (alternative/custom RMI Server)  
Copyright © SAS Institute. All Rights Reserved.