[lug] Autoexpect
Adelaide Yip
adelaide.yip at compeng.net
Thu Jul 26 09:59:55 MDT 2001
I am currently doing some testing on a website. We would like to implement
the various tests repetitively on the website using Autoexpect bu running
the expect script that it creates. I invoke Autoexpect to create the
script using these commands:
autoexpect -f testexpect lynx http://www.compeng.net
autoexpect started, file is testexpect
(Using lynx, I coast through the website, then quit the lynx
session to close the autoexpect file.)
autoexpect done, file is testexpect
Am I running the right commands?
The problem comes when I run the autoexpect script: ./testexpect.exp.
Autoexpect spawns the lynx to the correct site, but then stalls and stops.
I can only stop the script from executing by pressing [CTRL]+[C]. I've
looked at the *.exp script, it seems to have recorded all the movements
made (however, I am not at all familiar with Expect scripting).
I find that when my movements are extremely slow, then script stalls later
on in the process. ... Is this due to the timing problems noted in the
autoexpect man pages?
[from autoexpect man pages ...]
"It is important to understand that autoexpect does not guarantee a
working script because it necessarily has to guess about
certain things - and occasionally it guesses wrong. However, it is usually
very easy to identify and fix these problems. The typical
problems are:
Timing. A surprisingly large number of programs (rn, ksh, zsh,
telnet, etc.) and devices (e.g., modems) ignore keystrokes that
arrive "too quickly" after prompts. If you find your new script hanging
up at one spot, try adding a short sleep just before the previous
send."
Is this a timing problem? Any suggestions would be great, thanks.
BTW, I've tried running Autoexpect 5-31 on Redhat 7.1 and Autoexpect 5.28
on Redhat 6.2. I'm am not part of this mailing list, please reply to
adelaide.yip at compeng.net.
TIA,
Adelaide
More information about the LUG
mailing list