title: I can click() a button, but not see innerHTML/length. What's up? (NodeJS)
body: <p>Firstly I want to check if the modal exists, and if it  does click "continue". I can click continue but not check if the modal exists in the first place because when I run .length it returns undefined.
  The div I am trying to get:</p>
  
  <pre><code>&lt;div class="v--modal-box v--modal" style="top: 219px; left: 479px; width: 325px; height: auto;"&gt;
      &lt;div class="v--modal-close-button absolute border-5 border-dark-grey-4 bg-slate-dark rounded-full z-50"&gt;
          &lt;button class="w-full h-full flex items-center justify-center text-grey hover:text-light-grey-1"&gt;
              &lt;svg viewBox="0 0 22 22" class="fill-current"&gt;
                  &lt;path d="M22 2.59L19.41 0 11 8.41 2.59 0 0 2.59 8.41 11 0 19.41 2.59 22 11 13.59 19.41 22 22 19.41 13.59 11 22 2.59z"&gt;&lt;/path&gt;
              &lt;/svg&gt;
          &lt;/button&gt;
      &lt;/div&gt;
      &lt;div class="p-4 md:p-6"&gt;
          &lt;h3 class="heading text-center mb-2"&gt;Sign In&lt;/h3&gt;
          &lt;p class="text-center text-light-grey-1 text-sm md:text-base mb-6"&gt;Please sign in to start playing!&lt;/p&gt;
          &lt;a href="/login"&gt;
              &lt;button data-v-4318eb75="" class="button-primary button-primary--green button-primary--large w-full"&gt;
                  &lt;svg data-v-4318eb75="" viewBox="0 0 22 22" class="w-26 w-26 mr-2"&gt;
                      &lt;path data-v-4318eb75="" d="M11 0A10.93 10.93 0 0 0 .12 10.12L6 12.56A3 3 0 0 1 7.7 12h.17l2.6-3.8v-.04a4.11 4.11 0 1 1 4.11 4.15h-.1L10.78 15v.15a3.08 3.08 0 0 1-6.11.61L.49 14a10.89 10.89 0 0 0 21.39-3A11 11 0 0 0 11 0zM7 16.69l-1.34-.56a2.34 2.34 0 0 0 1.14 1.15 2.33 2.33 0 0 0 3-3.05 2.29 2.29 0 0 0-2.95-1.29l1.38.58a1.72 1.72 0 0 1 .92 2.24 1.69 1.69 0 0 1-2.15.93zm10.32-8.53a2.74 2.74 0 1 0-2.74 2.77 2.75 2.75 0 0 0 2.74-2.77zm-4.79 0a2.06 2.06 0 1 1 2.05 2.08 2.07 2.07 0 0 1-2.05-2.08z"&gt;&lt;/path&gt;
                  &lt;/svg&gt;Sign In
                  &lt;!----&gt;
              &lt;/button&gt;
          &lt;/a&gt;
      &lt;/div&gt;
      &lt;!----&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The code that I'm trying to run, which successfully clicks the button but returns undefined for the length. I have also tried .innerHTML and removed the .click event in case it fired of before getting the element, all with no good results..</p>
  
  <pre><code>const {Builder, By, Key, util} = require('selenium-webdriver');
  var fs = require('fs');
  
  launchSelenium();
  
  async function launchSelenium(username, password) {
      let driver = await new Builder().forBrowser('firefox').build();
  
      await driver.get('https://csgoempire.com/');
  
      setTimeout(async function() {
          await driver.switchTo().activeElement();
          console.log(await driver.findElement(By.xpath("//button[contains(text(),'Sign In')]")).length);
          await (await driver.findElement(By.xpath("//button[contains(text(),'Sign In')]"))).click();
      }, 10000);
  }
  </code></pre>