1

When I SAVE this as a link in Selenium IDE:

Command type  > Target id=title  > Value javascript{"Code" + Math.floor(Math.random()*11111)}

It will become

"link=Code(numbers)" --->>Name of link will be "Code with random numbers".

My Question is, how do I store this name with random number and when I want to select this name and the random number "Link", how do I go about this?

I mean, I want to save this "link" with the Target as "Code" with a random number into a variable and select exactly the same one again?

Is it possible that I can select this link that I just created?

PLEASE HELP ME

Danny

1

This is very simple question and very simple answer as well. This should work for you:

storeEval      | Math.floor(Math.random()*11111) | RandomNumber
type           | id=title                        | ${RandomNumber}
...
waitForVisible | link=Code${RandomNumber}
click          | link=Code${RandomNumber}

first line will store random value into the RandomNumber variable. each time you use varibale by ${xxx} the value will pop in the result action.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.