0
votes

Not a developer, new to Selenium IDE, and yes, limited to sticking with IDE only. Appreciate any and all help.

Trying to grab a password from an email generated upon Password Reset so the script can then log in with the new password.

Thought I'd do a split on a delimiter in the email content, Trim as necessary to grab the password. Running into problems with how to store the returned array. In order to do what I'm thinking, I need to store it back into an array that Selenium can traverse.

storeText | css=body | emailText

getEval | storeResults = javascript{storedVars['emailText'].split("delimiter")}

The getEval throws an "missing ; before statement" exception. Using method store instead of getEval works (and moving storeResults to a target), but then the results are typecast as a string. I feel I'm missing something very basic here.

2

2 Answers

0
votes

I think the keyword javascript must be omitted

For me the following code works: storeText | //*[@id="_currentProduct"] | myText getEval | alert(storedVars['myText'])

When run the alertbox has the value of myText.

0
votes

Thanks for the response. I came to the same conclusion. Here's the working code:

getEval | storeResults = storedVars['emailText'].split("delimiter")

Was able to access the stored value this way: LOG.info(storeResults[1])