Skip to content

Commit

Permalink
Making Readme clearer and removing debug code
Browse files Browse the repository at this point in the history
Had a few echos that I probably shouldn't have left in the service.
Removed my test config values from the config file.
Made the Readme reflect having a config file.
  • Loading branch information
generalredneck committed Sep 3, 2012
1 parent fe115b9 commit 9adf1b1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,29 @@ Make the directory `/usr/lib/headless-selenium`.
Download Selenium Server and place it in `/usr/lib/headless-selenium`.

### Step 4
Edit the variable `SELENIUM_JAR` in the service file with the name of the selenium server you downloaded. (At the time I wrote the service the latest was 2.24.1)
Make the directory `/etc/headless-selenium`.

### Step 5
Create the directores up to `/usr/lib/headless-selenium/profiles/firefox`
Place the file `selenium.conf` in `/etc/headless-selenium`.

### Step 6
Create a selenium profile using firefox. There are several tutorials out there (particularly handy one). I've taken the liberty of creating a default one that you can do what you want to with.
Uncomment and edit the variable `SELENIUM_JAR` in `/etc/headless-selenium/selenium.conf` with the name of the selenium server you downloaded. (At the time I wrote the service the latest was 2.24.1)

### Step 7
Put that Profile in `/usr/lib/headless-selenium/profiles/firefox/selenium`.
Create the directores up to `/usr/lib/headless-selenium/profiles/firefox`

### Step 8
Create a selenium profile using firefox. There are several tutorials out there (particularly handy one). I've taken the liberty of creating a default one that you can do what you want to with.

### Step 9
Put that Profile in `/usr/lib/headless-selenium/profiles/firefox/selenium`.

### Step 10 (optional)
Uncomment the variable `SELENIUM_PROFILE_DIR` in `/etc/headless-selenium/selenium.conf`

_Note: The default is actually `/usr/lib/headless-selenium/profiles/firefox/selenium` so you won't need to change it, however, you could save doing step 9 by changing this variable to `/home/YOURUSERNAME/.mozilla/firefox/YOURSELENIUMDIR`_

### Step 11
Start the service! `sudo /etc/init.d/headless-selenium start`

## Usage
Expand Down Expand Up @@ -68,4 +79,4 @@ Check to see if headless selenium is running via a process manager:
```
ps -ef | grep selenium
ps -ef | grep Xvfb
```
```
8 changes: 0 additions & 8 deletions headless-selenium
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ then
fi
fi

echo $SELENIUM_JAR
echo $SELENIUM_OPTIONS
echo $JAVA
echo $XVFB
echo $DISPLAY
echo $XVFB_SCREEN_GEOMETRY
echo $TIME_OUT

SELENIUM_LOG_DIR='/var/log/selenium'
XVFB_PID_FILE='/tmp/Xvfb.pid'
SELENIUM_PID_FILE='/tmp/selenium.pid'
Expand Down
2 changes: 0 additions & 2 deletions selenium.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,12 @@

#The location where the selenium stand-alone jar file is stored.
#SELENIUM_JAR=$HEADLESS_SELENIUM_DIR/selenium-server-standalone-2.24.1.jar
SELENIUM_JAR=/home/allan/selenium-server-standalone-2.25.0.jar

#Leave blank to use SELENIUM_PORT and SELENIUM_PROFILE_DIR
#SELENIUM_OPTIONS=''

#SELENIUM_PORT=4444
#SELENIUM_PROFILE_DIR=$HEADLESS_SELENIUM_DIR/profiles/firefox/selenium
SELENIUM_PROFILE_DIR=/home/allan/.mozilla/firefox/selenium

###############################################################################
#HEADLESS SELENIUM SERVICE OPTIONS: The options that pertain directly to the
Expand Down

0 comments on commit 9adf1b1

Please sign in to comment.