问题描述
我已经在linux mint上安装了jenkins作为服务。我正在尝试运行python编写的脚本,脚本无法运行firefox。这条线是一个问题。...
self.browser = webdriver.Firefox()
... $ /
当我以jenkins用户身份登录时,我无法运行firefox。得到这个错误:
lockquote
(process:3758):GLib-CRITICAL **:g_slice_set_config:assertion
'sys_page_size == 0 '失败未指定协议无协议
指定错误:无法打开显示:0
我的(登录)用户。
只需在您的机器上安装虚拟帧缓冲区, $ b现在我使用的是Xvfb,但还有很多其他的。
这里有一些教程来设置你的机器:
另外,这个插件:
I have installed jenkins as a service on linux mint. I am trying to run tests written in python and script cannot run firefox. This line is a problem.
...self.browser = webdriver.Firefox()...
When i log in as jenkins user, i can't run firefox. getting this error :
Firefox works when i run it from my (logged in) user.
Just install a virtual framebuffer in your machine and it will work.
Now i'm using Xvfb, but there are many others.
Here is some tutorials to setup your machine:
- http://www.installationpage.com/selenium/how-to-run-selenium-headless-firefox-in-ubuntu/
- http://www.labelmedia.co.uk/blog/setting-up-selenium-server-on-a-headless-jenkins-ci-build-machine.html
Also, there is this plugin: https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin
这篇关于詹金斯不能运行Firefox:没有协议指定错误:无法打开显示器::0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!