How to store the values of the links in an array using selenium IDE

社会主义新天地 提交于 2019-12-12 03:52:26

问题


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.

  1. Getting the first value from array(i.e. 20).
  2. Check for condition.
  3. If condition fails, increment the array count by 1.(It should be 21).
  4. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!