在没有显示的 Linux 服务器上运行 Chrome WebDriver [英] Running Chrome WebDriver on a linux server with no display

查看:29
本文介绍了在没有显示的 Linux 服务器上运行 Chrome WebDriver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 linux 服务器上使用 selenium2 的 chrome webdriver 运行自动化测试.

I'd like to run automated tests using selenium2's chrome webdriver on a linux server.

我已经使用 Xvfb 设置了 firefox 在服务器上运行(参见 http://www.semicomplete.com/blog/geekery/xvfb-firefox.html)并想用 chrome 做类似的事情.这可能吗?

I've already set up firefox to run on the server by using Xvfb (See http://www.semicomplete.com/blog/geekery/xvfb-firefox.html) and would like to do something similar with chrome. Is this possible?

推荐答案

我还没有找到像 FirefoxBinary 那样以编程方式为 ChromeDriver 执行此操作的方法.

I haven't been able to find a way to do this programmatically for the ChromeDriver like you can with the FirefoxBinary.

我已经提交了一个改进请求,其中附加了一个补丁来允许这样做.你可以在这里看到它:http://code.google.com/p/selenium/issues/detail?id=2673

I've submitted a improvement request which has a patch attached to allow this. You can see it here: http://code.google.com/p/selenium/issues/detail?id=2673

您可以在下面看到斯蒂芬关于如何使用此更改的回复,现在更改已合并.:https://stackoverflow.com/a/16619608/998442

You can see below response from Stephen on how to use this now the change has been merged.: https://stackoverflow.com/a/16619608/998442

这篇关于在没有显示的 Linux 服务器上运行 Chrome WebDriver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆