how to use variable from runscript command

Posted by poe on Stack Overflow See other posts from Stack Overflow or by poe
Published on 2010-06-18T11:48:59Z Indexed on 2010/06/18 11:53 UTC
Read the original article Hit count: 218

Filed under:

I get some text from a web page 5,19 € 3,50 € I want to split this text after "€". for that I'm using this command runScript|javascript{var prices = storedVars['price'].split("€"); document.write(prices[0]); document.write(prices[1])}; after done that try this command getEval|alert(storedVars['prices[0]']) the answer is that prices is undefined. what is the problem here? how can I get this variable from a runScript command?

thanks for helping me!

© Stack Overflow or respective owner

Related posts about selenium-ide