摘要: #用于发送测试报告(带附件)或其它内容 # -*- coding:utf-8 -*- import os import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipar 阅读全文
posted @ 2019-09-28 23:50 chenzy01 阅读(874) 评论(0) 推荐(0) 编辑
摘要: # coding:UTF-8 # 随机生成手机号码 import random from string import digits def createPhoneNumber(): prelist = ["130", "131", "132", "133", "134", "135", "136", 阅读全文
posted @ 2019-09-28 23:48 chenzy01 阅读(808) 评论(0) 推荐(0) 编辑
摘要: # 获取日期加减之后的日期方法一 from datetime import date, timedelta def get_date(day_off): """ if n>=0,date is larger than today if n<0,date is less than today date 阅读全文
posted @ 2019-09-28 23:47 chenzy01 阅读(374) 评论(0) 推荐(0) 编辑
摘要: import os from selenium import webdriver @staticmethod def browser(browserType): """ 切换浏览器前,判断浏览器类型,并返回相应的驱动 :param browserType: 浏览器类型:ie,chrome,firef 阅读全文
posted @ 2019-09-28 23:43 chenzy01 阅读(429) 评论(0) 推荐(0) 编辑
摘要: ```python '''将数据写入 excel ''' def write_excel(self, file_path, sheet_name, date_dict: dict): """ :param file_path: excle 文件的绝对路径 :param sheet_name: 将数据写入哪一页 :param date_dict: 写入的数据,字典类型 :return: """ wb 阅读全文
posted @ 2019-09-28 23:38 chenzy01 阅读(961) 评论(0) 推荐(0) 编辑
摘要: 1、python -m pytest [...]通过该命令执行测试文件,会把当前目录添加到sys.path 环境变量中,相当于pytest命令。 2、如果打开多个浏览器句柄和标签页的对应关系: 标签页顺序(按照打开顺序):1 2 3 4 5 对应的句柄 :0 4 3 2 1 依次类推 3、 1.)关 阅读全文
posted @ 2019-07-30 21:46 chenzy01 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1、进入cmd ,使用powershell 2、查看powershell 的版本,scoop要求powershell 版本至少是5或更高 3、下载 scoop并安装 4、查看scoop 是否安装完成 5、安装 allure 6、使用 allure 需要提前安装 Java jdk,官方文档建议使用 j 阅读全文
posted @ 2019-07-30 21:41 chenzy01 阅读(564) 评论(0) 推荐(0) 编辑
摘要: 环境 docker 版本: 18.09.2 windows 版本:win10,用HyperV 命令行工具:git-bash git version 2.21.0.windows.1 1.在当前宿主机的目录目录下创建三个文件,用来与 docker 中的 mysql 镜像进行挂载 $ mkdir -p 阅读全文
posted @ 2019-07-13 14:13 chenzy01 阅读(1943) 评论(0) 推荐(0) 编辑
摘要: Python点滴 阅读全文
posted @ 2019-07-12 19:56 chenzy01 阅读(437) 评论(0) 推荐(0) 编辑
摘要: https://cn.charlee.li/bash-pitfalls.html 改文章列举了使用bash命令常见的错误,多看看避免犯错 阅读全文
posted @ 2019-07-07 12:43 chenzy01 阅读(101) 评论(0) 推荐(0) 编辑