python3+selenium3UI自动化测试
a little peanut
(°_°)…
展开
-
python解析excel文件
通过openpyxl库解析excel文件from openpyxl import load_workbookclass ParseExcel(object): """解析excel文件""" def __init__(self): # 获取excel路径 self.data_path = "Excel文件路径" # 获取到excel指定对象 self.wb = load_workbook(self.data_path).原创 2021-11-25 21:28:12 · 3563 阅读 · 0 评论 -
python解析ini配置文件
通过configparser库解析ini配置文件import configparserclass ParseConfigFile(object): """解析ini配置文件""" def __init__(self): try: self.cf = configparser.ConfigParser() # 获取配置文件对象 self.cf.read("配置文件路径", encoding='utf-8') # 加载配.原创 2021-11-25 21:07:31 · 824 阅读 · 0 评论 -
python封装当前日期时间函数
通过os、date、datetime库获取当前日期、时间、文件创建路径import osfrom datetime import datetime, dateclass DateTime(object): @staticmethod def get_current_date(): """获取当前日期""" try: current_date = date.today() except Exception as .原创 2021-11-25 20:57:33 · 707 阅读 · 0 评论
分享