title: How to get an element that has a dynamic selector in Cypress
body: <p>My script has a button which leads to an external site where I need to input some information in a field.</p>
  <p>I'm not able to find a way to select that field because it's within an iframe and also has a dynamically generated ID. That ID has 2 characters at the end that are <strong>always consistent</strong>.</p>
  <p>So far I've tried:</p>
  <p><code>cy.get('#*_2');</code> --&gt; Trying to use a wildcard to click on the element that has a  _2 at the end but it does not work</p>
  <p>I've tried using a <code>cy.get('input[data-collect-as=&quot;input&quot;]')</code> --&gt; It's not able to find this element either.</p>
  <p>Any help would be appreciated.</p>
  <p><a href="https://i.stack.imgur.com/yPrHx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yPrHx.png" alt="enter image description here" /></a></p>