Note that there are some explanatory texts on larger screens.

plurals
  1. POExpect - does not send text as desired
    primarykey
    data
    text
    <p>I am developing a script to be used for regression testing of installation of a software. The expect code is given below. The first few lines of code run well where the license file is browsed and agreed to. However, the script halts at "Please enter the pathname to a valid license file:" and does not do anything. (Note: Manually the installation proceeds smoothly).</p> <p>Also, please note that the cursur for all the inputs is always located to the right of the displayed text; but in the case of the last prompt ("Please enter the pathname to a valid license file:") the cursor is located below the text and in the line below. I am not sure if this has to do anything with the issue.</p> <p>What am I doing wrong? How do I debug this issue? I appreciate any help from you all.</p> <p>Thanks Nazir</p> <p><strong>Here is the code:</strong></p> <pre><code>#!/usr/bin/expect spawn ./temp expect { "More--*" { send " " exp_continue } "Do you accept this license agreement?*" { send "yes\r" } } expect "Do you want to use the default path?*" { send "yes\r" } expect "This load path does not exist. Do you want to create it?*" { send "yes\r" } expect "Please enter the pathname to a valid license file:*" { send "/path_to_file\r" } interact </code></pre> <p><strong>Here is how the output looks:</strong></p> <pre><code>.....(license stuff) Do you accept this license agreement? [no] yes Please specify where the xxx software will be loaded. The default location is /usr/local/aaa. Do you want to use the default path? [yes] yes The software will not run without a valid license file installed. Please enter the pathname to a valid license file: </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload