我正在尝试在docker容器中运行selenium测试。我在Oracle Linux 6.7的基本映像上创建了映像,并在其上安装了firefox 24。在入口点脚本中设置显示,该脚本也运行selenium测试。但是当它运行测试时,错误地说
[java] org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
[java] *** LOG addons.manager: Application has been upgraded
[java] *** LOG addons.xpi: startup
[java] *** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous9132988696593276996webdriver-profile/extensions/webdriver-staging
[java] *** LOG addons.xpi: checkForChanges
[java] *** LOG addons.xpi-utils: Opening database
[java] *** LOG addons.xpi-utils: Creating database schema
[java] *** LOG addons.xpi: New add-on fxdriver@googlecode.com installed in app-profile
[java] *** Blocklist::_loadBlocklistFromFile: blocklist is disabled
[java] *** LOG addons.xpi: New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global
[java] *** LOG addons.xpi: Updating database with changes to installed add-ons
[java] *** LOG addons.xpi-utils: Updating add-on states
[java] *** LOG addons.xpi-utils: Writing add-ons list
[java] *** LOG addons.manager: shutdown
[java] *** LOG addons.xpi: shutdown
[java] *** LOG addons.xpi-utils: shutdown
[java] *** LOG addons.xpi-utils: Database closed
[java] *** LOG addons.xpi: startup
[java] *** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous9132988696593276996webdriver-profile/extensions/webdriver-staging
[java] *** LOG addons.xpi: checkForChanges
[java] *** LOG addons.xpi: No changes found
[java] process 149: D-Bus library appears to be incorrectly set up; failed to read machine uuid: Failed to open "/var/lib/dbus/machine-id": No such file or directory
[java] See the manual page for dbus-uuidgen to correct this issue.
[java] D-Bus not built with -rdynamic so unable to print a backtrace
这是我在入口点脚本中设置显示的方式
#Set the Display
vncserver :1
export DISPLAY=:1
有人可以告诉我可能做错了什么吗?
我做的其他信息和疑难解答: 我认为这可能是Firefox和Selenium的版本兼容性问题(使用selenium 2.44.0和firefox 24),但看起来并非如此。