Re: java.awt.Robot for popup windows
- From: Alex.From.Ohio.Java@xxxxxxxxx
- Date: Thu, 13 Mar 2008 19:52:31 -0700 (PDT)
On Mar 13, 6:35 pm, Andrew Thompson <andrewtho...@xxxxxxxxx> wrote:
On Mar 14, 7:36 am, Alex.From.Ohio.J...@xxxxxxxxx wrote:Thanks, Andrew.
Does it matter? It's definitely not military ;)I'm trying to use Robot to automate some work.What work?
By binary you mean jar file? ;) Which I can decompile and have source?..So far it's fine except sometimes JOptionPaneWhat JOptionPane? Is this something in code that
is directly controlled by you, or do you just have
a binary?
Of course I can do this but I don't need it because it's my program
and I have source.
But what makes you think that if I have code I can do whatever I want
with it? Of course I can do whatever I want but does it have sense?
Program will be overcomplicated if I add too many controls inside.
Like don't popup confirmation window if it's in test mode or something
like this. Or eliminate GUI or make it work with DSL and use this DSL
directly fr tests. I can do all this and this beauty of Java.
It's also beauty that I can eliminate all this crap and try to
interact with program by Robot and program (actually, class/object)
doesn't even know about it.
Let's say I wrote a game and want to test it for different tactics. If
I include these logics inside game it would be fine. But how can I
test random behavior of user or some mistakes like pushing wrong
button? Should I enter the code for each button - click it by mistake?
With Robot it's easy. It can collect all buttons and then "click" then
based on tactics. Program doesn't know who drives the game. It just
answers the clicks.
But what to do when unexpected occurs like exception is shown in
JOptionPane and who knows when and why it could be.
That was the question.
Looks there is no simple answer like get Container on focus and work
with it... Getting the picture and recognize that it has some
JOptionPane and what button to click looks more like AI and is not
good for any Robot ;(
Sincerely, Alex.
http://www.myjavaserver.com/~alexfromohio/
.
- Follow-Ups:
- Re: java.awt.Robot for popup windows
- From: Andrew Thompson
- Re: java.awt.Robot for popup windows
- References:
- java.awt.Robot for popup windows
- From: Alex . From . Ohio . Java
- Re: java.awt.Robot for popup windows
- From: Andrew Thompson
- java.awt.Robot for popup windows
- Prev by Date: Re: java.awt.Robot for popup windows
- Next by Date: Re: java.awt.Robot for popup windows
- Previous by thread: Re: java.awt.Robot for popup windows
- Next by thread: Re: java.awt.Robot for popup windows
- Index(es):