Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Also might want to add that cy.contains() always takes the first instance of an element in case there are multiple elements that fit. So in case you want to address the first button, this will work. If you want to address the 2nd one, you will need a completely different approach Commented Nov 18, 2021 at 13:25
  • Thanks Emmanuel. Asking developer to add a unique id has been the easiest way. However i would like to create from the existing DOM structure :) Commented Nov 19, 2021 at 12:37