HTML:
<!-- Block 1--> <div class="row"> <div> <span>Type</span> </div> <div> <iput class="ant-select-dropdown-menu-item" placeholder="Input value"></iput> </div> </div> <!-- Block 2--> <div class="row"> <div> <span>Type</span> </div> <div> <iput placeholder="Input value"></iput> </div> </div> <!-- Block ..N --> <div class="row"> <div> <span>Type</span> </div> <div> <iput placeholder="Input value"></iput> </div> </div> JS:
for(let i = 0; i < 4; i++) { cy.contains('div', 'Type') .next() .find('div') .eq(i) .click({ multiple: true }) cy.get('.ant-select-dropdown-menu-item') .eq(i) .type(`value ${i}`) } There are many bloks with input field for each. I want to input value for each. I make cycle but value is inputted only in the first input value. How can I solve this for each input field?