diff --git a/tests/console/PAN3.py b/tests/console/PAN3.py index 920a2962f7..11cf9a1db4 100644 --- a/tests/console/PAN3.py +++ b/tests/console/PAN3.py @@ -6,6 +6,8 @@ from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import StaleElementReferenceException +import unittest, time, re + class PAN3(PandoraWebDriverTestCase): @@ -13,7 +15,6 @@ class PAN3(PandoraWebDriverTestCase): test_description = u'Creates a simple ICMP check against localhost and checks the result is 1' tickets_associated = [] - def test_pan3(self): driver = self.driver login(driver,"admin","pandora",self.base_url) @@ -49,6 +50,7 @@ class PAN3(PandoraWebDriverTestCase): try: element_text = refresh_N_times_until_find_element(driver,5,"table1-1-7",how=By.ID).text self.assertEqual("1", element_text.lstrip().rstrip()) # The lstrip.rstrip is done because if not, this error is raised: "'1' != u'1 '" + break except StaleElementReferenceException as e_stale: i = i+1 if i > max_retries: @@ -58,6 +60,7 @@ class PAN3(PandoraWebDriverTestCase): next except AssertionError as e: self.verificationErrors.append(str(e)) + break if __name__ == "__main__": unittest.main()