01 2017 档案
摘要:搞了一下午,终于搞明白了,记录下:python3.x 使用pymysql库访问 python2.x使用mysqldb库访问import pymysqlconn = pymysql.connect(host='xxx.xxx.xxx.xxx', user='name', passwd='123456'
阅读全文
摘要:找到**appium安装目录,可以在 appium 源码里注释掉安装 unlock 和 setting 两个 app 的代码:lib/devices/android/android.js **https://static.oschina.net/uploads/space/2016/1012/145
阅读全文
摘要:[] 字符类,只要匹配里面的任意字符,都算匹配 . 元字符,可以匹配除换行符之外的所有字符 大小写敏感,但是可以关闭 \d 可以匹配0-9中的任意数字 {3}大括号里面的数字,边上前面一个字符匹配的次数 {3,10}表示匹配3-10次 ()小括号,表示小组 search 从字符串中查找 re.sea
阅读全文
摘要:1、使用命令拦截: 命令栏输入:bpafter + 域名 取消拦截 bpafter 2、自动发送固定返回结果 设置返回内容: 1、匹配规则 2,、返回内容 修改好之后,点击save保存
阅读全文
摘要:设置断点的两种方式: 1、通过工具栏设置断点 步骤:Rules --Automatic Breakpoints --选中 Before Requests 设置之后,客户端或者浏览器发起请求,模拟Google,搜索nba,查看fiddler, 修改搜索词为test,点击RUN to Completio
阅读全文
摘要:import unittestfrom ddt import ddt, data, unpack@ddtclass MyTestCase(unittest.TestCase): @data((1, 2), (2, 3)) #多个数据项 @unpack #两个或超过两个需要使用@unpack def
阅读全文
摘要:1、获取进程ID adb shell ps |findstr packagename 2、获取cpu的值 adb shell dumpsys cpuinfo |findstr packagename 3、获取流量的值 adb shell cat /proc/pid/net/dev
阅读全文
摘要:with open(fileName,'w',newline='') as f: self.fileNames = ['timestamp','elapsedtime'] writer = csv.DictWriter(f,fieldnames = self.fileNames) for li in
阅读全文
摘要:app启动: 冷启动和热启动 冷启动方式: adb shell am start -W -n package/activity 停止app命令: adb shell am force-stop package 热启动命令和冷启动命令一样 停止命令: adb shell input keyevent
阅读全文
摘要:Python内置的 sorted()函数可对list进行排序: >>>sorted([36, 5, 12, 9, 21]) [5, 9, 12, 21, 36] 但 sorted()也是一个高阶函数,它可以接收一个比较函数来实现自定义排序,比较函数的定义是,传入两个待比较的元素 x, y,如果 x
阅读全文

浙公网安备 33010602011771号