Esempio n. 1
0
 def test_O_People_Assist(self):
     global page, Data, PEOPLE
     page = Subject_Config_JM(self.driver, self.base_url, '')
     Data = AllData()
     PEOPLE = People_Assist(self.driver, self.base_url, '')
     page.open()
     page.input_username(Data.name_b)
     page.input_password(Data.pwd)
     page.click_submit()
     self.driver.implicitly_wait(10)
     page.CWJC()
     page.Win_XF()
     page.Win_Split()
     PEOPLE.Assist_Button()
     self.driver.implicitly_wait(10)
     PEOPLE.prevpage()
     PEOPLE.switch_frame(Data.myframe)
     Lab1 = PEOPLE.Clear_Up()
     if Lab1 == '整理':
         self.WriteXlsx(32, 11, "PASS")
     else:
         self.WriteXlsx(32, 11, "ERROR")
         do_log.error("报错:实际与预期不符")
     self.WriteXlsx(32, 10, "Y")
     PEOPLE.switch_frame_default()
     PEOPLE.nextpage()
     PEOPLE.nextpage()
     PEOPLE.switch_frame(Data.myframe)
     Lab2 = PEOPLE.Year_End()
     if Lab2 == '年结':
         self.WriteXlsx(33, 11, "PASS")
     else:
         self.WriteXlsx(33, 11, "ERROR")
         do_log.error("报错:实际与预期不符")
     self.WriteXlsx(33, 10, "Y")
Esempio n. 2
0
 def test_Q_People_Assist(self):
     global page, Data, PEOPLE
     page = Subject_Config_JM(self.driver, self.base_url, '')
     Data = AllData()
     PEOPLE = People_Assist(self.driver, self.base_url, '')
     page.open()
     page.input_username(Data.name_b)
     page.input_password(Data.pwd)
     page.click_submit()
     self.driver.implicitly_wait(10)
     ZJM = self.driver.current_window_handle  # 切换窗口前的句柄
     PEOPLE.JF_MJ_DDDD()  #选择表单
     # page.Win_Split()
     Win = self.driver.window_handles  # 所有窗口句柄
     for windows in Win:
         if windows != ZJM:
             self.driver.switch_to.window(windows)
             sleep(1)
     page.switch_frame(Data.zwIframe)
     PEOPLE.Select_People_icon()
     PEOPLE.switch_frame_default()
     PEOPLE.switch_frame(Data.frame1)
     PEOPLE.Select_CXB()
     PEOPLE.Select_Right_icon()
     PEOPLE.switch_frame_default()
     self.Glo()
     ZT_infor.Save_frame1()
     page.switch_frame(Data.zwIframe)
     PEOPLE.JF_MJ_Button()
     PEOPLE.JF_Select_MJ_C()
     self.Replace(40, 8)
     PEOPLE.JF_BXJE_Text_Value(C["报销金额"])
     PEOPLE.DF_MJ_Button()
     PEOPLE.DF_Select_MJ_B()
     PEOPLE.DF_BXJE_Text_Value(C["支付金额"])
     PEOPLE.switch_frame_default()
     PEOPLE.Form_Send()
     self.driver.switch_to.window(ZJM)
     page.Select_XT_Work()
     PEOPLE.Select_Wait_Do()
     PEOPLE.switch_frame(Data.mainIframe)
     PEOPLE.All_Wait_Do()
     PEOPLE.Wait_Do_List_Display_Button()
     Win1 = self.driver.window_handles  # 所有窗口句柄
     for windows1 in Win1:
         if windows1 != ZJM:
             self.driver.switch_to.window(windows1)
             sleep(1)
     PEOPLE.Agree_Button()
     PEOPLE.switch_frame_default()
     PEOPLE.switch_frame(Data.frame1)
     PEOPLE.Span_Title()
     Lab = PEOPLE.PZ_Display()
     if '崔雄D' in Lab:
         self.WriteXlsx(40, 11, "PASS")
     else:
         self.WriteXlsx(40, 11, "ERROR")
         do_log.error("报错:实际与预期不符")
     self.WriteXlsx(40, 10, "Y")
Esempio n. 3
0
 def Log_In_DFKM(self):
     '''从登陆界面进入税金科目配置'''
     global page, Data
     page = Subject_Config_JM(self.driver, self.base_url, '')
     Data = AllData()
     page.open()
     page.input_username(Data.name)
     page.input_password(Data.pwd)
     page.click_submit()
     self.driver.implicitly_wait(10)
     page.CWJC()
     page.Win_XF()
     page.Win_Split()
     page.Sbu_Config()
     page.switch_frame(Data.myframe)
Esempio n. 4
0
 def Log_In_ERP(self):
     '''从登陆界面进入ERP配置'''
     global page, Data
     page = Subject_Config_JM(self.driver, self.base_url, '')
     Data = AllData()
     page.open()
     page.input_username(Data.name_b)
     page.input_password(Data.pwd)
     page.click_submit()
     self.driver.implicitly_wait(10)
     page.CWJC()
     page.Win_XF()
     page.Win_Split()
     page.ERP_config_Button()
     page.switch_frame(Data.myframe)
     sleep(1)
Esempio n. 5
0
 def Log_In_OK_ZD(self):
     '''从登陆界面进入待制单界面'''
     global page, Data, Wait_ZD_ZJM
     page = Subject_Config_JM(self.driver, self.base_url, '')
     Data = AllData()
     Wait_ZD_ZJM = Wait_ZD(self.driver, self.base_url, '')
     page.open()
     page.input_username(Data.name_b)
     page.input_password(Data.pwd)
     page.click_submit()
     self.driver.implicitly_wait(10)
     self.driver.maximize_window()
     page.CWJC()
     page.Win_PZZD()
     page.Win_Split()
     Wait_ZD_ZJM.switch_frame(Data.myframe)
Esempio n. 6
0
 def Log_In_Dep_Assist(self):
     '''从登陆界面进入部门辅助核算界面'''
     global page, Data, PEOPLE
     page = Subject_Config_JM(self.driver, self.base_url, '')
     Data = AllData()
     PEOPLE = People_Assist(self.driver, self.base_url, '')
     page.open()
     page.input_username(Data.name_b)
     page.input_password(Data.pwd)
     page.click_submit()
     self.driver.implicitly_wait(10)
     page.CWJC()
     page.Win_XF()
     page.Win_Split()
     PEOPLE.Assist_Button()
     page.switch_frame(Data.myframe)
     PEOPLE.Dep_FZHS_button()
     PEOPLE.switch_frame(Data.people_frame)
Esempio n. 7
0
 def Log_In_DF_KMPZ(self):
     '''从登陆界面进入借方科目配置,2020,001,新增按钮'''
     global page, Data
     page = Subject_Config_JM(self.driver, self.base_url, '')
     Data = AllData()
     page.open()
     page.input_username(Data.name)
     page.input_password(Data.pwd)
     page.click_submit()
     self.driver.implicitly_wait(10)
     page.CWJC()
     page.Win_XF()
     page.Win_Split()
     page.Sbu_Config()
     page.switch_frame(Data.myframe)
     page.JF_select_2020()
     page.JF_select_YWDJMJ_A()
     page.JF_ZT_and_001()
     page.Add_Button_JF()
     page.switch_frame_default()
     page.switch_frame(Data.frame1)
Esempio n. 8
0
 def test_AA_OK_ZD(self):
     global page, Data, Wait_ZD_ZJM
     page = Subject_Config_JM(self.driver, self.base_url, '')
     Data = AllData()
     Wait_ZD_ZJM = Wait_ZD(self.driver, self.base_url, '')
     page.open()
     page.input_username(Data.name_b)
     page.input_password(Data.pwd)
     page.click_submit()
     self.driver.implicitly_wait(10)
     self.driver.maximize_window()
     page.CWJC()
     page.Win_XF()
     page.Win_Split()
     page.People_Click()
     Wait_ZD_ZJM.switch_frame(Data.myframe)
     self.Glo()
     ZT_infor.Click_mytree_6_span()
     page.CXB_click()
     page.Right_ico()
     page.CXD_click()
     page.Save_Bind()
Esempio n. 9
0
 def setUp(cls):
     cls.driver = webdriver.Chrome()
     Data = AllData()
     cls.base_url = Data.URL
     print("Test Start")
Esempio n. 10
0
 def test_P_People_Assist(self):
     '''DDDD枚举带出1146科目'''
     global page, Data, PEOPLE
     page = Subject_Config_JM(self.driver, self.base_url, '')
     Data = AllData()
     PEOPLE = People_Assist(self.driver, self.base_url, '')
     page.open()
     page.input_username(Data.name_b)
     page.input_password(Data.pwd)
     page.click_submit()
     self.driver.implicitly_wait(10)
     ZJM = self.driver.current_window_handle  #切换窗口前的句柄
     PEOPLE.JF_MJ_DDDD()
     # page.Win_Split()
     Win = self.driver.window_handles  # 所有窗口句柄
     for windows in Win:
         if windows != ZJM:
             self.driver.switch_to.window(windows)
             # print("系统配置界面窗口名称:",self.driver.title)
             sleep(1)
     page.switch_frame(Data.zwIframe)
     Lab1 = PEOPLE.JF_KMBM_Text_Value()
     Lab2 = PEOPLE.JF_KM_name_Text_Value()
     PEOPLE.JF_MJ_Button()
     PEOPLE.JF_Select_MJ_DDDD()
     Lab3 = PEOPLE.JF_KMBM_Text_Value()
     Lab4 = PEOPLE.JF_KM_name_Text_Value()
     if Lab1 == Lab2 and Lab3 == "1146" and Lab4 == "客项部":
         self.WriteXlsx(34, 11, "PASS")
     else:
         self.WriteXlsx(34, 11, "ERROR")
         do_log.error("报错:实际与预期不符")
     self.WriteXlsx(34, 10, "Y")
     sleep(3)
     '''一级枚举C带出1147个项银行'''
     PEOPLE.JF_MJ_Button()
     PEOPLE.JF_Select_MJ_C()
     Lab5 = PEOPLE.JF_KMBM_Text_Value()
     Lab6 = PEOPLE.JF_KM_name_Text_Value()
     if Lab5 == "1147" and Lab6 == "个项银行":
         self.WriteXlsx(35, 11, "PASS")
     else:
         self.WriteXlsx(35, 11, "ERROR")
         do_log.error("报错:实际与预期不符")
     self.WriteXlsx(35, 10, "Y")
     sleep(3)
     '''一级枚举B带出1148外币核算人民币'''
     PEOPLE.JF_MJ_Button()
     PEOPLE.JF_Select_MJ_B()
     Lab7 = PEOPLE.JF_KMBM_Text_Value()
     Lab8 = PEOPLE.JF_KM_name_Text_Value()
     if Lab7 == "1148" and Lab8 == "外币核算人民币":
         self.WriteXlsx(36, 11, "PASS")
     else:
         self.WriteXlsx(36, 11, "ERROR")
         do_log.error("报错:实际与预期不符")
     self.WriteXlsx(36, 10, "Y")
     sleep(3)
     '''贷方科目配置-DDDD带出100202 银行存款-现金流量科目2'''
     Lab9 = PEOPLE.DF_KMBM_Text_Value()
     Lab10 = PEOPLE.DF_KM_name_Text_Value()
     PEOPLE.DF_MJ_Button()
     PEOPLE.DF_Select_MJ_DDDD()
     Lab11 = PEOPLE.DF_KMBM_Text_Value()
     Lab12 = PEOPLE.DF_KM_name_Text_Value()
     if Lab9 == Lab10 and Lab11 == "100202" and Lab12 == "银行存款-现金流量科目2":
         self.WriteXlsx(37, 11, "PASS")
     else:
         self.WriteXlsx(37, 11, "ERROR")
         do_log.error("报错:实际与预期不符")
     self.WriteXlsx(37, 10, "Y")
     sleep(3)
     '''一级C带出1304贷款损失准备'''
     PEOPLE.DF_MJ_Button()
     PEOPLE.DF_Select_MJ_C()
     Lab13 = PEOPLE.DF_KMBM_Text_Value()
     Lab14 = PEOPLE.DF_KM_name_Text_Value()
     if Lab13 == "1304" and Lab14 == "贷款损失准备":
         self.WriteXlsx(38, 11, "PASS")
     else:
         self.WriteXlsx(38, 11, "ERROR")
         do_log.error("报错:实际与预期不符")
     self.WriteXlsx(38, 10, "Y")
     sleep(3)
     '''一级B带出1012其他货币资金-外币港元'''
     PEOPLE.DF_MJ_Button()
     PEOPLE.DF_Select_MJ_B()
     Lab15 = PEOPLE.DF_KMBM_Text_Value()
     Lab16 = PEOPLE.DF_KM_name_Text_Value()
     if Lab15 == "1012" and Lab16 == "其他货币资金-外币港元":
         self.WriteXlsx(39, 11, "PASS")
     else:
         self.WriteXlsx(39, 11, "ERROR")
         do_log.error("报错:实际与预期不符")
     self.WriteXlsx(39, 10, "Y")