Debian (squeeze) サーバで、X 環境の代わりに xvfb を使って、firefox を起動してみた。
(おまけでスクリーンショットも撮ってみた。)
これをもとに、Selenium のテスト実行環境を用意しようと思う。
必要なパッケージのインストール:
apt-get -y install xvfb libgl1-mesa-dri ttf-vlgothic iceweasel
xvfb を起動
Xvfb :99
firefox を起動 (Yahoo!JAPAN を開く)
DISPLAY=:99 firefox http://www.yahoo.co.jp/
必要なパッケージを追加して、スクリーンショットを撮ってみる。
apt-get -y install x11-apps imagemagick
xwd -display :99 -root -out test.xwd
convert test.xwd test.png
