title: How is the name of these 2 errors to be invoked in Except? (Selenium and database)
body: <p>I'm putting errors in Try and Except, but I'm having trouble with 2 types of errors. I'll give you an example of what I need. This except with Valure Error works fine, because I know the error is called ValueError, so:</p>
  <pre><code>#ONLY EXAMPLE
  except ValueError:
      return &quot;FAILED&quot;
  </code></pre>
  <p><strong>EXCEPT ERROR N.1</strong>
  The question I ask you is: how should I write for the following error? It consists of the wrong name of an html class when scraping. I wrote selenium.common.exceptions.NoSuchElementException, but the error search does not work (the script does not open at all)</p>
  <pre><code>except selenium.common.exceptions.NoSuchElementException:
      return &quot;FAILED&quot;
  </code></pre>
  <p><strong>EXCEPT ERROR N.2</strong>
  Same thing for the database insert error. I want to make sure that if 0 records are saved in the database then I have an error. I tried to write like this, but it's not good:</p>
  <pre><code>except  records_added_Results = records_added_Results = + 0:
      return &quot;FAILED&quot;
  </code></pre>
  <p>I wrote this because I have this code for the insertion in the database. It works correctly, I am writing it just to make you understand:</p>
  <pre><code>    con = sqlite3.connect('/home/mypc/Scrivania/folder/Database.db')
      cursor = con.cursor()
      records_added_Results = 0
  
      Values = ((SerieA_text,), (SerieB_text,)
      sqlite_insert_query = 'INSERT INTO ARCHIVIO_Campionati (Nome_Campionato) VALUES (?);'
      count = cursor.executemany(sqlite_insert_query, Values) 
      con.commit()
  
      print(&quot;Record inserted successfully &quot;, cursor.rowcount)
      records_added_Results = records_added_Results + 1
      cursor.close()
  </code></pre>
  <p>How should I write? Thank you</p>