title: Selenium - How to fill a value and click a button
body: <p>I started today with selenium, and I'm having a problem at finding these elements and filling a value in the first and clicking the second.</p>
  <pre><code>&lt;input class=&quot;inputDefault-_djjkz input-cIJ7To&quot; name=&quot;username&quot; type=&quot;text&quot; placeholder=&quot;Che nome vuoi usare?&quot; maxlength=&quot;999&quot; value=&quot;&quot;&gt;
  </code></pre>
  <pre><code>&lt;input class=&quot;inputDefault-3JxKJ2 input-3ITkQf&quot; type=&quot;checkbox&quot; style=&quot;width: 24px; height: 24px;&quot;&gt;
  </code></pre>
  <p>This is my code</p>
  <pre><code>from selenium import webdriver
  from selenium.webdriver.common.keys import Keys
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support.ui import WebDriverWait
  from selenium.webdriver.support import expected_conditions as EC
  
  
  # Content to fill - &lt;input class=&quot;inputDefault-_djjkz input-cIJ7To&quot; name=&quot;username&quot; type=&quot;text&quot; placeholder=&quot;Che nome vuoi usare?&quot; maxlength=&quot;999&quot; value=&quot;&quot;&gt;
  # {&quot;method&quot;:&quot;css selector&quot;,&quot;selector&quot;:&quot;[name=&quot;Che nome vuoi usare?&quot;]&quot;}
  
  # Checkbox - &lt;input class=&quot;inputDefault-3JxKJ2 input-3ITkQf&quot; type=&quot;checkbox&quot; style=&quot;width: 24px; height: 24px;&quot;&gt;
  
  driver = webdriver.Chrome()
  driver.get(&quot;https://discord.gg/NGvXRfrmUE&quot;)
  name = driver.find_element_by_class_name(&quot;inputDefault-_djjkz input-cIJ7To&quot;).send_keys(&quot;Test&quot;)
  button = driver.find_element_by_class_name(&quot;inputDefault-3JxKJ2 input-3ITkQf&quot;).click
  </code></pre>
  <p>And I get this exception for the first</p>
  <pre><code>selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {&quot;method&quot;:&quot;css selector&quot;,&quot;selector&quot;:&quot;.inputDefault-_djjkz input-cIJ7To&quot;}
  </code></pre>
  <p>And this for the second</p>
  <pre><code>selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {&quot;method&quot;:&quot;css selector&quot;,&quot;selector&quot;:&quot;.inputDefault-3JxKJ2 input-3ITkQf&quot;}
  </code></pre>