- 博客(11)
- 收藏
- 关注
原创 Jmeter汉化
汉化Jmeter:打开JMeter解压/安装路径下的文件JMeter.properties,在#language=en下面添加:language=zh_CN保存文件,并重启JMeter。
2020-07-08 09:17:31
141
原创 重写查找元素的方法加入显式等待
from selenium.webdriver.support.ui import WebDriverWaitfrom selenium.common.exceptions import NoSuchElementException, TimeoutExceptionfrom selenium import webdriverclass Base(object): def __init__(self): self.driver = webdriver.Chrome() .
2020-06-04 09:30:47
264
原创 Pytest介绍
Pytest是python2自带的自动化测试框架,python3的版本的话pytest框架独立出来,需要pip进行安装Pytest的下载安装1、Python3使用pip install -U pytest安装2、查看pytest版本信息 pytest --version3、pytest 用例的执行规则:①测试文件以test_xx.py命名需要以test_开头(或_test结尾)②测试类以Test_开头,并且不能带有init方法③测试函...
2020-05-25 09:23:45
993
转载 闭包(closures)与python装饰器(Decorator)
1、闭包 (function closures)引用自有变量的函数,简单来说就是在自己函数内定义的变量,通过嵌套函数引用它间接意义上扩大它的作用域,使其影响到函数以外的区域。talk is cheap,show me the codedef print_msg(): msg = "I'm closure" # printer是嵌套函数 def printer...
2020-04-30 11:50:31
143
原创 20200420sql分页 随笔
mysql、sql Server 、oraclemysql 用limitselect语句后面跟 limit 5 检索前5行 如果是 limit 5,10 则检索第六行开始 十条数据 即6-15 第一个表示偏移量 第二个表示返回行最大数oracle用ROWNUM 或者ROWID 一般是ROWNUM 可排序之后加where ROWNUM < =100 取前一百行数据sql...
2020-04-20 10:53:17
90
原创 python 线程初体验
import threadingimport timeclass myThread(threading.Thread): def __init__(self, threadID, name, counter): threading.Thread.__init__(self) self.threadID = threadID self...
2020-04-17 12:38:17
135
原创 自动化随笔20200417
1、定位一组元素最后一个使用xpath定位,替换xpath路径中标签的下标为last()例如:选择列表中最后一条数据driver.find_element_by_xpath('//*[@id="uiid-3865277839387761"]/tbody/tr[last()]/td[6]').click()2、选择非select下拉框中的数据使用xpath text()='XXX'...
2020-04-17 12:02:51
105
原创 python类执行顺序
class A: def __init__(self): self.n = 2 def add(self, m): print('self is {0} @A.add'.format(self)) self.n += mclass B(A): def __init__(self): self.n = ...
2020-04-17 11:50:00
871
转载 BAT批处理脚本学习记录
1、@echo off@表示不显示后面的命令@echo off关掉回显/on 为开启回显2、echo 显示后面的内容 创建文件增加内容如:echo @echo off>autoexec.batecho pause>>autoexec.bat3、::注释4、color显示背景色和文字颜色: 0 = 黑色 8 = 灰色 1 = 蓝色 9 = 淡...
2018-07-04 21:20:12
173
转载 python学习,记录
1、zip函数 实例 :l = ['a', 'b', 'c', 'd', 'e','f']print zip(l[:-1],l[1:])print zip(*zip(l[:-1],l[1:]))输出结果:[('a', 'b'), ('b', 'c'), ('c', 'd'), ('d', 'e'), ('e', 'f')][('a', 'b', 'c', 'd', 'e'), ('b', 'c',...
2018-07-04 21:11:41
108
原创 我的第一个python纪念一哈20180702
import random# guess = random.randint(1,101)# print("I'm thinking of a number! Try to guess the number I'm thinking of:")while 1: guess = random.randint(1, 100) print("I'm thinking of a num...
2018-07-02 23:33:11
214
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人