随笔分类 - python+selenium+new(webUI自动化)
摘要:python处理Excel相关说明:1、Python自带的csv模块可以处理.csv文件。 2、xlrd和xlwt两个模块分别用来读Excel和写Excel,只支持.xls和.xlsx格式,xlutils模块可以同时读写一个已存在的Excel文件,依赖于xlrd和xlwt。 3、openpyxl(可
阅读全文
posted @ 2020-02-17 19:58
小白龙白龙马
摘要:from datetime import date, datetime import xlrd # 单元格类型: 0. empty(空的),1 string(text), 2 number, 3 date, 4 boolean, 5 error, 6 blank(空白表格) book = xlrd.
阅读全文
posted @ 2020-02-17 19:18
小白龙白龙马
摘要:pip install xlrd import xlrd book = xlrd.open_workbook("C:\\Users\\del\\Desktop\\Book2.xls") sheet_name = book.sheet_names()[0] #获取指定索引的sheet的名字 print
阅读全文
posted @ 2020-02-17 18:22
小白龙白龙马
摘要:pip install xlrd #j导入这个库 import xlrd book = xlrd.open_workbook("C:\\Users\\del\\Desktop\\Book1.xlsx") sheet_name = book.sheet_names()[0] #获取指定索引的sheet
阅读全文
posted @ 2020-02-17 18:20
小白龙白龙马
摘要:f = open('C:\\Users\\del\\Desktop\\新建文本文档 (4).txt','r')date = f.readlines() #读取所有行,得到一个列表print(date)print(date[0])print(date[1])print(date[2])print(da
阅读全文
posted @ 2020-02-17 16:41
小白龙白龙马
摘要:参考:https://www.cnblogs.com/xiaobaibailongma/p/12218933.html 参考:https://blog.csdn.net/u011541946/article/details/74359517 参考:https://blog.csdn.net/linx
阅读全文
posted @ 2020-02-16 21:35
小白龙白龙马
摘要:from selenium import webdriver driver = webdriver.Firefox() # 指定浏览器驱动 #对象实例化 url1='https://www.baidu.com' #需要打开的网址 driver.get(url1) #driver.get("https
阅读全文
posted @ 2020-02-16 20:36
小白龙白龙马
摘要:import time import os # picture_time = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime(time.time())) print(picture_time) # 2020-02-15-19-18-38 # pic
阅读全文
posted @ 2020-02-15 19:48
小白龙白龙马
摘要:import time import os # picture_time = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime(time.time())) print(picture_time) # 2020-02-15-19-18-38 # pic
阅读全文
posted @ 2020-02-15 19:39
小白龙白龙马
摘要:import time picture_time = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime(time.time())) print(picture_time) # 2020-02-15-19-18-38 # picture_time2 =
阅读全文
posted @ 2020-02-15 19:29
小白龙白龙马
摘要:from selenium import webdriver driver.current_window_handle #获取当前窗口句柄 driver.window_handles # 用于获取所有窗口句柄 suoyou = driver.window_handles # 用于获取所有窗口句柄dr
阅读全文
posted @ 2020-02-15 19:13
小白龙白龙马
摘要:from selenium import webdriver driver = webdriver.Firefox() # 指定浏览器驱动 #对象实例化 url1='https://www.baidu.com' #需要打开的网址driver.get(url1) #driver.get("https:
阅读全文
posted @ 2020-02-15 19:02
小白龙白龙马

浙公网安备 33010602011771号