I have couple of text_area_field in my application which can be distinguished only by using the value inside it. How can I get a specific element using value?
Ex:
<div data-component="options"> <input data-component="text_area">Value 1</input> <input data-component="text_area">Value 2</input> <input data-component="text_area">Value 3</input> <input data-component="text_area">Value 4</input> I have tried cy.get('[data-component="options"] [data-component="text_area"]').contains('Value 3').clear().type('Edited 3'). but it is giving the error : Timed out retrying: Expected to find content: 'Value 3' within the element: but never did
Any help would be highly appreciated.