Recently I was trying to setup Selenium Tests on CI Server on Linux (Cent OS) box in order to test my web project.
I need headless browser for Selenium Tests on CI Server. There are 2 options:
I decided to go for FireFox + Xvfb.
(Of course I can upgrade the OS or install those required libraries but the install process is a bit pain for me. I have tried to compile PhantomJS from its source code but I needed to install QtWebKit library. I gave up.)
I have installed FireFox 10 and Xvfb in a just simple manner from yum. I executed the following command.
I need headless browser for Selenium Tests on CI Server. There are 2 options:
- PhantomJS
- FireFox + Xvfb
$ phantomjs/bin/phantomjs phantomjs/bin/phantomjs: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by phantomjs/bin/phantomjs) phantomjs/bin/phantomjs: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by phantomjs/bin/phantomjs) phantomjs/bin/phantomjs: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by phantomjs/bin/phantomjs) phantomjs/bin/phantomjs: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by /home/duke/bin/phantomjs/bin/../lib/libQtGui.so.4) phantomjs/bin/phantomjs: /lib64/libc.so.6: version `GLIBC_2.9' not found (required by /home/duke/bin/phantomjs/bin/../lib/libQtGui.so.4) phantomjs/bin/phantomjs: /lib64/libc.so.6: version `GLIBC_2.11' not found (required by /home/duke/bin/phantomjs/bin/../lib/libQtGui.so.4) phantomjs/bin/phantomjs: /lib64/libc.so.6: version `GLIBC_2.10' not found (required by /home/duke/bin/phantomjs/bin/../lib/libQtNetwork.so.4) phantomjs/bin/phantomjs: /lib64/libc.so.6: version `GLIBC_2.9' not found (required by /home/duke/bin/phantomjs/bin/../lib/libQtCore.so.4)
I decided to go for FireFox + Xvfb.
(Of course I can upgrade the OS or install those required libraries but the install process is a bit pain for me. I have tried to compile PhantomJS from its source code but I needed to install QtWebKit library. I gave up.)
I have installed FireFox 10 and Xvfb in a just simple manner from yum. I executed the following command.
Xvfb :1 -screen 0 1024x786x24I got the following 4 error messages during Xvfb running. As a result first, Xvfb works very well with FireFox although I only solved the second error message.
- FreeFontPath: FPE "unix/:7100" refcount is 2, should be 1; fixing.
I have googled and then found following page and installed missing fonts but unfortunately the error message keep appearing. http://corpocrat.com/2008/08/18/fix-freefontpath-fpe-unix7100-refcount-is-2-should-be-1-fixing/
http://stackoverflow.com/questions/7522808/freefontpath-fpe-unix-7100-refcount-is-2-should-be-1-fixing
- Could not init font path element unix/:7100, removing from list!
I applied below 2 changes to my box, the error message was gone :)- Just start /etc/init.d/xfs
- Also you need to check /sbin/chkconfig --list and enable the service on proper Linux Run Level.
Initial setting on my box, the service is off on all run level.xfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
- _XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/foobar.com:1
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
According to this page, just need to give putting "-nolisten tcp" into serverargs in startx. I have not tried though.
Another option is enabling inet6 following this page.
- error opening security policy file /usr/lib64/xserver/SecurityPolicy
Have not found proper solution yet but I think just need to give a SecurityPolicy file?
コメント