自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 Jmeter汉化

汉化Jmeter:打开JMeter解压/安装路径下的文件JMeter.properties,在#language=en下面添加:language=zh_CN保存文件,并重启JMeter。

2020-07-08 09:17:31 104

原创 重写查找元素的方法加入显式等待

from selenium.webdriver.support.ui import WebDriverWait from selenium.common.exceptions import NoSuchElementException, TimeoutException from selenium import webdriver class Base(object): def __init__(self): self.driver = webdriver.Chrome() .

2020-06-04 09:30:47 226

原创 Pytest介绍

Pytest是python2自带的自动化测试框架,python3的版本的话pytest框架独立出来,需要pip进行安装 Pytest的下载安装 1、Python3使用pip install -U pytest安装 2、查看pytest版本信息 pytest --version 3、pytest 用例的执行规则: ①测试文件以test_xx.py命名需要以test_开头(或_test结尾) ②测试类以Test_开头,并且不能带有init方法 ③测试函...

2020-05-25 09:23:45 935

转载 闭包(closures)与python装饰器(Decorator)

1、闭包 (function closures) 引用自有变量的函数,简单来说就是在自己函数内定义的变量,通过嵌套函数引用它间接意义上扩大它的作用域,使其影响到函数以外的区域。 talk is cheap,show me the code def print_msg(): msg = "I'm closure" # printer是嵌套函数 def printer...

2020-04-30 11:50:31 109

原创 20200420sql分页 随笔

mysql、sql Server 、oracle mysql 用limit select语句后面跟 limit 5 检索前5行 如果是 limit 5,10 则检索第六行开始 十条数据 即6-15 第一个表示偏移量 第二个表示返回行最大数 oracle用ROWNUM 或者ROWID 一般是ROWNUM 可排序之后加where ROWNUM < =100 取前一百行数据 sql...

2020-04-20 10:53:17 65

原创 python 线程初体验

import threading import time class myThread(threading.Thread): def __init__(self, threadID, name, counter): threading.Thread.__init__(self) self.threadID = threadID self...

2020-04-17 12:38:17 91

原创 自动化随笔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 75

原创 python类执行顺序

class A: def __init__(self): self.n = 2 def add(self, m): print('self is {0} @A.add'.format(self)) self.n += m class B(A): def __init__(self): self.n = ...

2020-04-17 11:50:00 784

转载 BAT批处理脚本学习记录

1、@echo off@表示不显示后面的命令@echo off关掉回显/on 为开启回显2、echo 显示后面的内容 创建文件增加内容如:echo @echo off&gt;autoexec.batecho pause&gt;&gt;autoexec.bat3、::注释4、color显示背景色和文字颜色:    0 = 黑色        8 = 灰色    1 = 蓝色        9 = 淡...

2018-07-04 21:20:12 146

转载 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 89

原创 我的第一个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 170

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除