Ejemplo n.º 1
0
 def createAll(self):
     LoginPage().loginSu()
     organizeMainPage = OrganizeMainPage()
     organizeMainPage.enterFunction()
     for key in self.info_oganize.keys():
         organizeMainPage.addOrganize(self.info_oganize.get(key))
         organizeMainPage.closePopWin()
Ejemplo n.º 2
0
 def custom_step(self):
     LoginPage().login_data(self.data.get('login'))
     accountMainPage = AccountMainPage()
     accountMainPage.enterFunction()
     accountMainPage.createAccount(self.data.get('userData'))
     accountMainPage.search(self.data.get('userData').get('accountUsername'))
     return accountMainPage.checkupTableData(self.data.get('userData'))
Ejemplo n.º 3
0
 def custom_setUp(self):
     LoginPage().login_data(self.data.get('login'))
     roleMainPage = RoleMainPage()
     roleMainPage.enterFunction()
     row = {'rolename': self.data.get('createRole').get('roleName')}
     roleMainPage.search(self.data.get('createRole').get('roleName'))
     if roleMainPage.checkupTableData(row):
         raise Exception('role exists')
Ejemplo n.º 4
0
 def custom_setUp(self):
     LoginPage().login_data(self.data.get('login'))
     accountMainPage = AccountMainPage()
     accountMainPage.enterFunction()
     row = {'accountUsername': self.data.get('query_userData').get('accountUsername')}
     accountMainPage.search(row.get('accountUsername'))
     if not accountMainPage.checkupTableData(row):
         accountMainPage.createAccount(self.data.get('create_userData'))
Ejemplo n.º 5
0
 def custom_setUp(self):
     LoginPage().login_data(self.data.get('login'))
     accountMainPage = AccountMainPage()
     accountMainPage.enterFunction()
     accountMainPage.search(self.data.get('create_userData').get('accountUsername'))
     if accountMainPage.checkupTableData({'accountUsername': self.data.get('create_userData').get('accountUsername')}):
         pass
     else:
         accountMainPage.createAccount(self.data.get('create_userData'))
Ejemplo n.º 6
0
    def custom_setUp(self):
        LoginPage().login_data(self.data.get('login'))
        roleMainPage = RoleMainPage()
        roleMainPage.enterFunction()
        row = {'rolename': self.data.get('createRole').get('roleName')}
        roleMainPage.search(self.data.get('createRole').get('roleName'))
        if not roleMainPage.checkupTableData(row):
            roleMainPage.createRole(self.data.get('createRole'))

        if roleMainPage.checkupTableData(self.data.get('modifyRole')):
            roleMainPage.checkupTableData(self.data.get('createRole'))
Ejemplo n.º 7
0
 def custom_setUp(self):
     LoginPage().login_data(self.data.get('login'))
     deptMainPage = DeptMainPage()
     deptMainPage.enterFunction()
     deptMainPage.search(self.data.get('queryDept').get('deptName'))
Ejemplo n.º 8
0
 def addOrganize(self):
     LoginPage().loginSu()
     organizeMainPage = OrganizeMainPage()
     organizeMainPage.enterFunction()
     organizeMainPage.addOrganize(self.data)
     organizeMainPage.closePopWin()
Ejemplo n.º 9
0
    def __init__(self,oganize):
        oganize_ch = self.table_oganize.get(oganize)

        common_pwd = '11'
        
        self.admin_user = oganize + 'admin'
        self.admin_pwd = common_pwd
        
        
        self.xxnq = {}
        self.xxnq['accountType'] = '普通用户'
        self.xxnq['accountUsername'] = oganize + 'xxnq'
        self.xxnq['accountName'] = oganize_ch + '信息内勤'
        self.xxnq['accountPassword'] = common_pwd
        self.xxnq['accountConfiremPassword'] = self.xxnq.get('accountPassword')
        
        self.xxky1 = {}
        self.xxky1['accountType'] = '普通用户'
        self.xxky1['accountUsername'] = oganize + 'xxky1'
        self.xxky1['accountName'] = oganize_ch + '信息科员1'
        self.xxky1['accountPassword'] = common_pwd
        self.xxky1['accountConfiremPassword'] = self.xxky1.get('accountPassword')
        
        self.xxky2 = {}
        self.xxky2['accountType'] = '普通用户'
        self.xxky2['accountUsername'] = oganize + 'xxky2'
        self.xxky2['accountName'] = oganize_ch + '信息科员2'
        self.xxky2['accountPassword'] = common_pwd
        self.xxky2['accountConfiremPassword'] = self.xxky2.get('accountPassword')
        
        self.xxzr = {}
        self.xxzr['accountType'] = '普通用户'
        self.xxzr['accountUsername'] = oganize + 'xxzr'
        self.xxzr['accountName'] = oganize_ch + '信息主任'
        self.xxzr['accountPassword'] = common_pwd
        self.xxzr['accountConfiremPassword'] = self.xxzr.get('accountPassword')
        
        self.scnq = {}
        self.scnq['accountType'] = '普通用户'
        self.scnq['accountUsername'] = oganize + 'scnq'
        self.scnq['accountName'] = oganize_ch + '审查内勤'
        self.scnq['accountPassword'] = common_pwd
        self.scnq['accountConfiremPassword'] = self.scnq.get('accountPassword')
        
        self.scky1 = {}
        self.scky1['accountType'] = '普通用户'
        self.scky1['accountUsername'] = oganize + 'scky1'
        self.scky1['accountName'] = oganize_ch + '审查科员1'
        self.scky1['accountPassword'] = common_pwd
        self.scky1['accountConfiremPassword'] = self.scky1.get('accountPassword')
        
        self.scky2 = {}
        self.scky2['accountType'] = '普通用户'
        self.scky2['accountUsername'] = oganize + 'scky2'
        self.scky2['accountName'] = oganize_ch + '审查科员2'
        self.scky2['accountPassword'] = common_pwd
        self.scky2['accountConfiremPassword'] = self.scky2.get('accountPassword')
        
        self.sczr = {}
        self.sczr['accountType'] = '普通用户'
        self.sczr['accountUsername'] = oganize + 'sczr'
        self.sczr['accountName'] = oganize_ch + '审查主任'
        self.sczr['accountPassword'] = common_pwd
        self.sczr['accountConfiremPassword'] = self.sczr.get('accountPassword')
        
        self.xxcw = {}
        self.xxcw['accountType'] = '普通用户'
        self.xxcw['accountUsername'] = oganize + 'xxcw'
        self.xxcw['accountName'] = oganize_ch + '信息常委'
        self.xxcw['accountPassword'] = common_pwd
        self.xxcw['accountConfiremPassword'] = self.xxcw.get('accountPassword')
        
        self.sccw = {}
        self.sccw['accountType'] = '普通用户'
        self.sccw['accountUsername'] = oganize + 'sccw'
        self.sccw['accountName'] = oganize_ch + '审查常委'
        self.sccw['accountPassword'] = common_pwd
        self.sccw['accountConfiremPassword'] = self.sccw.get('accountPassword')
        
        self.xxsj = {}
        self.xxsj['accountType'] = '普通用户'
        self.xxsj['accountUsername'] = oganize + 'xxsj'
        self.xxsj['accountName'] = oganize_ch + '信息书记'
        self.xxsj['accountPassword'] = common_pwd
        self.xxsj['accountConfiremPassword'] = self.xxsj.get('accountPassword')
        
        self.scsj = {}
        self.scsj['accountType'] = '普通用户'
        self.scsj['accountUsername'] = oganize + 'scsj'
        self.scsj['accountName'] = oganize_ch + '审查书记'
        self.scsj['accountPassword'] = common_pwd
        self.scsj['accountConfiremPassword'] = self.scsj.get('accountPassword')
        
        self.sj = {}
        self.sj['accountType'] = '普通用户'
        self.sj['accountUsername'] = oganize+'sj'
        self.sj['accountName'] = oganize_ch+'书记'
        self.sj['accountPassword'] = common_pwd
        self.sj['accountConfiremPassword'] = self.sj.get('accountPassword')
        
        LoginPage().login(user=self.admin_user,pwd=self.admin_pwd)
        self.page = AccountMainPage()
        self.page.enterFunction()
Ejemplo n.º 10
0
 def custom_setUp(self):
     LoginPage().loginSu()
     authorityMainPage = AuthorityMainPage()
     authorityMainPage.enterFunction()
Ejemplo n.º 11
0
 def createAll(self):
     LoginPage().loginSu()
     accountPage = AccountMainPage()
     accountPage.enterFunction()
     for i in self.table_oganize.keys():
         self.createAccount(self.initAdmin(i))