Selenium RC で「file is a script file, not a real executable.」と言われる

Selenium RC でブラウザにfirefoxを指定して実行すると、
「'/usr/bin/firefox'は実行ファイルじゃなくてスクリプトじゃねーか」
と怒られることがあります。

$ java -jar selenium-server-standalone-2.6.0.jar -browserSessionReuse -htmlSuite *firefox "http://localhost" "testcase.html" "result.html"

org.openqa.grid.selenium.GridLauncher main
情報: Launching a standalone server
INFO - Java: Sun Microsystems Inc. 19.0-b09
INFO - OS: Linux 2.6.37.1-1.2-desktop amd64
INFO - v2.6.0, with Core v2.6.0. Built from revision 13840
INFO - Will recycle browser sessions when possible.
INFO - RemoteWebDriver instances should connect to: http://127.0.0.2:4444/wd/hub
INFO - Version Jetty/5.1.x
INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
INFO - Started HttpContext[/selenium-server,/selenium-server]
INFO - Started HttpContext[/,/]
INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@744a6cbf
INFO - Started HttpContext[/wd,/wd]
INFO - Started SocketListener on 0.0.0.0:4444
INFO - Started org.openqa.jetty.jetty.Server@19b8e059
WARN - Caution: '/usr/bin/firefox': file is a script file, not a real executable. The browser environment is no longer fully under RC control


どれどれ、と見てみると、

$ ls -la /usr/bin/firefox
firefox -> ../lib64/firefox/firefox.sh

なるほど。


この場合、パスの通ってるディレクトリに、firefox-binという名前で
実行ファイルのシンボリックリンクを貼ってあげると解決します。

# cd /usr/bin/
# ln -s /usr/lib64/firefox/firefox firefox-bin