An NDoc Documented Class Library |

# DefaultSelenium Constructor (String, Int32, String, String)

Uses a CommandBridgeClient, specifying a server host/port, a command to launch the browser, and a starting URL for the browser.

browserString may be any one of the following:

-     *firefox [absolute path]

  - Automatically launch a new Firefox process using a custom Firefox profile. This profile will be automatically configured to use the Selenium Server as a proxy and to have all annoying prompts ("save your password?" "forms are insecure" "make Firefox your default browser?" disabled. You may optionally specify an absolute path to your firefox executable, or just say "*firefox". If no absolute path is specified, we'll look for firefox.exe in a default location (normally c:\program files\mozilla firefox\firefox.exe), which you can override by setting the Java system property

      firefoxDefaultPath

  to the correct path to Firefox.

-     *iexplore [absolute path]

  - Automatically launch a new Internet Explorer process using custom Windows registry settings. This process will be automatically configured to use the Selenium Server as a proxy and to have all annoying prompts ("save your password?" "forms are insecure" "make Firefox your default browser?" disabled. You may optionally specify an absolute path to your iexplore executable, or just say "*iexplore". If no absolute path is specified, we'll look for iexplore.exe in a default location (normally c:\program files\internet explorer\iexplore.exe), which you can override by setting the Java system property

      iexploreDefaultPath

  to the correct path to Internet Explorer.

-     /path/to/my/browser [other arguments]

  - You may also simply specify the absolute path to your browser executable, or use a relative path to your executable (which we'll try to find on your path). Warning: If you specify your own custom browser, it's up to you to configure it correctly. At a minimum, you'll need to configure your browser to use the Selenium Server as a proxy, and disable all browser-specific prompting.

public DefaultSelenium(
string serverHost,
int serverPort,
string browserString,
string browserURL
);

#### Parameters

serverHost
  the host name on which the Selenium Server resides
serverPort
  the port on which the Selenium Server is listening
browserString
  the command string used to launch the browser, e.g. "*firefox", "*iexplore" or "c:\\program files\\internet explorer\\iexplore.exe"
browserURL
  the starting URL including just a domain name. We'll start the browser pointing at the Selenium resources on this URL, e.g. "http://www.google.com" would send the browser to "http://www.google.com/selenium-server/RemoteRunner.html"

#### See Also

DefaultSelenium Class | Selenium Namespace | DefaultSelenium Constructor Overload List