title: How can I find and click a button that has no text using React Testing Library?
body: <p>Many <a href="https://github.com/testing-library/react-testing-library" rel="noreferrer">React Testing Library</a> examples show how to find and click a button using the <code>getByText</code> query, as in:</p>
  <pre><code>fireEvent.click(getByText(&quot;Create&quot;))
  </code></pre>
  <p>OR</p>
  <pre><code>userEvent.click(getByText(&quot;Create&quot;))
  </code></pre>
  <p>However, it's common to have buttons with no text and only SVG icons, like Material UI's <a href="https://material-ui.com/components/buttons/#icon-buttons" rel="noreferrer">icon buttons</a> or <a href="https://material-ui.com/components/floating-action-button/#floating-action-button" rel="noreferrer">floating action buttons</a>. Is there a recommended way to query for and click buttons like these? For context, I'm using the higher-level events provided by the companion <a href="https://github.com/testing-library/user-event" rel="noreferrer">user-event</a> library.</p>