Windows theory question.. progs interacting with progs

R

Rayle

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
 
O

Oliver Wong

Rayle said:
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

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

- Oliver
 
M

Mark Space

Rayle said:
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

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.
 

Ask a Question

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.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,234
Latest member
SkyeWeems

Latest Threads

Top