I am facing below issue with my script. below is one of the test out of 50 test from the tool which i m trying to automate. the test may show up or may not depending upon the previous results and also from the test some inputs may be asked or may not be asked depending upon previous results so you can assume 40% of input are volatile?
the tool checks for 56 test and some test may show up and may not depending upon previous result is pass or fail so i am using expect as
is this a right way to enter the input only if this shown while executing tool on some of the test this script is failing and i tried to debug but it has so much information that i m not able to understand why its getting time out and expect sending the inputs even if that is not matching with why i quoted to matched?
Last edited by pludi; 03-16-2010 at 11:40 AM..
Reason: code tags, please...
I feel its the right way as long as it works. You have to manually figure out all the possibilities before you can actually put expect to work on that otherwise you are sure to get unexpected results.
I have worked with expect a lot and at times it can get real slow and troublesome. But thats the way it works.
I'm fairly new to scripting so this might not be possible.
I am using Expect with Cisco switches and need to capture the string after finding the expect request. For example, when I issue "show version" on a Nexus switch, I'm looking to capture the current firmware version:
#show version
... (0 Replies)
I have an expect script called remote that I want to call from inside my expect script called sudoers.push, here is the code that is causing me issues:
set REMOTE "/root/scripts/remote"
...
log_user 1
send_user "Executing remote script as $user...\n"
send_user "Command to execute is: $REMOTE... (1 Reply)
I have the below requirement. below is the content of the input file and my expected result
Input file: a.txt
<?xml version="1.0" encoding="UTF-8"?>
<Employee>
<Name>XXXX</Name>
<ID>1233</ID>
</Employee>
<?xml version="1.0" encoding="UTF-8"?>
<Employee>
<Name>YYYY</Name>
<ID>1345</ID>... (2 Replies)
Hi,
Am very new to expect scripting..
Can You please suggest me how to call an expect script inside another expect script..
I tried with
spawn /usr/bin/ksh
send "expect main.exp\r"
expect $root_prompt
and
spawn /usr/bin/ksh
send "main.exp\r"
expect $root_prompt
Both... (1 Reply)
hi,
we have eth1; in the beginning it was proposed to create from eth1, eth1.2500 and eth1.240. It did not worked cause vlan 1.2500 was not tagged in the switch.
so they decided to leave eth1 like a physical interface with eth1.2500 config (removel vlan tag) and create eth1.240
but it did... (0 Replies)
This Expect script provides expect with a list of IP addresses to Cisco IPS sensors and commands to configure Cisco IPS sensors. The user, password, IP addresses, prompt regex, etc. have been anonymized. In general this script will log into the sensors and send commands successfully but there are... (1 Reply)
Hello to all...this is my first post (so please go easy). :)
I feel pretty solid at expect scripting, but I'm running into an issue that I'm not able to wrap my head around. I wrote a script that is a little advanced for logging into a remote Linux machine and changing text in a file using sed.... (2 Replies)