Change asserts in PAN4, PAN5 and PAN7

This commit is contained in:
cesar991 2016-07-19 10:39:07 +02:00
parent e08e135b70
commit ef1ae5be60
3 changed files with 27 additions and 11 deletions

View File

@ -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)

View File

@ -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()

View File

@ -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