Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2007

Tip: Looking for answers? Try searching our database.

Windows theory question.. progs interacting with progs

Thread view: 
Rayle - 08 Feb 2007 19:33 GMT
is it possible to write a program that interacts with lets say
Explorer.. meaning it could control the mouse to click on links.. or
enter text into fields...

am i thinking of this the wrong way??? should i be looking at
manipulating the information sent to the web page???

is either one possible???

just need to get pointed in the right direction
Oliver Wong - 08 Feb 2007 19:55 GMT
> is it possible to write a program that interacts with lets say
> Explorer.. meaning it could control the mouse to click on links.. or
[quoted text clipped - 6 lines]
>
> just need to get pointed in the right direction

   Yes, it's possible. See
http://java.sun.com/javase/6/docs/api/java/awt/Robot.html

   - Oliver
Mark Space - 09 Feb 2007 00:56 GMT
> is it possible to write a program that interacts with lets say
> Explorer.. meaning it could control the mouse to click on links.. or
[quoted text clipped - 6 lines]
>
> just need to get pointed in the right direction

I think this depends heavily on your application.  We'd need to know a
lot more about what you are actually doing.

At a guess, I think the correct way is indeed to stuff info directly to
a web page using some Java HTTP method.  Don't try to use a browser.

Now, I'll back peddle a bit.  Why would one want to use a browser?
Well, to do system testing is one reason.  If you want to make sure your
web page works with a given browser, the best way to do that would be to
fire it up and use a script to control it, so you can test
automatically.  (Clicking on the same link 100's of times isn't
effective use of anyone's time.)  Add scripts for Opera, Firefox and
what-have-you and you have a nice system-test for your web site.

(BTW, I don't think the AWT Robot, mentioned above, would be useful for
this.  I think the Robot only does AWT, so it won't control a non-Java
app.  But there are plenty of free programs that will control any GUI
program on your OS.  Use Google.)

If you are testing something that doesn't depend on the browser (maybe
SQL injection), I'd use a program to access fields and controls
directly.  Faster and easier in the long run, I'd expect.

There are still *many* to control or communicate with a program.
Plugins, more scripts, OS events, widgets, gadgets and then there's the
many mighty forms of IPC (Inter-Process Communication).  But you asked
about web pages so I assume that's what you are after.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.