Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3274
| From | "Alex.From.Ohio.Java" <alex.from.ohio.java@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: java.awt.Robot for po |
| Message-ID | <0a0906b4-d3ef-4e65-96ba-58d7ee427445@v3g2000hsc.googlegroups.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <04ca6966-5031-442d-b16d-7b16ceb7745f@i12g200 |
| Date | 2011-04-27 15:43 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui On Mar 13, 6:35 pm, Andrew Thompson <andrewtho...@gmail.com> wrote: > On Mar 14, 7:36 am, Alex.From.Ohio.J...@gmail.com wrote: Thanks, Andrew. > > I'm trying to use Robot to automate some work. > What work? Does it matter? It's definitely not military ;) > >..So far it's fine except sometimes JOptionPane > What JOptionPane? Is this something in code that > is directly controlled by you, or do you just have > a binary? By binary you mean jar file? ;) Which I can decompile and have source? 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/ --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next | Find similar | Unroll thread
Re: java.awt.Robot for po "Alex.From.Ohio.Java" <alex.from.ohio.java@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000
csiph-web