How can I compare two stored texts and if they are equal to echo some result?
You can use the verifyEval
command to compare two variables:
store | text | i
store | different text | j
verifyEval | storedVars['i']==storedVars['j'] | true
Running this script as written will cause the test to fail with [error] Actual value 'false' did not match 'true'
. Change j
to text
, and it will complete without error.
Note that this can also be used to verify that two strings are not equal, by changing true
to false
in the verifyEval
command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With