运行无头JsTestDriver? [英] Run Headless JsTestDriver?

查看:125
本文介绍了运行无头JsTestDriver?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在无头状态下使用jsTestDriver,它会加载浏览器,但无头(你看不到浏览器)或者最小化加载它们?

Is there a way to use jsTestDriver in a headless state where it loads the browsers but does so headlessly (you can't see the browser) or it loads them minimized?

推荐答案

无法配置JsTestDriver以最小化打开浏览器。您必须打开浏览器,因为它们运行JavaScript代码。

There is no way to configure JsTestDriver to open the browser minimized. And you have to open the browsers because they run the JavaScript code.

您可以尝试创建虚拟监视器并在那里打开浏览器。

You can try to create a virtual monitor and open the browser there.

在linux下你可以使用xvfb,例如

Under linux you can use xvfb for this, for example

xvfb-run java -jar JsTestDriver-1.3.3d.jar --tests all --port 4224 --browser firefox chromium-browser --testOutput jsTests

应该在虚拟窗口中打开浏览器。

should open the browser in a virtual window.

这篇关于运行无头JsTestDriver?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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