随笔分类 -  python自动化测试

摘要:git loggit reset --hard 686e844f044d39fb...git push --force 阅读全文
posted @ 2024-03-14 11:30 OTAKU_nicole 阅读(9) 评论(0) 推荐(0)
摘要:import pytest class TestCase: def setup_class(self): print("setup_class:所有用例执行之前") def setup_method(self): print("setup_method: 每个用例开始前执行") def teardo 阅读全文
posted @ 2024-02-27 17:33 OTAKU_nicole 阅读(32) 评论(0) 推荐(0)
摘要:pytest-html指定版本3.1.1即可解决 pip install pytest-html==3.1.1 阅读全文
posted @ 2023-08-22 11:11 OTAKU_nicole 阅读(106) 评论(1) 推荐(1)
摘要:打开Dashboard-Manage Jenkins-Script Console 运行 System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "") 阅读全文
posted @ 2022-08-26 16:41 OTAKU_nicole 阅读(37) 评论(0) 推荐(0)
摘要:import json from websocket._core import create_connection # 安装 websocket-client host = "wss://****" ws = create_connection(host,timeout=3) try: # 发送da 阅读全文
posted @ 2022-07-11 17:49 OTAKU_nicole 阅读(114) 评论(0) 推荐(0)
摘要:关于ActionChains(driver).move_by_offset(x,y)时,move target out of bounds的问题 move_by_offset()中使用坐标都是针对上一步的计算的,若不想计算,可使用reset_actions() 重置为(0,0)。 action = 阅读全文
posted @ 2022-02-15 17:03 OTAKU_nicole 阅读(2541) 评论(0) 推荐(0)
摘要:driver.find_element_by_css_selector(".ui-btn-primary").click() 确定了定位没有问题,但是运行的时候点不到,报错信息是"error":"element click intercepted","message":"element click 阅读全文
posted @ 2022-01-07 10:14 OTAKU_nicole 阅读(542) 评论(0) 推荐(0)
摘要:from selenium.webdriver.common.by import By ''' # 如百度输入框 <input id="kw" name="wd" class="s_ipt" value="" maxlength="255" autocomplete="off"> ''' # css 阅读全文
posted @ 2021-08-04 10:35 OTAKU_nicole 阅读(209) 评论(0) 推荐(0)
摘要:生成文件 pip freeze > requirements.txt 安装依赖库 pip install -r requirements.txt 阅读全文
posted @ 2021-06-18 11:34 OTAKU_nicole 阅读(68) 评论(0) 推荐(0)
摘要:import time from tomorrow import threads @threads(3) def print_thread(i): time.sleep(2) print(time.strftime("%H:%M:%S"),i,"执行完毕") list = { 'AAA', 'BBB 阅读全文
posted @ 2021-06-11 16:59 OTAKU_nicole 阅读(76) 评论(0) 推荐(0)
摘要:import requests url = 'https://www.***.com/downloadFile' r = requests.get(url) fp = open("test.xls", "wb") fp.write(r.content) fp.close() cookie略,根据实际 阅读全文
posted @ 2021-06-03 16:36 OTAKU_nicole 阅读(222) 评论(0) 推荐(0)
摘要:抓到页面请求可以看到这些,使用files,cookie省略,根据实际情况添加 import requests url = "https://www.***.com/uploadExcel.json" # => 打开上传文件并且加入文件相关参数 file = { 'excel': open(r'C:\ 阅读全文
posted @ 2021-06-03 14:53 OTAKU_nicole 阅读(246) 评论(0) 推荐(0)
摘要:import json str_Detail = '{"rowOne":"A","rowTwo":"B","rowThree":"C"}' print(str_Detail, type(str_Detail)) ''' {"rowOne":"A","rowTwo":"B","rowThree":"C 阅读全文
posted @ 2021-05-27 14:06 OTAKU_nicole 阅读(152) 评论(0) 推荐(0)
摘要:Git+Jenkins配置(一)环境搭建 Git+Jenkins配置(二)jenkins中通过git拉取代码 Git+Jenkins配置(三)配置HTML报告 Git+Jenkins配置(四)自动发送邮件 输入邮箱配置后保存 修改任务配置 增加构建后操作步骤-Editable Email Notif 阅读全文
posted @ 2021-04-28 15:37 OTAKU_nicole 阅读(199) 评论(0) 推荐(0)
摘要:Git+Jenkins配置(一)环境搭建 Git+Jenkins配置(二)jenkins中通过git拉取代码 Git+Jenkins配置(三)配置HTML报告 Git+Jenkins配置(四)自动发送邮件 需要先安装两个插件Groovy、HTML Publisher plugin 修改配置 增加构建 阅读全文
posted @ 2021-04-28 15:08 OTAKU_nicole 阅读(127) 评论(0) 推荐(0)
摘要:通常提示'python' 不是内部或外部命令,也不是可运行的程序就是需要加个环境变量, 可是我电脑里已经配置了环境变量,猜测是jenkins里没有,找到一个环境变量设置的位置 新增环境变量 搞定 阅读全文
posted @ 2021-04-28 11:06 OTAKU_nicole 阅读(689) 评论(0) 推荐(0)
摘要:Git+Jenkins配置(一)环境搭建 Git+Jenkins配置(二)jenkins中通过git拉取代码 Git+Jenkins配置(三)配置HTML报告 Git+Jenkins配置(四)自动发送邮件 Jenkins配置 Git+Jenkins配置(一):https://www.cnblogs. 阅读全文
posted @ 2021-04-27 14:15 OTAKU_nicole 阅读(398) 评论(0) 推荐(0)
摘要:Jenkins创建一个任务 增加构建步骤 输入命令 保存后构建 阅读全文
posted @ 2021-04-27 11:10 OTAKU_nicole 阅读(178) 评论(0) 推荐(0)
摘要:Git+Jenkins配置(一)环境搭建 Git+Jenkins配置(二)jenkins中通过git拉取代码 Git+Jenkins配置(三)配置HTML报告 Git+Jenkins配置(四)自动发送邮件 1、下载Tomcat 官网:https://tomcat.apache.org/ 下载之后解压 阅读全文
posted @ 2021-04-27 10:11 OTAKU_nicole 阅读(309) 评论(0) 推荐(0)
摘要:java下载 https://www.oracle.com/java/technologies/javase-downloads.html 根据操作系统选择对应版本下载 安装jdk,安装完成后设置环境变量 计算机-右键-属性-高级系统设置-环境变量-系统变量-新建变量 变量名:JAVA_HOME 变 阅读全文
posted @ 2021-04-26 16:02 OTAKU_nicole 阅读(212) 评论(0) 推荐(0)