I automated the export of some reports, based on registration numbers in list RegistrationNr.

This is the logic:

Step 1) Type the registration number into the search box (without this, the html code will not be found)

Step 2) Click on the registration number

Step 3) Go and export the report of this organization.

With my current code, if there is a number on the list which is not in the database, the program stops because it has no number to click on. How can I make it look for the next item on the list whenever this happens?

This is my code:

```
 for i in RegistrationNr:

      driver.find_element(By.XPATH, './/*[@title = "Searchbox"]').send_keys(i)

      driver.find_element(By.XPATH, ".//*[@title =" + ' "'+ i +'"' + "]").click()

      driver.find_element(By.XPATH, './/*[@title = "Number"]').click()

```

Thanks!