0

I am trying to assert that three elements are visible. I set up the following command to store the xpath count:

storeXpathCount | xpath=//input[contains(@class,"k-formatted-value") and contains(@class, "call-timer-editor")] | x

and x="3", which is correct. Now, I want to assert that all three of those inputs are visible. so I do:

verifyVisible | xpath=//input[contains(@class,"k-formatted-value") and contains(@class, "call-timer-editor")][1] | 
verifyVisible | xpath=//input[contains(@class,"k-formatted-value") and contains(@class, "call-timer-editor")][2] | 
verifyVisible | xpath=//input[contains(@class,"k-formatted-value") and contains(@class, "call-timer-editor")][3] |

The first line evaluates to true, but the other (which are for sure visible) evaluate to false. How should I correctly index to the three inputs?

ism
  • 288
  • 1
  • 5
  • 17

1 Answers1

1

Since you did not post code or link to the page you are automating I can only guess. Try this:

xpath=(//input[contains(@class,"k-formatted-value") and contains(@class, "call-timer-editor")])[2]
SiKing
  • 10,003
  • 10
  • 39
  • 90