FESTベースのGUIテストの新機能です。アプリケーションがロードされるのを待つようにする
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
}
Iは、テストケースを実行
、@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