Why loop in Selenium IDE is not correct?

28 Views Asked by At

In Selenium IDE I want to make click for each element on the page. So I tried the next commands:

  1. here test failed on the click | ${approve[${i}]} | store | css=a[title="Approve"] | approve store | 1 | i while | ${i} <= ${approve.length} click | ${approve[${i}]} | store | ${i} + 1 | i

  2. here it cause click only on the first element

execute script | var links = document.querySelectorAll('a[title="Approve"]'); for (var i = 0; i < links.length; i++) {links[i].click(); }

  1. it is failed on click | ${element} store | css =a[title="Approve"] | approves for each | element | ${approves} click | ${element} end

Please help me to find where is the problem. Thanks.

0

There are 0 best solutions below