07 2020 档案

摘要:#encodiing=utf-8 from openpyxl import load_workbook class ParseExcel(object): def __init__(self,excelPath,sheetName): self.wb=load_workbook(excelPath) 阅读全文
posted @ 2020-07-28 20:02 进阶的淑琴 阅读(73) 评论(0) 推荐(0)
摘要:#encoding=utf-8 import unittest from selenium import webdriver import time class GloryRoad(unittest.TestCase): def setUp(self): # 启动Firefox浏览器 self.dr 阅读全文
posted @ 2020-07-28 19:58 进阶的淑琴 阅读(188) 评论(0) 推荐(0)
摘要:import unittest class TestCasel(unittest.TestCase): def testCase1(self): print("test1_1_step_start") def testCase2(self): print("test1_2_step_start") 阅读全文
posted @ 2020-07-27 11:43 进阶的淑琴 阅读(184) 评论(0) 推荐(0)
摘要:数据驱动 定义:程序和数据分离,测试数据存入一个文件中,脚本存入另一个文件中 数据文件路径:e:\\pythonexcise\\aaa.txt 文件内容: 以下内容请放到一个txt文本中 add||1||1||2add||2||2||4sub||1||1||0sub||2||1||0 代码实现 #数 阅读全文
posted @ 2020-07-16 18:01 进阶的淑琴 阅读(1276) 评论(0) 推荐(0)
摘要:python3 使用traceback定位异常 1.使用自带的异常处理 if __name__=="__main__": try: 1/0 except Exception as e: print("输出错误结果:{}".format(e)) 2.使用traceback if __name__==" 阅读全文
posted @ 2020-07-16 15:15 进阶的淑琴 阅读(712) 评论(0) 推荐(0)