This tutorial shows us how to install Selenium and Bromine and set it up to run our Ruby test cases
- Webserver (eg. Apache)
- MySQL database
(I’m using XAMPP (http://www.apachefriends.org/en/xampp.html) for running these servers)
- Bromine (http://bromine.openqa.org/)
- Selenium Core and/or Selenium RC (http://seleniumhq.org/)
Selenium requires Java, so this means that even dough you want to run tests in some other programming language (Python, Ruby, PHP), you still gonna need Java.
2. Selenium Setup
- Install Ruby by clicking on the installer. Select Gem option when prompted.
- Once the install is complete, open a windows command prompt (start/run/cmd) and type
gem install selenium
- Install Java (if not already installed on your machine)
3. Web Server & DB setup
- Install XAMPP. This will automatically install both Apache and MySQL.
- Start XAMPP to make sure both apache and mysql start correctly.
Make sure Port 80 on your comuter is free, or change the settings for Apache, and in that case make sure to use the newly set port for the next steps
- Open a browser and navigate to “http://localhost”
- From the above screen, select phpmyadmin. Then click on the Priveleges tab
- Click “Add a new User”
Use this information for creating a new user:
User Name: bromine Host: localhost PW (any you choose) Select the radio button: Create database with same name and grant all privileges Click GO.
4. Bromine setup
- Navigate to c:\xampp\apache\bin and open php.ini in a text editor
- Find the following settings and change them to match these:
max_execution_time = 60001 magic_quotes_gpc = Off
- If you are already running an Apache server, and don’t want to mess up the global configuration for php, you could do this in its configuration:
<IfModule mod_php5.c> php_value max_execution_time 61000 php_admin_flag magic_quotes_gpc off </IfModule> <IfModule mod_php4.c> php_value max_execution_time 61000 php_admin_flag magic_quotes_gpc off </IfModule>
- Unzip the bromine download file and copy the 2 folders into c:\xampp\htdocs
- In the browser, navigate to “http://localhost/bromine/install.php“
- Fill in the form that displays with
User Name: bromine Database: brominePW (PW you set in the DB setup) Host: localhost
- Click the Install button. You should get a message:
5. Final step
- Start selenium by opening a command prompt (start menu/run/cmd) and type
Leave the command prompt open while using selenium and bromine. Closing it will shut down selenium.
- Find c:\xampp\htdocs\bromine. Delete both these files (they may already be deleted but you should check):
- In your browser navigate to http://localhost/bromine, and login with:
UID: admin PW: admin
- We have successfully installed Bromine and now its time to configure it to run with Selenium Remote Control server. Find out all about it in our next post.