Test javascript evaluation of parameters
open | ../tests/html/test_store_value.html |
type | theText | javascript{[1,2,3,4,5].join(':')}
verifyValue | theText | 1:2:3:4:5
type | javascript{'the' + 'Text'} | javascript{10 * 5}
verifyValue | theText | 50
verifyValue | theText | javascript{10 + 10 + 10 + 10 + 10}
type | theText | javascript{ function square(n) { return n * n; }; '25 * 25 = ' + square(25); }
verifyValue | theText | 25 * 25 = 625
store | the value | var1
type | theText | javascript{'${var1}'.toUpperCase()}
verifyValue | theText | ${VAR1}
type | theText | javascript{storedVars['var1'].toUpperCase()}
verifyValue | theText | THE VALUE
verifyExpression | javascript{storedVars['var1'].toUpperCase()} | THE VALUE
verifyExpression | javascript{selenium.getValue('theText')} | regexp:TH[Ee] VALUE