Exitting Python Webdriver Script with no error
<p>I need help to exit a test without getting error. I have this code:</p>

<pre><code>tabla = self.driver.find_element_by_css_selector(".tablaSolicitudes")
for estado in tabla.find_elements_by_tag_name("td"):
    e = estado.text
if e.find("Multiadhesion") != -1:
    print("La solicitud " + solicitudes[i] + " se encuentra con MultiAdhesion. Finaliza el Test.")
    sys.exit()
</code></pre>

<p>If that condition is true, the test should end. The point is that, having it like that, i get this error:</p>

<pre><code>sys.exit()
SystemExit

----------------------
Ran 1 test in 139.733s

FAILED (errors=1)
</code></pre>

<p>But the test is OK, so, how can I make a proper "test exit" so that i don´t get this error?.</p>

<p>Thank you very much!</p>