When this action is executed the result of evaluating result
is returned by
the current run of Expect.
When this action is executed:
When this action is executed:
1. The current run of Expect is terminated (like with an Exit
) but its return value is discarded.
2. result
is evaluated to obtain the expect.
3. The obtained expect is run with the same run context (timeout, charset, etc) as the terminated expect.
4. The result obtained in the previous step becomes the result of the current expect (the terminated one).
This works out as a special combination of an Exit
with a Returning
. Where the exit deallocates the
resources allocated by the current expect. And the result of the Returning
is obtained from the result of
executing the received expect.
Any action or expect block added after this will not be executed.
When this action is executed:
When this action is executed:
1. The current run of Expect is terminated (like with an Exit
) but its return value is discarded.
2. result
is evaluated to obtain the expect.
3. The obtained expect is run with the same run context (timeout, charset, etc) as the terminated expect.
4. The result obtained in the previous step becomes the result of the current expect (the terminated one).
This works out as a special combination of an Exit
with a Returning
. Where the exit deallocates the
resources allocated by the current expect. And the result of the Returning
is obtained from the result of
executing the received expect.
This allows to construct the Expect based on the regex Match. This action can only be added to a RegexWhen. Any action or expect block added after this will not be executed.
When this action is executed the result of evaluating result
is returned by
the current run of Expect.
When this action is executed the result of evaluating result
is returned by
the current run of Expect.
This allows to return data based on the regex Match.
This action can only be added to a RegexWhen.
If more than one returning action is added to a When only the last result
will be returned.
Note however that every ReturningAction
will still be executed.
Launches a java.lang.Process
with methods to read and print from its stdout and stdin respectively.
Launches a java.lang.Process
with methods to read and print from its stdout and stdin respectively.
the command to launch and its arguments.
how much time to wait when performing a read.
the charset used for encoding and decoding the Strings.
how many bytes to read.
whether to redirect stdErr to stdOut.
When this action is executed text
will be sent to the stdIn of the underlying process.
When this action is executed text
will be sent to the stdIn of the underlying process.
the text to send.
When this action is executed the result of evaluating text
will be sent to the stdIn of the underlying process.
When this action is executed the result of evaluating text
will be sent to the stdIn of the underlying process.
This allows to send data to the process based on the regex Match.
This action can only be added to a RegexWhen.
the text to send.
When this action is executed the current run of Expect is terminated causing it to return the last value, if there is a ReturningAction, or the default value otherwise.
When this action is executed the current run of Expect is terminated causing it to return the last value, if there is a ReturningAction, or the default value otherwise. Any action or expect block added after this will not be executed.
When this action is executed the result of evaluating
result
is returned by the current run of Expect. If more than one returning action is added to a When only the lastresult
will be returned. Note however that everyReturningAction
will still be executed.