Selenium3与Python3实战 Web自动化测试框架
po模型 + 数据驱动 ,完整代码
1、setting.py:
![]()
import os
base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # 项目首路径
codeerror_path = os.path.join(base_dir,'Image','codeerror.png') # 验证码错误图片路径
code_path = os.path.join(base_dir,'Image','code.png') # 验证码图片保存路径
config_ini_dir = os.path.join(base_dir,'setting_conf','localElement.ini') # localElement.ini 配置文件路径
report_path = os.path.join(base_dir,'report','first_case.html') # 测试报告路径
excel_default_path = os.path.join(base_dir,'ex_data','casedata.xls') # excel表默认路径
excel_keyword_path = os.path.join(base_dir,'ex_data','keyword.xls') # excel表默认路径
setting.py