gpt4 book ai didi

python - Selenium fedora xfce 亚马逊 EC2

转载 作者:太空狗 更新时间:2023-10-29 12:18:06 26 4
gpt4 key购买 nike

我在 EC2 上运行 fedora 19 XFCE,当我运行 python selenium 脚本时出现此错误...

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 上运行。

Firefox browser issues with Selenium

关于python - Selenium fedora xfce 亚马逊 EC2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19465516/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com