mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
Change asserts in PAN4, PAN5 and PAN7
This commit is contained in:
parent
e08e135b70
commit
ef1ae5be60
@ -52,7 +52,16 @@ class PAN4(PandoraWebDriverTestCase):
|
|||||||
driver.find_element_by_id('text-search').send_keys("PAN_4_Servers")
|
driver.find_element_by_id('text-search').send_keys("PAN_4_Servers")
|
||||||
driver.find_element_by_id('submit-search_submit').click()
|
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
|
#Delete reports
|
||||||
logout(driver,self.base_url)
|
logout(driver,self.base_url)
|
||||||
|
@ -57,12 +57,16 @@ class PAN5(PandoraWebDriverTestCase):
|
|||||||
driver.find_element_by_id("submit-update").click()
|
driver.find_element_by_id("submit-update").click()
|
||||||
|
|
||||||
#Check that there are japanese characters present on the event
|
#Check that there are japanese characters present on the event
|
||||||
|
|
||||||
try:
|
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:
|
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__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
@ -26,12 +26,15 @@ class PAN7(PandoraWebDriverTestCase):
|
|||||||
logout(driver,self.base_url)
|
logout(driver,self.base_url)
|
||||||
login(driver)
|
login(driver)
|
||||||
|
|
||||||
try:
|
|
||||||
|
|
||||||
self.assertEqual("Event control filter" in driver.page_source,True)
|
try:
|
||||||
|
element = driver.find_element_by_xpath('//a[contains(.,"Event control filter")]')
|
||||||
|
self.assertIsInstance(element,WebElement)
|
||||||
|
|
||||||
except AssertionError as e:
|
except AssertionError as e:
|
||||||
|
self.verificationErrors.append(str(e))
|
||||||
|
|
||||||
|
except NoSuchElementException as e:
|
||||||
self.verificationErrors.append(str(e))
|
self.verificationErrors.append(str(e))
|
||||||
|
|
||||||
#Return this change
|
#Return this change
|
||||||
|
Loading…
x
Reference in New Issue
Block a user