javascript - Selenium: How to verify a word in a string inside a variable? -


i'd know how verify if there's word inside string (using variables).

for example, have variable called options has string "test,test2,test3" (without quotes) inside it. want verify if string contains word test2.

i've tried way:

  1. command: store // target: test,test2,test3 // value: options
  2. command: storeeval // target: javascript{storedvars['options'].contains("test2");} // value: result

i want selenium store true or false on variable result if finds or not word test2 on string, i'm getting error:

[error] unexpected exception: typeerror: storedvars.options.contains not function. filename -> chrome://selenium-ide/content/selenium-core/scripts/selenium-api.js, linenumber -> 2545

any ideas?

screenshoot: http://oi40.tinypic.com/2qibcxf.jpg

javascript{storedvars['options'].search("test2");} worked.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -