I'd like to know how to verify if there's a word inside a string (using variables).
For example, I have a variable called options that has a string "test,test2,test3" (without quotes) inside it. I want to verify if this string contains the word test2.
I've tried this way:
- command: store // target: test,test2,test3 // value: options
- command: storeEval // target: javascript{storedVars['options'].contains("test2");} // value: result
I want Selenium to store TRUE or FALSE on that variable result if it finds or not the word test2 on this string, but I'm getting this error:
[error] Unexpected Exception: TypeError: storedVars.options.contains is not a function. fileName -> chrome://selenium-ide/content/selenium-core/scripts/selenium-api.js, lineNumber -> 2545
Any ideas?
Screenshoot: http://oi40.tinypic.com/2qibcxf.jpg
options
array to find your boolean result. – Mark Rowlands Jul 17 at 12:24