Reputation: 71
I am new to selenium IDE. After searching for hours, I can't find the way to do what i want. What I need to do is quite simple. I have an html page with a lot of bookmarks. I can work with it online or offline. so I need the script to pick randomly a link from the group of links. then click that link. What's the easier way to do that?
note: Using firefox and selenium IDE 2.4.0
thanks.
Upvotes: 2
Views: 1583
Reputation: 29032
My best guess would be to use the addScript
command and delegate your task to JavaScript. I have high doubts that Selenium IDE alone will solve your problem.
Here is some pseudo-code
Target:
Command: addScript
Value:
var links = document.getElementsByTagName("a");
var randNum = Math.rand(0, links.length());
links[randNum].click()
Upvotes: 2