def test_C_enable(self): # 获取数据 enableSrcData, enableDestData = self.data_driver.get_data_from_xls("enable") # 高级查询筛选数据 self.common_page.wait_for_loading() user_search = SearchForm(self.driver) user_search.advance_search(enableSrcData) # 选中数据 self.common_page.wait_for_loading() user_table = TableForm(self.driver) user_table.choose_from_table(0) # 停用数据 self.common_page.wait_for_loading() self.common_page.enable_() # 高级查询筛选数据 self.common_page.wait_for_loading() user_search = SearchForm(self.driver) user_search.advance_search(enableDestData) # 判断数据是否正确 self.common_page.wait_for_loading() user_table.compare_from_table(enableDestData)
def test_F_handover(self): # 获取数据 handoverSrcData, handoverDestData = self.data_driver.get_data_from_xls("handoverData") # 高级查询筛选数据 self.common_page.wait_for_loading() user_search = SearchForm(self.driver) user_search.advance_search(handoverSrcData) # 选中数据 self.common_page.wait_for_loading() user_table = TableForm(self.driver) user_table.choose_from_table(0) # 人员交接 user_handover = HandoverForm(self.driver) user_handover.handover(handoverDestData) # 高级查询筛选数据 self.common_page.wait_for_loading() user_search = SearchForm(self.driver) user_search.advance_search(handoverDestData) # 判断数据是否正确 self.common_page.wait_for_loading() user_table.compare_from_table(handoverDestData)
def test_E_changeDepartment(self): # 获取数据 changeDepartmentSrcData, changeDepartmentDestData = self.data_driver.get_data_from_xls("changeDepartmentData") # 高级查询筛选数据 self.common_page.wait_for_loading() user_search = SearchForm(self.driver) user_search.advance_search(changeDepartmentSrcData) # 选中数据 self.common_page.wait_for_loading() user_table = TableForm(self.driver) user_table.choose_from_table(0) # 更换营销区域 change_department(self.driver, changeDepartmentDestData.get("saleAreaName")) # 高级查询筛选数据 self.common_page.wait_for_loading() user_search = SearchForm(self.driver) user_search.advance_search(changeDepartmentDestData) # 判断数据是否正确 self.common_page.wait_for_loading() user_table.compare_from_table(changeDepartmentDestData)
def test_D_changeManager(self): # 获取数据 changeMangerSrcData, changeMangerDestData = self.data_driver.get_data_from_xls("changeManagerData") # 高级查询筛选数据 self.common_page.wait_for_loading() user_search = SearchForm(self.driver) user_search.advance_search(changeMangerSrcData) # 选中数据 self.common_page.wait_for_loading() user_table = TableForm(self.driver) user_table.choose_from_table(0) # 更换负责人 bind_manager(self.driver, changeMangerDestData.get("managerName")) # 高级查询筛选数据 self.common_page.wait_for_loading() user_search = SearchForm(self.driver) user_search.advance_search(changeMangerDestData) # 判断数据是否正确 self.common_page.wait_for_loading() user_table.compare_from_table(changeMangerDestData)
def test_G_delete(self): # 获取数据 delSrcData, delDestData = self.data_driver.get_data_from_xls("delete") # 高级查询筛选数据 self.common_page.wait_for_loading() user_search = SearchForm(self.driver) user_search.advance_search(delSrcData) # 选中数据 self.common_page.wait_for_loading() user_table = TableForm(self.driver) user_table.choose_from_table(0) # 删除数据 self.common_page.wait_for_loading() self.common_page.delete_()
def test_A_add(self): # 获取数据 addSrcData, addDestData = self.data_driver.get_data_from_xls("addData") # 新增数据 self.common_page.wait_for_loading() add_user = AddForm(self.driver) add_user.add(addDestData) # 高级查询筛选数据 self.common_page.wait_for_loading() user_search = SearchForm(self.driver) user_search.advance_search(addDestData) # 判断数据是否正确 self.common_page.wait_for_loading() user_table = TableForm(self.driver) user_table.compare_from_table(addDestData)