it:ad:selenium:howto:install_preparation

IT:AD:Selenium:HowTo:Install/Preparation

Summary

Installing Selenium for an enterprise environment is not trivial, involving:

  • multiple browsers
  • multiple operating systems
  • secure network communication
  • combinations of frameworks (.NET, Java, and others)

Careful preparation will cut down the risk of expending a lot of time setting the environment up.

You'll need IT:AD:Java installed first:

You can check that it's correctly installed as follows: * IT:AD:Java:HowTo:Check that Java is correctly installed

You'll need a service account on each Hub Server of your Grid, eg: Svc_Selenium, or Svc_UXTests, as well as the Node servers.

  • In a Domain, you'd request a domain group (eg: 'Grp-Selenium') and a service account (eg: 'Svc-Selenium'). In a Workspace/Non-AD environment you would create create them using IT:AD:lusrmgr.msc.
  • In both cases, to ensure the account can be used as a service account, see: IT:AD:SecPol.msc.
  • To ensure the account can be used to remote control in (you'll need this to set up some user specific setting, and then turn it off, see IT:AD:lusrmgr.msc:HowTo:Add a User to the RDP Group.

Selenium can be installed either: * as a single instance, or * as a grid of Selenium installs (where you have a front Selenium instance you communicate with who in turn managers n instances of Selenium on other servers of various operating systems).

Bar the most trivial POC scenarios, in an enterprise environment where you'll need to test against various versions of a browsers that can't be installed side by side on the same browser (eg: IE), you'll need a Selenium Grid.

As it's the more complex scenario of the two, the following will concentrate on how to install a Grid.

To install a Grid, you'll need a Server box, and Hub boxes (one for Chrome, one for each version of IE (as it can't be installed side by side on the same machine).

DevBoxHubNode 1Node 2Node 3ChromeFFIElatestIE6IE8Win7Win7Win7XPXP

A Node Selenium server can be installed on the same machine as the Hub Selenium Server – but not recommended (the machine on which the Selenium Hub Server is usually a Server OS, whereas, the Nodes are usually workstation OS's).

But it's also fine in most cases, as browsers are (in 99.99% of cases…) browsers – no matter what OS they are running on.

One Node Selenium server can manage more than one WebDriver.

You'll therefore need VMs built up that are suitable for the topology you've decided on. Ask your SysAdmin.

At the very least – to get started – you'll need a VM on which to install the Hub (and optionally webdrivers, as mentioned above).

Configuring Windows Service is difficult and opaque enough already, and even more so when trying to run Java based applications (Selenium's servers are Java based application).

Hence why we recommend you install IT:AD:NSSM (Non Sucking (Windows) Service Manager) on all the VMs, as per the instructions: Install

Normally, I would suggest referencing one copy of NSSM on your machine (eg: c:\Apps) but in this case I'll suggest you place a copy of NSSM in the Selenium directory.

The primary source packages can be downloaded from: * http://docs.seleniumhq.org/download/

  • UPDATE: As of 2014 moved to http://selenium-release.storage.googleapis.com/index.html

There you'll see a tree of files to download:

  • IEDriverServerWin322.40.0.zip [0.81MB]
  • IEDriverServerx642.40.0.zip [0.91MB]
  • selenium-dotnet-2.40.0.zip [10.08MB]
  • selenium-dotnet-strongnamed-2.40.0.zip [7.81MB]
  • selenium-java-2.40.0.zip [22.91MB]
  • selenium-server-2.40.0.zip [62.41MB]
  • selenium-server-standalone-2.40.0.jar ← take that
    • Note that its a java based product, hence the pre-check that you have Java installed.

As a “Microsoft Shop” you'll be most probably be wanting a combination of:

The IE Server is tiny and is going to be one of the 'node's in your Grid. By default – like all nodes – starts on port 5555, but can be changed by starting it with -port=5556

As for testing Chrome. You'll need: *

You'll also need the WebDrivers for each browser.

On the server:

  • Create a c:\Program Files\Selenium directory.
  • Extracting the selenium-server-standalone-<version-number>.jar into it.

On the Hub you'll be using to test Chrome, you'll need to:

  • Sign in as the service account you just created.
  • DOwnload and install Chrome
  • Ensure it's installed where it's expected: C:\Users\%USERNAME%\AppData\Local\Google\Chrome\Application\chrome.exe
  • You'll need to download the Chrome WebDriver
  • You'll n

On the Hub you'll be using to test a version of IE, you'll need:

  • The
  • /home/skysigal/public_html/data/pages/it/ad/selenium/howto/install_preparation.txt
  • Last modified: 2023/11/04 01:56
  • by 127.0.0.1