profile
viewpoint

Ask questionsHow to extract substring from Main string in Selenium IDE Record and Play?

I have text "Welcome to the Automation World". Now i want to extract the word "Automation" from the main string in new Selenium IDE Record and Play using execute script, but not working. Can one help me with example..thanks in advance.

store | Welcome to the Automation World | asset execute script | return "${asset}".substring(0,17) | vartest echo ${vartest}

output.. executeScript on return "${asset}".substring(0,9) with value vartest OK echo: arguments[0]

SeleniumHQ/selenium-ide

Answer questions Kumar2k17

Thank you so much for you reply. I found this. But I'm getting a error when I'm trying to extract the substring

execute script | return ${asset}.substring(0,17) | vartest

Failed: Unexpected token in JSON at position 33