摘要: 1、id定位find_element_by_id() 通过id属性定位元素,如果id是动态变化的话不能用id来进行定位 2、name定位find_element_by_name() 通过name属性定位元素,不过有时候一个页面中会有多个name名相同的,这时就不能用name来定位啦 3、class定 阅读全文
posted @ 2020-04-12 19:27 喵精灵 阅读(476) 评论(0) 推荐(0)
摘要: 一、Python安装及selenium的安装 1、安装Pythonhttps://www.Python.org2、安装setuptools、distribute、piphttps://pypi.python.org/pypi/setuptools https://pypi.python.org/py 阅读全文
posted @ 2020-04-12 19:19 喵精灵 阅读(549) 评论(0) 推荐(0)
摘要: 1、报错信息为“ERROR 'str' object has no attribute 'endwith'”,排查发现endswith方法名写错了,少了s,写成了 'endwith' if interface_url.endswith('?'): req_url = interface_url + 阅读全文
posted @ 2020-04-12 19:02 喵精灵 阅读(3209) 评论(0) 推荐(0)
摘要: 编写好Python操作数据库的脚本后,运行报错如下: 报错1:“AttributeError: 'NoneType' object has no attribute 'encoding'” 解决办法:设置charset时要用utf8,不能用utf-8 if link_type == 0: # 创建数 阅读全文
posted @ 2020-04-10 17:33 喵精灵 阅读(6345) 评论(0) 推荐(0)
摘要: 问题:需要获取支付价格,而支付价格是商品价格*折扣 解决:先将商品价格和折扣获取出来,然后使用BeanShell将两个值相乘,获得最后的支付价格 1、使用json提取器提取商品的价格 2、使用正则表达式获取折扣值 3、使用BeanShell计算最终支付价格 4、执行查看计算的值 阅读全文
posted @ 2018-12-05 14:40 喵精灵 阅读(522) 评论(0) 推荐(0)
摘要: JSON提取器 Variable names(名称):提取器的名称Apply to(应用范围):Main sample and sub-samples:应用于主sample及子sampleMain sample only:默认的是这个,应用于主sampleSub-samples only:应用于子s 阅读全文
posted @ 2018-12-05 12:29 喵精灵 阅读(7943) 评论(0) 推荐(1)
摘要: 前提:准备好jmeter脚本,找到jmeter配置文件查看生成的日志格式是否为csv,如果不是请改为csv 注意:使用命令执行jmeter脚本必须使用jmeter 3.0及以上版本1、使用命令行执行脚本并生成日志文件进入到jmeter的bin目录下执行命令:jmeter -n -t D:\test\ 阅读全文
posted @ 2018-12-04 17:43 喵精灵 阅读(3849) 评论(0) 推荐(0)
摘要: 参考:https://jingyan.baidu.com/article/219f4bf788addfde442d38fe.html 1、下载图形识别工具Tesseract-ocr,下载路径https://github.com/UB-Mannheim/tesseract/wiki,选择相应的版本进行 阅读全文
posted @ 2018-12-04 17:20 喵精灵 阅读(670) 评论(0) 推荐(0)