Python 硒软呢帽xfce亚马逊EC2
我在EC2上运行Fedora19XFCE,当我运行python selenium脚本时,出现了这个错误Python 硒软呢帽xfce亚马逊EC2,python,linux,selenium,selenium-webdriver,xfce,Python,Linux,Selenium,Selenium Webdriver,Xfce,我在EC2上运行Fedora19XFCE,当我运行python selenium脚本时,出现了这个错误 E ====================================================================== ERROR: test_PROG (__main__.TEST_PROG) ---------------------------------------------------------------------- Traceback (most
E
======================================================================
ERROR: test_PROG (__main__.TEST_PROG)
----------------------------------------------------------------------
Traceback (most recent call last):
File "selenium_asda.py", line 24, in setUp
self.driver = webdriver.Firefox()
File "/usr/lib/python2.7/site-packages/selenium-2.36.0-py2.7.egg/selenium/webdriver/firefox/webdriver.py", line 60, in __init__
self.binary, timeout),
File "/usr/lib/python2.7/site-packages/selenium-2.36.0-py2.7.egg/selenium/webdriver/firefox/extension_connection.py", line 47, in __init__
self.binary.launch_browser(self.profile)
File "/usr/lib/python2.7/site-packages/selenium-2.36.0-py2.7.egg/selenium/webdriver/firefox/firefox_binary.py", line 61, in launch_browser
self._wait_until_connectable()
File "/usr/lib/python2.7/site-packages/selenium-2.36.0-py2.7.egg/selenium/webdriver/firefox/firefox_binary.py", line 100, in _wait_until_connectable
self._get_firefox_output())
WebDriverException: Message: 'The browser appears to have exited before we could connect. The output was: \n(process:22490): GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0\' failed\nGtk-Message: Failed to load module "canberra-gtk-module"\n*** LOG addons.xpi: startup\n*** LOG addons.xpi: checkForChanges\n*** LOG addons.xpi: No changes found\n/usr/lib/firefox/firefox: relocation error: /tmp/tmpxzNZAo/extensions/fxdriver@googlecode.com/platform/Linux_x86-gcc3/components/libwebdriver-firefox-latest.so: symbol _Znwj, version xul24.0 not defined in file libxul.so with link time reference\n'
----------------------------------------------------------------------
Ran 1 test in 5.193s
FAILED (errors=1)
该脚本在我的本地机器上运行良好……我认为这与XFCE的桌面设置有关
我通过vnc连接到该实例,可以毫无问题地获得完整的XFCE桌面
有什么提示吗
已解决:
我将selenium 2.36降级为2.35,测试运行正常。该错误是由于浏览器不兼容造成的。我在尝试运行FF24时也遇到了同样的问题。请在此处尝试使用FF22运行教程
您试过了吗?我在本地dekstop和EC2上安装了相同版本的firefox firefox-24.0-1.fc19.i686,但在EC2上失败了