自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

放开那只大熊猫

软件测试

  • 博客(8)
  • 收藏
  • 关注

原创 python3+selenium:截图并保存到指定文件夹

一、截图方法1.get_screenshot_as_file(self, filename)--这个方法是获取当前window的截图,出现IOError时候返回False,截图成功返回True。filename参数是保存文件的路径。driver.get_screenshot_as_file('/Screenshots/foo.png')2.get_screenshot_as...

2020-01-12 17:33:00 5124 2

原创 python3:日志模块封装

#!/usr/bin/env python# coding: utf-8import loggingimport timeimport osdef get_log(log_model_name, style='console'): """ :param log_model_name: 要打印日志的模块名 :param style: 日志打印方式,conso...

2020-01-12 16:04:51 1128

原创 selenium.common.exceptions.InvalidElementStateException

selenium.common.exceptions.InvalidElementStateException: Message: invalid element state元素状态无效:原因1:元素未加载出来,添加等待原因2:元素定位不准确,定位的不可点击;应定位要可点击的那一层标签...

2020-01-12 14:11:38 7899 3

原创 python+selenium:数据参数化(从文件读取数据)

#!/usr/bin/env python# -*- coding=utf-8 -*-# coding: utf-8from selenium import webdriverfrom selenium.webdriver.support.ui import WebDriverWaitfrom common.read_txt import read_txt# from co...

2020-01-12 10:59:02 1438

原创 python3:从excel中读取数据,并以字典组成的列表返回

#!/usr/bin/env python# coding: utf-8import xlrddef read_xlsx(path, sheet): # book = xlrd.open_workbook(path) # 打开excel表 with xlrd.open_workbook(path, 'rb') as book: table =...

2020-01-12 10:45:48 1875

转载 ChromeDriver与Chrome版本对应参照表及ChromeDriver下载链接

ChromeDriver与Chrome版本对应参照表:https://blog.csdn.net/BinGISer/article/details/88559532ChromeDriver下载链接:http://chromedriver.storage.googleapis.com/index.html

2020-01-11 18:00:22 796

原创 Python3:pymysql模块详解

https://www.jb51.net/article/167429.htm

2020-01-09 22:24:59 294

原创 Python3:遍历文件夹中文件并修改后缀名

公司对安全要求很高,不允许邮件发送代码后缀文件,但是需要用到一些python库,而PC又无法访问外网,不能先把python库文件转换为“.txt”格式的发送了,才有了下面的轮子:#!/usr/bin/env python# -*- coding=utf-8 -*-# coding: utf-8import osimport shutildef show_files(path...

2020-01-09 20:57:21 1281

空空如也

空空如也

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

TA关注的人

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