diff --git a/tests/console/PAN4.py b/tests/console/PAN4.py index 508024b9f6..dde985f19e 100644 --- a/tests/console/PAN4.py +++ b/tests/console/PAN4.py @@ -51,8 +51,17 @@ class PAN4(PandoraWebDriverTestCase): driver.find_element_by_id('text-search').clear() driver.find_element_by_id('text-search').send_keys("PAN_4_Servers") driver.find_element_by_id('submit-search_submit').click() - - self.assertEqual("No data found." in driver.page_source,True) + + try: + element = driver.find_element_by_xpath('//a[contains(.,"No data found.")]') + self.assertIsInstance(element,WebElement) + + except AssertionError as e: + self.verificationErrors.append(str(e)) + + except NoSuchElementException as e: + self.verificationErrors.append(str(e)) + #Delete reports logout(driver,self.base_url) diff --git a/tests/console/PAN5.py b/tests/console/PAN5.py index 35b5f663da..8a975d1254 100644 --- a/tests/console/PAN5.py +++ b/tests/console/PAN5.py @@ -57,12 +57,16 @@ class PAN5(PandoraWebDriverTestCase): driver.find_element_by_id("submit-update").click() #Check that there are japanese characters present on the event + try: - self.assertEqual(True,u"Alert fired (Critical condition) assigned to (管理者ガイド)" in driver.page_source) + element = driver.find_element_by_xpath('//a[contains(.,u"Alert fired (Critical condition) assigned to (管理者ガイド)")]') + self.assertIsInstance(element,WebElement) + except AssertionError as e: - self.verificationErrors.append(str(e)) - + self.verificationErrors.append(str(e)) + except NoSuchElementException as e: + self.verificationErrors.append(str(e)) if __name__ == "__main__": unittest.main() diff --git a/tests/console/PAN7.py b/tests/console/PAN7.py index be2f9ef1f7..0f4019949c 100644 --- a/tests/console/PAN7.py +++ b/tests/console/PAN7.py @@ -25,14 +25,17 @@ class PAN7(PandoraWebDriverTestCase): logout(driver,self.base_url) login(driver) - + + try: - - self.assertEqual("Event control filter" in driver.page_source,True) - + element = driver.find_element_by_xpath('//a[contains(.,"Event control filter")]') + self.assertIsInstance(element,WebElement) + except AssertionError as e: - - self.verificationErrors.append(str(e)) + self.verificationErrors.append(str(e)) + + except NoSuchElementException as e: + self.verificationErrors.append(str(e)) #Return this change