Arithmetic
These keywords are helpful in performing arithmetic operations on values so that they can be used further in the test script.
Suppose you wish to add two numbers and use their resultant value further is the test case.
Structure :
addNumbersAndStore<parameters>
<further steps to execute>
rAction | Parameters | Example Usage |
---|---|---|
addNumbersAndStore
To store the values after addition of the values mentioned in different parameters (mentioned in Parameter 2 to 10). | Param 1 : Variable name to store value in | Example :
Adds numbers 2, 3, 4 & 1.5. Stores the added value 10.5 in variable sumTotal  |
divideNumbersAndStore
To store the result into variable (variable mentioned in parameter 1) after dividing (value mentioned in Parameter2) with (value mentioned in parameter 3). | Param 1 : Variable name to store value in | Example :
Divides the number 99 by 11. Stores the divided value 9 in variable bqVariable. |
mutiplyNumbersAndStore
To store the result into variable (variable mentioned in parameter 1) after multiply (values mentioned in Parameter2 and parameter 3). | Param 1 : Variable name to store value in | Example :
Multiplies the number 11 & 9. Stores the multiplied value 99 in variable bqVariable. |
subtractNumbersAndStore
To store the result into variable (variable mentioned in parameter 1) after subtracting (value mentioned in Parameter 3) from (value mentioned in Parameter 2). | Param 1 : Variable name to store value in | Example :
Subtracts the number 77 from 99. Stores the subtracted value 12 in variable bqVariable. |
Â