I am attempting to extract text from an element and store it in a variable. I then want to grab a specific portion of that text using the substring method, save it in another variable, and use it to search for similar text on a different webpage.
Below is the code snippet:
storeTextPresent - css=div#titol-pantalla > h2 - var_nCtr
storeEval - javascript{storedVars['var_nCtr'].substring(12,23)} - var_simul
However, when executing this code, Selenium throws the following error:
[error] Unexpected Exception: fileName -> chrome://selenium-ide/content/selenium-core/scripts/selenium-api.js, lineNumber -> 2535, columnNumber -> 0
I initially thought the issue might be related to Chrome, but even after uninstalling it, the error persists.
I also attempted adding ":" between "javascript" and the curly braces:
storeEval - javascript:{storedVars['var_nCtr'].substring(12,23)} - var_simul
Unfortunately, this modification did not resolve the error either.
Following advice from a forum post, I tried eliminating the "javascript" keyword:
storeEval - {storedVars['var_nCtr'].substring(12,23)} - var_simul
Despite these attempts, the issue remains unresolved.
I have researched extensively online but found no definitive answers to address my problem.