Created
November 1, 2012 19:17
-
-
Save dkinzer/3995815 to your computer and use it in GitHub Desktop.
Running Selenium in HeadLess Env on CentOS5.4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bash -ex /etc/usr/bin/headlessSelenium.sh $WORKSPACE http://website.dev.jenkinslaw.org $WORKSPACE/all/modules/jenkins/Tests/JenkinsTestSuite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # USAGE: | |
| # bash -ex /usr/lib/selenium/headlessSelenium.sh $BASEURL $WORKSPACE $TEST_SUITE | |
| # | |
| # | |
| WORKSPACE=$1 | |
| BASEURL=$2 | |
| TEST_SUITE=$3 | |
| SELENIUM="java -jar /var/lib/selenium/selenium-server.jar" | |
| FIREFOX_BIN="/usr/lib/firefox" | |
| DISPLAY=":99" | |
| FONTPATH="/usr/share/X11/fonts/misc" | |
| # | |
| # This option creates screen screennum and sets its width, height, and depth to W, H, and D respectively. | |
| # By default, only screen 0 exists and has the dimensions 1280x1024x8. | |
| # | |
| SCREEN="0 1280x1024x16" | |
| #Use virtual X server | |
| VIRTUAL_X="Xvfb $DISPLAY -fp $FONTPATH -screen $SCREEN" | |
| #init | |
| if [ -z "$(/sbin/pidof Xvfb)" ]; then | |
| $VIRTUAL_X & | |
| fi | |
| export DISPLAY | |
| $SELENIUM -trustAllSSLCertificates -htmlSuite *firefox ${BASEURL} ${TEST_SUITE} ${WORKSPACE}/seleniumhq/result.html |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm giving up an selenium for the time being and going with casperjs. A truely headless solution.