VantageManager Telnet script commands Script version 1.1, 2019-04-20 Script consist of a number of lines which will be executed in seqeuence. Any empty line or line that starts with a semicolon ";" will be ignored <str-exp> may be - A constant string enclosed in single ' or double ". Special characters may be inserted, such as \n \t etc. Example "show ver" - A variable identifier of a variable previously assigned (see the set command below) - Two <str-exp> seperated by the + operator. Example "abcd" + "def" - The result of a command/function as defined below. Example "The result is:" + recuntil " >" - A variable identifier of a variable previously assigned (see the set command below) <int-exp> may be - A constant integer number. Example 1, 5. - A variable identifier of a variable previously assigned (see the set command below) - Two <int-exp> seperated by the + operator. Example 3+7 - booelan expression with the operators "not", "and", "or". Examples with result in : not 2 , 3 and 4  - parenthesis may be used. Example: (3 and 0) or 11  - the result of comparing two ints or strings with the == or != operator. Examples "aa"==recuntil " >", 2!=5 - The result of a command/function as defined below. Example match "def", "abcdef"  Commands/functions: send <str-exp> Send a string to the DUT via telnet Returns the same string as sent. sendln <str-exp> Send a string followed by CRLF to the DUT via telnet Returns the same string as sent. recuntil <str-exp> Receive data from the DUT until it contains the string specified Return the received data up to but not including the string. recln Receive data from the DUT until next CRLF Return the received data up to but not including the CRLF. wait <int-exp> Wait the specified number of seconds Returns 1 failif <int-exp> Will abort script execution (and also test execution) with an error message if <int-exp> is not 0. Returns 0 if the script is not aborted. Does not return if it is aborted. log <str-exp> Prints the specified expression to the test log on the UI (which is also included in the test report) Returns the same string. match <str-exp-1> , <str-exp-2> Matches two expessions. Returns 1 if <str-exp-1> is contained in <str-exp-2> and 0 otherwise. <str-exp-1> may be a regular expression with usual wildcards, regex syntax etc. set <varid> = <str-or-int-exp> Assign the value to the variable specified which may be used in other expressions. Returns the value of the expression. Examples of scripts: ; script that will login to DUT log "Login to DUT..." log recuntil "login: " sendln "admin" recuntil "Password: " sendln "12345" recuntil " >" log "Login successfull..." ; check if version of DUT is 5.2 as obtained by the system resource print command sendln "system resource print" log recuntil " >" log recuntil " >" set reply= recuntil " >" log reply failif not match "version: 5.2", reply log "Version of DUT is correct ..."