On Jul 16, 11:54*pm, "lofenee" <lofe...@gmail.com> wrote:
> >I am not sure what you mean by 'handler'*.
>
> As following code,
> Frame jframe=getFrame("test");;
> JButton jbtn=getButton(jframe,"jButton1");
>
> I regard jframe as a handler of the Frame.
OK - sure. The AppletViewer itself will generally
have an 'unknown and inscrutable' name. But this
is where the intermediate 'testing' applet comes
into play (did I mention that before?).
It works like this.
A 'womb' applet loads the applet we need to test.
The womb applet is loaded in applet viewer and
thereafter loads the applet we want to test, but
it has important roles. One of them would be to
obtain a reference to the (J)Frame that is the
AppletViewer.
This allows the loader applet to set the title of
the frame to something that the Robot can identify.
Once that reference is obtained, you might handle
the testing in the 'normal way', though perhaps
with some slight variation,s given the Test applet
is an applet hosted within another applet.
--
Andrew Thompson
http://pscode.org/