Installing Selenium and Bromine

This tutorial shows us how to install Selenium and Bromine and set it up to run our Ruby test cases

1. Prerequisites

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 stepsXAMPP Control Panel Application
  • Open a browser and navigate to “http://localhostXAMPP startup page
  • From the above screen, select phpmyadmin.  Then click on the Priveleges tab

    Priveleges tab in phpmyadmin

  • Click “Add a new User

    Add a new user in phpmyadmin

    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:
    “Install Complete”

5. Final step

  • Start selenium by opening a command prompt (start menu/run/cmd) and type
    selenium
    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):
    sql.sql
    install.php
  • 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.

Tagged with: , , , ,
Posted in Bromine, Selenium, WeDoQA
6 comments on “Installing Selenium and Bromine
  1. Krishh says:

    “•Unzip the bromine download file and copy the 2 folders into c:\xampp\htdocs”

    I had downloaded bromine and extracted it, I had found five folders and three files in it.Please let me know which are the two folders to be copied into the path c:\xampp\htdocs.

    Krishh

  2. This tutorial is for Bromine v2, and I suppose you have downloaded the newer version. If this is the case, please take a look at our new “Installing Bromine v3″ post on http://alasdoo.com/2010/04/install-bromine-v3/

  3. DunKe says:

    Hey, I’ve got a question how did you get Bromine working with .rb’s? I can’t add the .rb on the bromine it says something like

    Error: Script not uploaded. Filetype not accepted. The accepted filetypes are php, jar

  4. The problem is that Bromine 3 does not support Ruby test scripts yet.

    Bromine 2 did support it, but in the new version of Bromine a lot of things have changed, so the old BRUnit for Ruby could not be used.

    The only solution for this problem for now is to use Java or PHP for your test scripts.

    You are welcome to help us out and create the modifications for the old BRUnit to run in the new version of Bromine.

  5. sujna says:

    i installed bromine 3 rc 1 and in browser bromine’s state of system its showing as “could not run php.php not enabled.What to do resolve this issue.
    I added the pathn in system variable and restarted apache then also its showing the same msg.Please help.

  6. Albert says:

    i installed bromine 3 rc 1 and in browser bromine’s state of system its showing as “could not run php.php not enabled.What to do resolve this issue.
    I added the pathn in system variable and restarted apache then also its showing the same msg.Please help.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>