摘要:
if __name__ == "__main__": # 设置进程池 pool = multiprocessing.Pool(processes=4) # 提供数据 py_test_list = get_test_case_path(TESTCASES_DIR) for i in py_test_l 阅读全文
摘要:
1、 docker环境 参考菜鸟教程:https://www.runoob.com/docker/ubuntu-docker-install.html 2、启动docker server 之前遇到问题,无法直接启动docker server;来回卸载安装了好几次环境仍然不行,最后,使用管理员身份运行 阅读全文
摘要:
1.首先要在windows10机器中启动Linux子系统: 使用管理员身份启动power shell Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux 2. 在商店下载安装Ubun 阅读全文
摘要:
if not os.path.exists(os.path.join(basePath, "Files")): """判断文件夹是否存在,不存在则创建文件夹""" os.mkdir(os.path.join(basePath, "Files")) screenshotPath = os.path.j 阅读全文
摘要:
1. 可以实现数据驱动,但是数据驱动和json文件不通用 json文件获取数据:cy.fixture('login/login.json').as("login_json") json提供数据更适合全局变量 数据驱动获取数据:var testData = [1,2,3] testData.forEa 阅读全文
摘要:
通过css定位前端元素 前端页面代码如下: <html> <body> <div class="formdiv"> <form name="fnfn"> <input name="username" type="text"></input> <input name="password" type=" 阅读全文
摘要:
这次讲怎么使用Xpath定位元素 1. 绝对定位(不推荐) 使用copy就能实现元素绝对定位:/html/body/div/blockquote/div[2]/div[1]/div[1]/div/button[1]/i 2. 相对定位(推荐) 1. 标签名 //form 2. 标签名+属性名+属性值 阅读全文
摘要:
1、针对UI自动化测试,最基础的内容是:元素定位。只有定位到了元素后,才能对其进行相应的操作 2、那么我们常见的几种定位方式有哪些呢 1. by id JS写法:document.getElementById("serviceCode"); selenium写法:driver.find_elemen 阅读全文
摘要:
1. 本地新增项目 touch README.md git init git add README.md git commit -m "first commit" git remote add origin https://XXX.git 仓库地址 git push -u origin master 阅读全文
摘要:
1 class SearchLinkJson(APIView): 2 """搜索""" 3 def post(self, request): 4 """前端提交表单后,获取表单数据, 组成一个dict,再用filter过滤""" 5 json_data = simplejson.loads(requ 阅读全文