title: Selenium Click A Button, Using Python
body: <p>I have tried to figure this out for a while - no luck.</p>
  <p>I want to click this button:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button name="showMoreButton" data-test-id="show-more-button" aria-label="Show More" type="button" class="uitk-button uitk-button-medium uitk-button-has-text uitk-button-primary"&gt;Show More &lt;/button &gt;</code></pre>
  </div>
  </div>
  </p>
  <p>I have been trying things like this I have found all over the place, but none work:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>element_to_click = driver.find_element(By.xpath("//button[@data-test-id='show-more-button']").click()
  element_to_click = driver.find_element(By.cssSelector(".uitk-button uitk-button-medium uitk-button-has-text uitk-button-primary")).click()</code></pre>
  </div>
  </div>
  </p>
  <p>I think the first failure occurred because Selenium appears to be unable to handle &quot;data-test-id&quot; - something that strikes me a curious weakness...</p>
  <p>I can't understand why the second failure occurred.</p>
  <p>Thanks so much for any help.</p>
  <p>Ellie The Good Dog</p>