Loop in listview

Hi,

I’d like to select first line and then press the button above, then select the second line and then press the button again. This loop will continue until the end of the total count of the list.

It’s a vb.net application window. And here is the selector of the first line:

wnd ctrlname='lvwConfirmed_Firms'
ctrl name='Confirmed' role='list item' idx='1'

Need help for constructing this loop in the listview. Thanks in advance.

image

@Jenni_K

the idx can be dynamized with following:

define a counter representing your idx

in a do while loop you can handle:

  • element exits - check if the elemen is present
  • if yes - click / process / otherwise end loop
  • counter = counter +1

the loop runs as long the element exists is true

3 Likes

Thanks for the tutorial! It made it easy for me to set idx as a variable in the selector and use it as a counter in the do while loop. And then I ended the loop when element exists is not true anymore.

ctrl idx=’{{idx}}’

Thank you very much for the support!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.