上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页
摘要: 加了一个ensure_ascii=False 就好了 json.dumps(data, ensure_ascii=False) 阅读全文
posted @ 2023-02-01 15:01 博无止境 阅读(214) 评论(0) 推荐(0)
摘要: 问题: 如何使用python的requests函数来发送一个“文件上传”的接口? 一:首先得打开文件, file = {'文件参数名': open('文件路径', 'rb')} “文件路径”好理解, 但是“文件参数名”从哪里获取呢?可以抓包获取,抓你上传文件的接口, 它的请求参数里面有“文件参数名” 阅读全文
posted @ 2023-01-12 17:45 博无止境 阅读(492) 评论(0) 推荐(0)
摘要: 使用enumerate() 函数可以实现,如下图, 前面的就是下标顺序, 后面就是值 s = [1, 2, 3, 4, 5] for i, d in enumerate(s): print(i, d) 执行结果>>> 0 1 1 2 2 3 3 4 4 5 阅读全文
posted @ 2023-01-09 16:05 博无止境 阅读(214) 评论(0) 推荐(0)
摘要: 前言: 试想一下1000条用例,每条用例1s全部线性执行下来都要十几分钟, 如果改用多线程执行,开十个线程一分多钟就可以搞定, 这是多大诱惑。啃了几天终于也是拿下了多线程,虽然学会了,最终却发现项目上不适用,无奈下只能放弃。 如何使用多线程? 安装:pip install pytest-xdist 阅读全文
posted @ 2023-01-09 15:54 博无止境 阅读(932) 评论(0) 推荐(0)
摘要: 先看效果, 如下图,把第一个字符,* 去掉。 公式在这: =MID(A1,2,LEN(A1)-1) 要注意,如果数据在B列, 则需要将A字母改为B,依次类推 阅读全文
posted @ 2022-12-27 23:10 博无止境 阅读(1713) 评论(0) 推荐(0)
摘要: 公式在这里: =COUNTIF(A$1:A1,A1)=1 阅读全文
posted @ 2022-12-27 22:55 博无止境 阅读(139) 评论(0) 推荐(0)
摘要: def absolute(x): if x >= 0: return x else: return -x print(absolute(3)) print(absolute(-119)) 阅读全文
posted @ 2022-10-30 17:58 博无止境 阅读(117) 评论(0) 推荐(0)
摘要: 在运行py文件时, 出现“UnicodeEncodeError: ‘gbk’ codec can’t encode character ‘\xa0’ in position XXX”,让人摸不着头脑。 注意这三个方面, 一般都能解决。 1.程序开头的编码设置# coding:utf-8 2.数据流I 阅读全文
posted @ 2022-10-22 11:11 博无止境 阅读(780) 评论(0) 推荐(0)
摘要: 目录 一、前言 1、Appium元素定位 1.1、Android页面介绍 2、App常用元素定位 1.1、id定位 1.2、UIAutomator定位 1.3、Xpath定位 1.4、content-desc定位 1.5、className定位 1.6、扩展 3、App元素定位方法调用 一、前言 A 阅读全文
posted @ 2022-10-13 23:12 博无止境 阅读(718) 评论(0) 推荐(0)
摘要: 新建一个txt文件, 将下面代码复制粘贴保存 @echo off color 2 reg delete HKCR\lnkfile /v IsShortcut /f reg delete HKCR\piffile /v IsShortcut /f reg delete HKCR\InternetSho 阅读全文
posted @ 2022-09-29 11:04 博无止境 阅读(340) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 20 下一页