Adding selenium headless files

pull/1/head
Ubuntu 2012-01-26 17:42:47 +00:00
parent 8b6b038fe3
commit aa898cde32
5 changed files with 57 additions and 0 deletions

21
selenium/INSTALL Normal file
View File

@ -0,0 +1,21 @@
Instructions to install xvfb + jdk
1) sudo apt-get install openjdk-6-jre-headless
2) sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic
3) sudo apt-get install xvfb
4) sudo apt-get install xserver-xorg-core
5) sudo apt-get install firefox
6) sudo cp xvfb /etc/init.d/xvfb
7) sudo chmod 755 /etc/init.d/xvfb
8) sudo cp selenium /etc/init.d/selenium
9) sudo chmod 755 /etc/init.d/selenium
Instructions to manually restart xvfb + selenium server
1) sh /opt/regluit/selenium/start.sh
Create a link to auto start xvfb+selenium on startup
1) sudo ln -s /etc/init.d/xvfb /etc/rc2.d/S66xvfb
2) sudo ln -d /etc/init.d/selenium /etc/rc2.d/S67selenium

15
selenium/selenium Normal file
View File

@ -0,0 +1,15 @@
if [ -z "$1" ]; then
echo "`basename $0` {start|stop}"
exit
fi
case "$1" in
start)
export DISPLAY=:99
java -jar /opt/regluit/selenium/selenium-server-standalone-2.5.0.jar > /opt/regluit/logs/selenium-rc.log 2>&1 &
;;
stop)
killall java
;;
esac

Binary file not shown.

7
selenium/start.sh Normal file
View File

@ -0,0 +1,7 @@
sudo /etc/init.d/xvfb stop
sudo /etc/init.d/selenium stop
sudo /etc/init.d/xvfb start
sudo /etc/init.d/selenium start

14
selenium/xvfb Normal file
View File

@ -0,0 +1,14 @@
if [ -z "$1" ]; then
echo "`basename $0` {start|stop}"
exit
fi
case "$1" in
start)
/usr/bin/Xvfb :99 -ac -screen 0 1024x768x8 &
;;
stop)
killall Xvfb
;;
esac