问题
I used storeXPathCount
to get the set of links matching a specific format.
Lets consider the count would be 12.
So there are 12 different links available which will have different dates like 20, 21, 22,.....31.
I want to store these values of the links in an array and use the values one by one.
- Getting the first value from array(i.e. 20).
- Check for condition.
- If condition fails, increment the array count by 1.(It should be 21).
- Again check for condition and increment the array.
回答1:
You can execute any javascript with store eval, you can also create a Selenium ide plugin in javascript.
See also this answer selenium ide loop through array variables which seems to be related to this question.
Also there's a sideflow plugin for selenium ide which might make things simpler.
Selenium IDE - sideflow.js loops
https://github.com/darrenderidder/sideflow
This is also an example of how simple it can be to write a Selenium IDE plugin
来源:https://stackoverflow.com/questions/19466529/how-to-store-the-values-of-the-links-in-an-array-using-selenium-ide