예제 #1
0
파일: base.py 프로젝트: i-xingxu/Test
 def __init__(self, path, driver):
     CONF_NAME_SCRPATH="ScreenShotPath"
     CONF_NAME_PATH="path"
     self.lg=logoutput.Logger()
     self.driver = driver
     cf=conf.Conf()
     self.SCR_PATH = cf.get_conf_data( CONF_NAME_SCRPATH)[CONF_NAME_PATH]
예제 #2
0
 def __init__(self):
     my = mysql.Mysql()
     my.connect_mysql()
     self.my = my
     self.cur = my.cur
     lg = logoutput.Logger()
     self.lg = lg
예제 #3
0
    def __init__(self):

        CONF_NAME_XMLPATH="XmlPath"
        self.lg=logoutput.Logger()
        cf=conf.Conf()
        self.lg.info("从配置文件获取xml地址")
        self.p=cf.get_conf_data(CONF_NAME_XMLPATH)
예제 #4
0
 def __init__(self, driver):
     CONF_NAME_SCRPATH = "ScreenShotPath"
     CONF_NAME_PATH = "path"
     self.lg = logoutput.Logger()
     '''
     传入driver对象
     :param driver:
     :return:
     '''
     self.driver = driver
     cf = conf.Conf()
     self.SCR_PATH = cf.get_conf_data(CONF_NAME_SCRPATH)[CONF_NAME_PATH]
예제 #5
0
 def __init__(self):
     # my=mysql.Mysql()
     # my.connect_mysql()
     # self.my=my
     # self.cur=my.cur
     lg = logoutput.Logger()
     self.lg = lg
     self.cf = conf.Conf()
     f = self.cf.get_conf_data("File")
     self.df = pd.read_csv(f["path"], encoding='utf-8', index_col=False)
     byTime = self.df
     byTime["时间"] = pd.to_datetime(byTime["时间"])
     self.byTime = byTime.set_index(byTime["时间"])
예제 #6
0
 def switch_result(self):
     pathList = self.get_report_dir()
     if pathList:
         p = list(pathList)[0]
         f = open(p, "r", encoding="utf-8")
         r = f.read()
         r = r.encode("unicode_escape")
         r = r.replace(b"\\\\u", b"\\u")
         r = r.decode("unicode_escape", "ignore")
         f.close()
         f1 = open(p, "w", encoding="utf-8")
         f1.write(str(r))
         f1.close()
     else:
         lg = logoutput.Logger()
         lg.error("未找到测试结果文件!")
예제 #7
0
 def __init__(self):
     self.lg = logoutput.Logger()
     # 打开excel表格
     try:
         # data = xlrd.open_workbook(path)
         self.open_excel()
         self.table = self.data.sheet_by_index(0)
         self.ROW_COUNT = self.table.nrows
     except Exception as e:
         self.lg.error(e)
         self.lg.error("打开Excel表格失败!")
     # 数据库连接
     try:
         self.db = mysql.Mysql()
         self.db.connect_mysql()
     except Exception as e:
         self.lg.error(e)
         self.lg.error("连接数据库失败!")
예제 #8
0
 def __init__(self):
     # self.CONF_PATH = CONF_PATH
     self.lg = logoutput.Logger()
예제 #9
0
 def __init__(self):
     self.lg = logoutput.Logger()
예제 #10
0
파일: webbase.py 프로젝트: i-xingxu/Test
 def __init__(self):
     # self.CONF_PATH = CONF_PATH
     self.lg = logoutput.Logger()
     self.cf = conf.Conf()
예제 #11
0
 def __init__(self):
     self.lg = logoutput.Logger()
     self.cf = conf.Conf()
     self.IntegrityError = pymysql.IntegrityError