Robot Framework library for running keywords in sequence
MIT License
RobotFramework-SequenceLibrary is a Robot Framework library for running keywords in sequence. The purpose is to streamline the execution of common operations by providing a condensed syntax that allows users to perform tasks with fewer lines of code.
You can install robotframework-sequencelibrary via pip:
pip install robotframework-sequencelibrary
Documentation can be found at https://crsdet.github.io/robotframework-sequencelibrary.
*** Settings ***
Library SequenceLibrary
*** Test Cases ***
Test Generate Random Int And Set A Test Variable
${num} Run Sequence
... Random Int 18 100
... AND
... Set Test Variable $RANDOM_NUMBER
Variable Should Exist ${RANDOM_NUMBER}
Should Be Equal ${num} ${RANDOM_NUMBER}
Test Replace Last Returned Value
${num} Run Sequence
... Random Int 18 100
... AND
... Set Test Variable $RANDOM_NUMBER
... AND
... Evaluate $_ + 10
... AND
... Set Test Variable $RANDOM_NUMBER_PLUS_10
Variable Should Exist ${RANDOM_NUMBER}
Variable Should Exist ${RANDOM_NUMBER_PLUS_10}
Should Be Equal ${RANDOM_NUMBER + 10} ${RANDOM_NUMBER_PLUS_10}
Should Be Equal ${num} ${RANDOM_NUMBER_PLUS_10}
Test Last Returned Value Remains If Previous Keyword Does Not Return A Value
${num} Run Sequence
... Random Int 18 100
... AND
... Log
... AND
... Set Test Variable $RANDOM_NUMBER
Variable Should Exist ${RANDOM_NUMBER}
Should Be Equal ${num} ${RANDOM_NUMBER}
You can also specify a different separator or replace string:
*** Settings ***
Library SequenceLibrary separator=${SEPARATOR} replace=${REPLACE}
*** Variables ***
${SEPARATOR} ->
${REPLACE} %
RobotFramework-SequenceLibrary is open source software provided under the MIT License.