XVFB
Hi all
I'm running a Linux server and I'm working with Selenium. so i made a test case with Selenium (to check a website) , i exported it to a java file, and i did actually everything i need to do to get this to work BUT when i run the script like Code:
./check_selenium.sh -b "http://www.google.com" -c "some.folder.name.Rc" -t "*firefox" Code:
UNKNOWN - some.folder.name.Rc: Got some problems: java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: Error while launching browser |;;;; but the main thingie is that the test must be done in the background, no need to open a webbrowser and let everything run and than close the webbrowser, i just need it to test the website and give me back some result. And i've read some articles about how to run it headless, and with XVFB is the one that pops out... I installed it with Code:
yum install Xvfb Code:
startx -- `which Xvfb` :1 -screen 0 1024x768x24 Can someone help me pls how i should run my testcase of selenium on the background (perhaps with Xvfb?) |
I've never used Xvfb with startx; normally, I just run it standalone:
Code:
Xvfb :1 -auth /etc/xauth.xvfb -fbdir /tmp & Code:
export DISPLAY=localhost:1 Now, if we want to test it, we can launch some application using it. Code:
# Use commandline '-display' argument as alternative to setting $DISPLAY Code:
xwud -in /tmp/Xvfb_screen0 |
Sorry for the late reply
i tried what you suggested, but after the first command i get the following error: Code:
[root@monitor2 testmap]# Xvfb :1 -auth /etc/xauth.xvfb -fbdir /tmp & UPDATE: Nice thing to know is that everything works, so i can use the command like this: Code:
./check_selenium -c "com.example.tests.login" -b "http://website.com" -t "*firefox" So HOW can i do this, without the webbrowser, so i guessed with XVFB, but i don't know how this works (i'm not familiar with that) Thanks in advance |
Quote:
--- rod. |
All times are GMT -5. The time now is 01:04 AM. |