Expect Basics: Tutorial 3
Expect Basics: Tutorial 3
Tutorial 3
To simulate user press return key, use \r, don’t use \n.
When no matching found or no input available, expect waits for a period specified
by timeout variable, (default 10s). It should be an integer.
We can use timeout as a special pattern in expect (no double quota). Example
shown above. It catches timeout signal and performs related actions.
expect_out(buffer)
expect_out(0,string)
expect_out(1,string)
expect_out(2,string)
(.*(a*((ab)*|b*)))