L
lofenee
I wonder if java.awt.robot can be used to test an applet without changing
any source code?
any source code?
I wonder if java.awt.robot can be used to test an applet without changing
any source code?
I wonder if java.awt.robot can be used to test an applet without changing
any source code?
...
'without changing any source code?' what does that mean?
I expect the OP is referring to the applet itself.
...
...just got in the office - still haven't had my morning
coffee![]()
Can the applet be loaded in the AppletViewer?
(If the answer to my second question is 'yes', then
the answer to your question is certainly 'yes'. My
first suggestion might have been 'dump Robot for
JUnit or JFCUnit', but it seems they cannot handle
applets.)
Is there any difference from applet being loaded by the browser
while loaded in the AppletViewer?
If the applet is loaded
..in the AppletViewer, can Robot obtain
the handler of it?
I wonder if java.awt.robot can be used to test an applet without changing
any source code?
Robot can be used to test anything which involves mouse, keyboard and
screen. It, actually, takes control over your mouse, keyboard and have
ability to have screen shots. It's your real mouse, not mouse inside
Applet or your Java application.
You can even write your own VNC server using Robot.
Unfortunately, allowing computer to have control over your mouse/
keyboard is not good idea. That's the reason why Robot is not used for
tests.
Alex.
http://www.myjavaserver.com/~alexfromohio/
<[email protected]>
??????:c2e7e232-12b0-429b-97ca-bcda292a7...@z72g2000hsb.googlegroups.com....
...
I don't know what Robot class you referenced.
As I know, there is a class java.awt.robot, ...
My entire earlier replies were based on the
assumption that you actually meant..
'java.awt.Robot' (note the capital 'R').
As following code,
Frame jframe=getFrame("test");;
JButton jbtn=getButton(jframe,"jButton1");
I regard jframe as a handler of the Frame.
No, there is no such thing. By Sun's common
nomenclature, you would be referring to a package
if mentioning a lower case 'r'.
My entire earlier replies were based on the
assumption that you actually meant..
'java.awt.Robot' (note the capital 'R').
Andrew Thompson said: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.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.