title: Selenium textarea - in Javascript - explanation
body: <p>i have this piece of html, which is under a dropdown, and which appears after selecting somthing in the dropdown element:</p>
  <pre><code>&lt;div class=&quot;mx-0 w-100 row&quot;&gt;
      &lt;textarea id=&quot;notes&quot; placeholder=&quot;Write here...&quot; required=&quot;&quot; class=&quot;form-control&quot;&gt; &lt;/textarea&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I want to use Selenium to click on it, write something and exit from the textarea.
  And actually I did it, but results vary depending on which selector I use, and I don't know why:</p>
  <p>Here's my code actually working: I use wait for element visible and enabled because the above dropdown, when opened, covers the textarea. If I don't use them it gives a &quot;not interactable&quot; error.</p>
  <pre><code>const notes = await driver.wait(until.elementsLocated(By.css('textarea')), delay)
  await driver.wait(until.elementIsVisible(notes[0]), delay)
  await driver.wait(until.elementIsEnabled(notes[0]), delay)
  await notes[0].sendKeys('Something to write')
  // this TAB is for exiting from textarea, which let a button to appear
  await notes[0].sendKeys(Key.TAB)
  </code></pre>
  <p>Now, if instead of the first line I use</p>
  <pre><code>const notes = await driver.wait(until.elementLocated(By.id('notes')), delay)
  </code></pre>
  <p>or</p>
  <pre><code>const notes = await driver.wait(until.elementLocated(By.xpath('//*[@id=&quot;notes&quot;]')), delay)
  </code></pre>
  <p>and replacing obviously <code>notes[0]</code> with <code>notes</code>,it gives me</p>
  <pre><code>ElementNotInteractableError: element not interactable
  </code></pre>
  <p>The question is: Why does this happens? I do not like so much selecting an array element with numbers, but actually I am forced to and I don't get why the other selectors aren't working.</p>