我正在尝试在安装了firefox 10.0.12的centros上运行的服务器上运行一些自动化的Selenium测试,如下所示:
Xvfb :99 -screen 0 800x600x16&
export DISPLAY=:99;
java -jar ./autotesting/selenium-server-standalone-2.28.0.jar&
php ./autotesting/index.php;
index.php指向一个SimpleTest测试类,它启动像这样的WebDriver会话(使用facebook php绑定):
$webdriver = new WebDriver();
$this->session = $webdriver->session('firefox');
$this->session->open($this->url);
它在我的本地计算机上运行,但在服务器上我得到以下输出:
13:17:11.344 INFO - Executing: [new session: {browserName=firefox}] at URL: /session)
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
mkdir: `99/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}': Not a directory
(Gecko:8766): libgnomevfs-WARNING **: Unable to create ~/.gnome2 directory: Not a directory
Could not create per-user gnome configuration directory `99/.gnome2/': Not a directory
mkdir: `99/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}': Not a directory
我不太了解幕后发生的事情以解决这个问题 - 为什么在firefox运行时执行mkdir命令?它失败了因为我不是root用户吗?