Question regarding talking to a process

Hi,

 I am a new user to ruby and have been very impressed by it. I am trying to 

automate the testing of an application written in the unix environment. The
application is a simple GUI, with a lot of menu options and file processing.

 The question I have is that is there any way to talk to the application in 

Ruby, something like how “SENDKEYS” works in VB.

 Since i am a very new user to Ruby, I would gladly welcome all the help I 

can get. Also, please forward me any references with regards to working with
processes(applications).

 IF you would like more information, please let me know. Thank you.

Sincerely,
Pankaj Bolaki

pbolaki@uwm.edu wrote in message
news:1040577065.3e05f2295dd2e@mail02.imt.uwm.edu…

 The question I have is that is there any way to talk to the

application in

Ruby, something like how “SENDKEYS” works in VB.

I guess this depends on what GUI toolkit you are using.
You can probably send windows messages (under MS Windows) and handle those
messages in the GUI toolkit framework.
This has nothing to do with Ruby itself.
I can’t tell you how that would work in FxRuby etc. but I guess this would
be the general approach.

More generally, you could open a socket connection in a separate thread and
communicate with the application that way.
You can easily find examples of small embedded http servers, which are good
for application debugging. See for example miniWiki which PhlIp posted an
update to today in this newsgroup.

Mikkel

“MikkelFJ” wrote:

pbolaki@uwm.edu wrote in message
news:1040577065.3e05f2295dd2e@mail02.imt.uwm.edu…

 The question I have is that is there any way to talk to the

application in

Ruby, something like how “SENDKEYS” works in VB.

I guess this depends on what GUI toolkit you are using.
You can probably send windows messages (under MS Windows) and handle those
messages in the GUI toolkit framework.
This has nothing to do with Ruby itself.
I can’t tell you how that would work in FxRuby etc. but I guess this would
be the general approach.

More generally, you could open a socket connection in a separate thread and
communicate with the application that way.
You can easily find examples of small embedded http servers, which are good
for application debugging. See for example miniWiki which PhlIp posted an
update to today in this newsgroup.

I fear this thread avoids the OP’s outer problem. Why do they need
remote control? And can’t they get it with a named pipe?

That would open the can of worms “how to make IO.popen have a
conversation with a program?”, though…

···


Phlip
http://www.c2.com/cgi/wiki?PhlIp
– Bad nanoprobe! Bad! –