开发者

Catch Java generated JFrame pop-up

I'll make it short and specific. I am blackbox testing a commandline uti开发者_如何学Clity in Java (IDE: Eclipse) and at some point it generates a JFrame pop-up, which asks for password. Since I'm making series of automated tests, the password has to be entered automatically. There is no button on the popup so password + enter key is enough.

Should I make somekind of listener or eventhandler, which is waiting for the pop-up, catch it and enter the password? Maybe somekind of process listener?

Any help will be appreciated!


Give your input field and your button a name (Component.setName()) and use the FEST framework to robot control your UI: http://fest.easytesting.org/

But: for cases like this it might be more interesting to be able to give the passwd and username either via the commandline (bypassing the gui) or read it from a config file. (Both will later likely be added to the utillity anyway)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜