def addstudent_verify(self, username, realname, password, sex, role,
                       category, email, phone):
     try:
         self.obj_sp.click_menbercenter_button()
         self.obj_sp.click_studentlist_link()
         self.obj_sp.change_main_frame()
         self.obj_sp.click_addstudent_button()
         self.obj_ap.set_username_input(username)
         self.obj_ap.set_realname_input(realname)
         self.obj_ap.set_password_input(password)
         self.obj_ap.select_sex_radio(sex)
         self.obj_ap.select_role_select(role)
         self.obj_ap.select_start_student_input()
         self.obj_ap.upload_head_portrait()
         self.obj_ap.select_category_select(category)
         self.obj_ap.set_email_input(email)
         self.obj_ap.set_phone_input(phone)
         self.obj_ap.click_save_button()
         self.obj_ap.click_alert_confirm_button()
         self.obj_ap.click_comeback_button()
         msg = self.obj_sp.get_addstudent_success_msg()
         return msg
     except BaseException as msg:
         log = InsertLog()
         log.error(msg)
Example #2
0
 def test_001_Register_Business(self):
     """
     用例一 :检查注册功能
     :param brandname: 品牌名称
     :param nation:    国家名称
     :param Phone:   手机号码
     :param loginpwd:  登录密码
     :param name:  名字
     :param surname: 姓
     :param imei:  imei号
     :param Email: 邮箱
     :param paymentpwd: 支付密码
     """
     try:
         # self.a.click_registration()
         self.a.open_url(
             'https://buy-fat-1.pundix.com/#/register/?path=test')
         self.a.select_business_category()  # 选择经营品类,默认选择 Government
         self.a.set_brand_name(brand_name)  # 输入品牌名称
         self.a.setect_nation(nation, phone_number)  # 选择国家、输入号码、验证码
         self.a.input_login_password(loginpwd, name, surname)  # 输入登陆密码、名、姓
         self.a.select_time_zone()  # 选择时区
         self.a.input_imei(imei)  # 输入Imei
         self.a.input_email_address(email)  # 输入邮箱
         self.a.input_payment_password(paymentpwd)  # 输入支付密码、确认支付密码
         self.a.click_regisetr_laction()  # 点击注册
         self.a.click_return_login()  # 点击返回登陆
     except (BaseException, AssertionError
             ) as msg:  # BaseException所有异常的基类,AssertionError断言语句失败
         InsertLog().debug(msg)
         self.a.save_img('RegisteTest_001_Register_Fail')
         raise BaseException
Example #3
0
 def test_001_Check_page(self):
     """
     用例一 :检查页面是否正常
     """
     try:
         self.AccountListBusiness()
         self.assertTrue(self.c.get_new_account_txt())
     except (BaseException, AssertionError) as msg:
         self.c.save_img('StaffListTest_001_check_page_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #4
0
 def test_002_Check_Cash_page(self):
     """
     用例二 :检查现金记录页面是否正常
     """
     try:
         self.CashRecordListBusiness()
         self.assertTrue(self.c.get_carh_history_txt())
     except (BaseException, AssertionError) as msg:
         self.c.save_img('ReportCash_002_Cash_page_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #5
0
 def test_003_Verify_Select_Shop_name(self):
     """
     用例三 :验证门店名称使用全选的方式查询
     """
     try:
         self.OrderManagermentBusiness()
         self.assertTrue(self.c.verify_select_shop_query())
     except (BaseException, AssertionError) as msg:
         self.c.save_img('OrderTest_003_search_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #6
0
 def test_001_Check_page(self):
     """
     用例一 :检查页面是否正常
     """
     try:
         self.OrderManagermentBusiness()
         self.assertTrue(self.c.findElement('Cashier Order'))
     except (BaseException, AssertionError) as msg:
         self.c.save_img('OrderTest_001_page_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #7
0
 def test_005_Delete_Fees_Tax_Page(self):
     """
     用例五 :删除费用管理
     """
     try:
         self.b.switch_to_SettingPage()
         self.assertTrue(self.c.delete_fees_tax())
     except (BaseException, AssertionError) as msg:
         self.c.save_img('Setting_005_delete_fees_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #8
0
 def test_002_Change_Time_Zone_Page(self):
     """
     用例二 :修改时区设置
     """
     try:
         self.b.switch_to_SettingPage()
         self.assertTrue(self.c.update_time_zone())
     except (BaseException, AssertionError) as msg:
         self.c.save_img('Setting_002_chang_timezone_fail')
         InsertLog().debug(msg)
         raise BaseException
 def test_001_Check_Cash_page(self):
     """
     用例一 :检查数字货币记录页面是否正常
     """
     try:
         self.DigitalCurrencyRecordList()
         self.assertTrue(self.c.get_Digital_record_msg_txt())
     except (BaseException, AssertionError) as msg:
         self.c.save_img('DigitalCurrency_001_Currency_page_fail')
         InsertLog().debug(msg)
         raise BaseException
 def test_007_Verify_Cashier(self):
     """
     用例七 :验证收银员查询功能
     """
     try:
         self.DigitalCurrencyRecordList()
         self.assertIsNotNone(self.c.verify_cashier(cashier_name))
     except (BaseException, AssertionError) as msg:
         self.c.save_img('DigitalCurrency_007_cashier_fail')
         InsertLog().debug(msg)
         raise BaseException
 def test_006_Verify_Day_Query(self):
     """
     用例六 :验证订单号查询功能
     """
     try:  # 传参 订单号
         self.DigitalCurrencyRecordList()
         self.assertTrue(self.c.verify_order_number(order_number))
     except (BaseException, AssertionError) as msg:
         self.c.save_img('DigitalCurrency_006_order_number_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #12
0
 def test_005_Verify_Phone(self):
     """
     用例五 :验证手机号码查询
     """
     try:  # 传参 需要查询的手机号码
         self.AccountListBusiness()
         self.assertTrue(self.c.verify_telephone_query(phone_number))
     except (BaseException, AssertionError) as msg:
         self.c.save_img('StaffListTest_005_phone_number_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #13
0
 def test_004_Verify_User_Number(self):
     """
     用例四 :验证用户编号查询
     """
     try:  # 传参 需要查询的用户编号
         self.AccountListBusiness()
         self.assertTrue(self.c.verify_user_number_query(user_number))
     except (BaseException, AssertionError) as msg:
         self.c.save_img('StaffListTest_004_user_number_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #14
0
 def test_003_Verify_Staff_Number(self):
     """
     用例三 :验证工号查询
     """
     try:  # 传参 需要查询的工号
         self.AccountListBusiness()
         self.assertTrue(self.c.verify_work_number_query(staff_number))
     except (BaseException, AssertionError) as msg:
         self.c.save_img('StaffListTest_003_staff_number_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #15
0
 def test_002_Verify_Select_Shop_name(self):
     """
     用例二 :验证门店名称使用全选的方式查询
     """
     try:
         self.AccountListBusiness()
         self.assertIsNotNone(self.c.verify_select_shop_query())
     except (BaseException, AssertionError) as msg:
         self.c.save_img('StaffListTest_002_shop_check_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #16
0
 def test_007_Setting_Crypto_USDT_Page(self):
     """
     用例七 :结算货币切换成USDT
     """
     try:
         self.b.switch_to_SettingPage()
         self.assertTrue(self.c.setting_crypto('USDT'))
     except (BaseException, AssertionError) as msg:
         self.c.save_img('Setting_007_usdt_crypto_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #17
0
 def test_001_Click_Setting_Page(self):
     """
     用例一 :检查设置页面是否正常
     """
     try:
         self.b.switch_to_SettingPage()
         self.assertTrue(self.c.click_setting())
     except (BaseException, AssertionError) as msg:
         self.c.save_img('Setting_001_setting_fail')
         InsertLog().debug(msg)
         raise BaseException
 def test_003_Verify_Select_Shop_name(self):
     """
     用例三 :验证数字货币记录>门店名称使用全选的方式查询
     """
     try:
         self.DigitalCurrencyRecordList()
         self.assertIn(shop_name, self.c.verify_select_shop_query())
     except (BaseException, AssertionError) as msg:
         self.c.save_img('DigitalCurrency_003_select_shop_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #19
0
 def test_004_Modify_Fees_Tax_Page(self):
     """
     用例四 :修改费用管理
     """
     try:
         self.b.switch_to_SettingPage()
         self.assertTrue(self.c.update_fees_tax())
     except (BaseException, AssertionError) as msg:
         self.c.save_img('Setting_004_modify_fees_fail')
         InsertLog().debug(msg)
         raise BaseException
 def test_005_Verify_Day_Query(self):
     """
     用例五 :验证数字货币记录>日期查询功能
     """
     try:  # 传参 开始日期和结束日期,只能输入比当前日期前一天的时间
         self.DigitalCurrencyRecordList()
         self.assertIsNotNone(self.c.verify_day_query(start_day, end_day))
     except (BaseException, AssertionError) as msg:
         self.c.save_img('DigitalCurrency_005_Day_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #21
0
 def test_006_Setting_Crypto_DAI_Page(self):
     """
     用例六 :结算货币切换成DAI
     """
     try:
         self.b.switch_to_SettingPage()
         self.assertTrue(self.c.setting_crypto('DAI'))
     except (BaseException, AssertionError) as msg:
         self.c.save_img('Setting_006_dai_crypto_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #22
0
 def test_008_Verify_Delete_Success(self):
     """
     用例八 :验证删除成功后返回信息
     """
     try:
         self.ShopListBusiness()
         self.assertTrue(self.c.verify_delete_function())
     except (BaseException, AssertionError) as msg:
         self.c.save_img('ShopListTest_008_delete_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #23
0
 def test_002_Verify_Input_Shop_Name(self):
     """
     用例二 :验证门店名称使用输入的方式查询
     """
     try:  # 传参 需要查询的门店名称
         self.OrderManagermentBusiness()
         self.assertTrue(self.c.input_shop_query(shop_name))
     except (BaseException, AssertionError) as msg:
         self.c.save_img('OrderTest_002_search_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #24
0
 def test_001_Check_page(self):
     """
     用例一 :检查页面是否正常
     """
     try:
         self.ShopListBusiness()
         self.assertTrue(self.c.get_newshop_msg())
     except (BaseException, AssertionError) as msg:
         self.c.save_img('001_page_error')
         InsertLog().debug(msg)
         raise BaseException
Example #25
0
 def test_004_Verify_Modify_Function(self):
     """
     用例四 :验证详情页面
     """
     try:
         self.OrderManagermentBusiness()
         self.assertTrue(self.c.verify_modify_function())
     except (BaseException, AssertionError) as msg:
         self.c.save_img('OrderTest_004_details_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #26
0
 def test_002_Add_Shop(self):
     """
     用例二 :新增门店
     """
     try:  # 传参 门店名称,门店地址,门店电话
         self.ShopListBusiness()
         self.assertTrue(self.c.add_shop_success(add_shop_name, u'深圳南山', tel))
     except (BaseException, AssertionError) as msg:
         self.c.save_img('ShopListTest_002_add_shop_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #27
0
 def test_006_Verify_Day_Query(self):
     """
     用例六 :验证现金记录>日期查询功能
     """
     try:  # 传参 开始日期和结束日期,只能输入比当前日期前一天的时间
         self.CashRecordListBusiness()
         self.assertIsNotNone(self.c.verify_day_query(start_day, end_day))
     except (BaseException, AssertionError) as msg:
         self.c.save_img('ReportCash_006_Day_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #28
0
 def test_004_Verify_Shop_Name(self):
     """
     用例四 :验证门店名称查询
     """
     try:  # 传参 需要查询的门店名称
         self.ShopListBusiness()
         self.assertTrue(self.c.verify_shop_name_query(shop_name))
     except (BaseException, AssertionError) as msg:
         self.c.save_img('ShopListTest_004_search_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #29
0
 def test_004_Verify_Select_Shop_name(self):
     """
     用例四 :验证现金记录>门店名称使用全选的方式查询
     """
     try:
         self.CashRecordListBusiness()
         self.assertIn(shop_name, self.c.verify_select_shop_query())
     except (BaseException, AssertionError) as msg:
         self.c.save_img('ReportCash_004_select_shop_fail')
         InsertLog().debug(msg)
         raise BaseException
Example #30
0
 def test_005_Verify_Tel_Phone(self):
     """
     用例五 :验证电话查询
     """
     try:  # 传参 需要查询的电话
         self.ShopListBusiness()
         self.assertTrue(self.c.verify_telephone_query(tel))
     except (BaseException, AssertionError) as msg:
         self.c.save_img('ShopListTest_005_search_fail')
         InsertLog().debug(msg)
         raise BaseException