1 from selenium import selenium
2 import unittest, time, re
4 class users_page(unittest.TestCase):
6 self.verificationErrors = []
7 self.selenium = selenium("localhost", 4444, "*chrome", "http://127.0.0.1:8000/")
10 def test_users_page(self):
13 sel.click("nav_users")
14 sel.wait_for_page_to_load("30000")
15 try: self.failUnless(sel.is_text_present("Users"))
16 except AssertionError, e: self.verificationErrors.append(str(e))
17 sel.click("nav_users")
18 sel.wait_for_page_to_load("30000")
19 try: self.failUnless(sel.is_text_present("karma"))
20 except AssertionError, e: self.verificationErrors.append(str(e))
21 try: self.failUnless(sel.is_text_present("recent"))
22 except AssertionError, e: self.verificationErrors.append(str(e))
23 try: self.failUnless(sel.is_text_present("oldest"))
24 except AssertionError, e: self.verificationErrors.append(str(e))
25 try: self.failUnless(sel.is_text_present("by username"))
26 except AssertionError, e: self.verificationErrors.append(str(e))
30 self.assertEqual([], self.verificationErrors)
32 if __name__ == "__main__":