Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GWT,打开/查看测试中的窗口类_Gwt - Fatal编程技术网

GWT,打开/查看测试中的窗口类

GWT,打开/查看测试中的窗口类,gwt,Gwt,我是GWT新手,我想知道是否有一种在GWT中测试和扩展窗口类的方法。 是否有可能以同样的方式在chrome中打开此窗口。我想在junit上测试一下。只是为了部署me窗口,以便在部署整个项目之前对其进行测试 public class WinAhorroPrg extends Window 这会节省我很多时间 只需像测试一样调用它 @Test public void testWindowWinAhorroProg{ /*some other classes/code*/ winAhorroPrg.

我是GWT新手,我想知道是否有一种在GWT中测试和扩展窗口类的方法。 是否有可能以同样的方式在chrome中打开此窗口。我想在junit上测试一下。只是为了部署me窗口,以便在部署整个项目之前对其进行测试

public class WinAhorroPrg extends Window
这会节省我很多时间

只需像测试一样调用它

@Test
public void testWindowWinAhorroProg{
/*some other classes/code*/
winAhorroPrg.show();
}
然后打开它


顺便说一句,我使用的是一个非常旧的gwt版本(2.1.1),不允许更新。

在gwt中,
窗口
类提供对浏览器窗口的方法、属性和事件的访问。在Junit中运行时,您将没有浏览器。有一个名为的浏览器模拟,它可能会帮助您以某种方式思考如何实现测试。还可以查看。

在GWT中,
窗口
类提供对浏览器窗口的方法、属性和事件的访问。在Junit中运行时,您将没有浏览器。有一个名为的浏览器模拟,它可能会帮助您以某种方式思考如何实现测试。还有,请看一下。

GWT 2.0之后是否包含HtmlUnit以及GWT,或者您需要添加jar?@JuanDiego实际上,
HtmlUnit
不是GWT的一部分。但GWt对此表示支持。我的建议是检查GWT版本是否具有枚举
Platform.HtmlUnit
或类
RunStyleHtmlUnit
。它将表明它是兼容的。HtmlUnit是在GWT 2.0之后包含在GWT中还是需要添加jar?@JuanDiego实际上,
HtmlUnit
不是GWT的一部分。但GWt对此表示支持。我的建议是检查GWT版本是否具有枚举
Platform.HtmlUnit
或类
RunStyleHtmlUnit
。这将表明它是兼容的。