| || |
How to randomly pick a link in SilkPerformer
I am new SilkPerformer, and I need help for scripting SilkPerformer test script.
Here is the description.
A user logs in a site, and start searching an item with search form. After submitting the search query, a list of search result is return. The user randomly picks one of the link result to view the detail of the item.
In the document, it only says about how to randomly fill a web form, but not open the link. Or I missed something in the doc?
Any idea? The purpose of having the random link is that the database for the performance test env is constantly changing, so I cannot rely on the fix expected result to run the test every time.
Re: How to randomly pick a link in SilkPerformer
Actually, I found out a solution myself: WebPageQueryLink();
With this method, one can look for any specific link and save it into an array of string.
Then use the random number to get the random string, and put it in WebPageLink().
Any better solution, anyone?