我是基于FEST的GUI测试的新手。让FEST等待应用程序加载
MyFrame是我的应用程序的根类。
@Before
public void onSetUp() {
MyFrame frame = GuiActionRunner.execute(new GuiQuery<MyFrame>() {
protected MyFrame executeInEDT() {
return new MyFrame();
}
});
frame2 = new FrameFixture(robot(), frame);
frame2.show(); // shows the frame to test
}
当运行测试情况下,
@Test public void testGui()
{
String rs = frame2.label("hl").text().toString();
assertTrue(rs.equals("First"));
}
上述方法不打印存在于标签的实际字符串。
我认为FEST API并未等待应用程序加载。
是否有任何方法可用于推迟GUI元素查找?
看我的答案在这里http://stackoverflow.com/questions/8957334/making-fests-component-lookup-mechanism-wait-for-a-component-to-exist/11738497#11738497 – Whimusical 2012-07-31 11:05:27