def test_invoice_packing_list(self): u'''测试销项发票明细表''' excel = excelHandle() filename = r'D:\PycharmProjects\AutoTestEinvoice\script\税务云-正式环境fapiao\6.销项统计\销项发票明细表-正.xlsx' sheetname = 'Sheet1' tables = excel.read_excel(unicode(filename, "utf-8"), sheetname) # 公共部分,读取表格 util = Utils(BasePage) util.util(self.driver, tables)
def test_dhistorical_records(self): u'''查验历史记录''' excel = excelHandle() logger.info("开始回放脚本查验历史记录") logger.info("开始回放脚本查验历史记录") filename = r'D:\PycharmProjects\AutoTestEinvoice\script\税务云-正式环境fapiao\5.企业受票\查验历史记录-正.xlsx' sheetname = 'Sheet1' tables = excel.read_excel(unicode(filename, "utf-8"), sheetname) # 公共部分,读取表格 util = Utils(BasePage) util.util(self.driver, tables) logger.info("结束回放脚本查验历史记录") logger.info("结束回放脚本查验历史记录")
def test_dstaff_management(self): u'''测试员工管理''' excel = excelHandle() logger.info("开始回放脚本员工管理") filename = r'D:\PycharmProjects\AutoTestEinvoice\script\税务云-正式环境fapiao\3.应用设置\员工管理-正.xlsx' sheetname = 'Sheet1' tables = excel.read_excel(unicode(filename, "utf-8"), sheetname) # 公共部分,读取表格 util = Utils(BasePage) util.util(self.driver, tables) logger.info("结束回放脚本员工管理") logger.info("结束回放脚本员工管理") logger.info("结束回放脚本员工管理") logger.info("结束回放脚本员工管理")
def test_code_open(self): u'''码上开票''' excel = excelHandle() logger.info("开始回放脚本码上开票") logger.info("开始回放脚本码上开票") filename = r'D:\PycharmProjects\AutoTestEinvoice\script\税务云-正式环境fapiao\4.企业开票\码上开票-正.xlsx' sheetname = 'Sheet1' tables = excel.read_excel(unicode(filename, "utf-8"), sheetname) # 公共部分,读取表格 util = Utils(BasePage) util.util(self.driver, tables) logger.info("结束回放脚本码上开票") logger.info("结束回放脚本码上开票") logger.info("结束回放脚本码上开票") logger.info("结束回放脚本码上开票")
def test_reimbursement_statistics(self): u'''测试报销统计表''' excel = excelHandle() logger.info("开始回放脚本报销统计表") logger.info("开始回放脚本报销统计表") filename = r'D:\PycharmProjects\AutoTestEinvoice\script\税务云-正式环境fapiao\7.进项统计\报销统计表-正.xlsx' sheetname = 'Sheet1' tables = excel.read_excel(unicode(filename, "utf-8"), sheetname) # 公共部分,读取表格 util = Utils(BasePage) util.util(self.driver, tables) logger.info("结束回放脚本报销统计表") logger.info("结束回放脚本报销统计表") logger.info("结束回放脚本报销统计表") logger.info("结束回放脚本报销统计表")
def test_dpersonal_center(self): u'''测试个人中心''' excel = excelHandle() logger.info("开始回放脚本个人中心") logger.info("开始回放脚本个人中心") filename = r'D:\PycharmProjects\AutoTestEinvoice\script\税务云-正式环境fapiao\11.个人用户操作\个人中心-正.xlsx' sheetname = 'Sheet1' tables = excel.read_excel(unicode(filename, "utf-8"), sheetname) # 公共部分,读取表格 util = Utils(BasePage) util.util(self.driver, tables) logger.info("结束回放脚本个人中心") logger.info("结束回放脚本个人中心") logger.info("结束回放脚本个人中心") logger.info("结束回放脚本个人中心")
def test_fkhda_management(self): u'''测试客户档案''' excel = excelHandle() logger.info("开始回放脚本客户档案") # filename = r'D:\PycharmProjects\AutoTestEinvoice\script\税务云-正式环境fapiao\3.应用设置\客户档案-正.xlsx' filename = r'C:\Users\Administrator\Desktop\Demo.xlsx' sheetname = 'Sheet1' tables = excel.read_excel(unicode(filename, "utf-8"), sheetname) # 公共部分,读取表格 util = Utils(BasePage) util.util(self.driver, tables) logger.info("结束回放脚本客户档案") logger.info("结束回放脚本客户档案") logger.info("结束回放脚本客户档案") logger.info("结束回放脚本客户档案")
def test_other_operation(self): u'''测试修改企业密码,在线客服,帮助文档''' excel = excelHandle() logger.info("开始回放脚本首页") logger.info("开始回放脚本首页") filename = r'D:\PycharmProjects\AutoTestEinvoice\script\税务云-正式环境fapiao\2.首页\其他操作.xlsx' sheetname = 'Sheet1' tables = excel.read_excel(unicode(filename, "utf-8"), sheetname) # 公共部分,读取表格 util = Utils(BasePage) util.util(self.driver, tables) logger.info("结束回放脚本首页") logger.info("结束回放脚本首页") logger.info("结束回放脚本首页") logger.info("结束回放脚本首页")
def test_caigou_account(self): u'''采购台账''' excel = excelHandle() logger.info("开始回放脚本采购台账") logger.info("开始回放脚本采购台账") filename = r'D:\PycharmProjects\AutoTestEinvoice\script\税务云-正式环境fapiao\5.企业受票\采购台账-正.xlsx' sheetname = 'Sheet1' tables = excel.read_excel(unicode(filename, "utf-8"), sheetname) # 公共部分,读取表格 util = Utils(BasePage) util.util(self.driver, tables) logger.info("结束回放脚本采购台账") logger.info("结束回放脚本采购台账") logger.info("结束回放脚本采购台账") logger.info("结束回放脚本采购台账")
def test_dnot_open(self): u'''未开票''' excel = excelHandle() logger.info("开始回放脚本未开票") logger.info("开始回放脚本未开票") filename = r'D:\PycharmProjects\AutoTestEinvoice\script\税务云-正式环境fapiao\4.企业开票\未开票-正.xlsx' # filename = r'C:\Users\Administrator\Desktop\Demo.xlsx' sheetname = 'Sheet1' tables = excel.read_excel(unicode(filename, "utf-8"), sheetname) # 公共部分,读取表格 util = Utils(BasePage) util.util(self.driver, tables) logger.info("结束回放脚本未开票") logger.info("结束回放脚本未开票") logger.info("结束回放脚本未开票") logger.info("结束回放脚本未开票")
def get_excel(self, excel_path, sheetName): try: excel_list = Utils.read_excel(excel_path, sheetName) # list2=[excel_list[0].get("email"),excel_list[0].get("password")] return excel_list logger.info("获取数据表中的内容成功") except Exception as e: logger.error("获取失败%e" % e) self.get_windows_img()
'--service', help='Service to pull AWS events from', required=True) requiredNamed.add_argument( '-e', '--environment', help='Environment to pull AWS events from. If health ' 'services \'us-east-1\' is the only option', required=True) requiredNamed.add_argument( '-i', '--instances', help='Instance or list of instances to pull events on', required=False) args = parser.parse_args() # Set env globally for all future AWS commands aws = AWS(args.service, env=args.environment) # Grab instance tags if args.instances: instance_tags = args.instances.split(",") # Grab any and all events event = aws.get_aws_event_status( filters={'eventStatusCodes': ['upcoming']}) # Print what we find print(event) Utils.print_table(event)
from testsuit.basecase import BaseTestCase from pageobject.homepage import HomePage from ddt import ddt,unpack,data from framework.logger import Logger from framework.utils import Utils import unittest import time datatest=Utils.read_excel("E:/appium_UI_test_memo/data/data.xlsx", "Sheet1") logger=Logger(logger="LoginTest").getLog() @ddt class LoginTest(BaseTestCase): @data(*datatest) def test_login(self,data): '''登录功能''' home=HomePage(self.driver) userName = data['email'] pwd = int(data['password']) home.login(userName,pwd) realName=home.alert_userName() try: self.assertEqual(realName,"Lisa",msg="成功") logger.info("登录成功") except Exception as e: logger.error("登录失败!",e) time.sleep(4) home.logout() if __name__=="__main__": unittest.main(verbosity=2)