Exemplo n.º 1
0
 def create_multi_student(self):
     
     self.total += 1
     stu_num = 5
     try:
         student_management.auto_create_student(self.cfg, self.driver, self.base_url, self.org_name, stu_num)
     except Exception,e:
         print e
         self.verificationErrors.append("fail to create multi student!")
def test_create_student():
    
    test_enviroment = "omega"        
    cfg_file = 'config.ini'
    cfg = ConfigParser.RawConfigParser()
    cfg.read(cfg_file)  

    base_url = "http://www."+test_enviroment+".ablesky.com/"
    driver = webdriver.Firefox()
    #driver.implicitly_wait(30)
    user_name = "zhongyan"
    user_psw = "1234"
    for i in range(5):
        driver = webdriver.Firefox()
        stu_num = 200
        login.login_by_logindo(cfg, driver, base_url, user_name, user_psw)
        student_management.auto_create_student(cfg, driver, base_url, user_name, stu_num)
        driver.quit()
 def test_auto_create_student(self):
     ba = Base(self.driver)
     stu_num = 1
     student_management.auto_create_student(self.cfg, self.driver, self.base_url, stu_num)
     filename = ba.save_screenshot()
     print "image:"+filename