上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 22 下一页
摘要: 一、已登录页面 -->新建PO封装的包 -- 以下源码适用于python3以上的版本 代码优化新增 Image -->对操作步骤进行截图 二、basepage 包基础类的封装如下: from selenium.webdriver.support.wait import WebDriverWait # 阅读全文
posted @ 2019-10-21 21:51 Test挖掘者 阅读(1206) 评论(1) 推荐(0) 编辑
摘要: 一、新建数据Mail163.txt文本 二、Txt_Mail163.py脚本如下: 阅读全文
posted @ 2019-10-20 16:45 Test挖掘者 阅读(342) 评论(0) 推荐(0) 编辑
摘要: # i = 0# while (i < 9):# print("i > ",i)# i = i + 1# print(i,"i即将大于或者等于9,while不在执行")#执行1-100的数字# a1 = 1# while a1 <= 100:# print(a1,end=" ")# a1 = a1 阅读全文
posted @ 2019-10-20 16:02 Test挖掘者 阅读(2065) 评论(0) 推荐(0) 编辑
摘要: import pymysqlimport datetime#安装 pip install pymysql"""1、连接本地数据库2、建立游标3、创建表4、插入表数据、查询表数据、更新表数据、删除表数据"""#连接本地数据库db = pymysql.connect( host = "localhost 阅读全文
posted @ 2019-10-20 16:01 Test挖掘者 阅读(675) 评论(0) 推荐(0) 编辑
摘要: #函数应用# 1.语法"""def 函数名(参数): 函数体"""# 2. 没有参数的函数# def readbook():# print("拿起一本书")# print("看书")# print("关闭")# readbook()# 3. 有参数的函数# def readbook(name,sta 阅读全文
posted @ 2019-10-20 15:59 Test挖掘者 阅读(487) 评论(0) 推荐(0) 编辑
摘要: # os模块 目录相关内置库import os# . 当前目录 .. 返回上一级目录# 1. os.path.abspath() --获取当前文件的绝对路径(不包含os模块.py) pwd# path = os.path.abspath(".")# print(path) #D:\Test\Pyth 阅读全文
posted @ 2019-10-20 15:59 Test挖掘者 阅读(276) 评论(0) 推荐(0) 编辑
摘要: #列表推导式 > 返回的是列表 for语句 效率更高# 1*1 2*2 3*3 4*4 5*5 6*6 7*7 8*8 9*9# import time# to = time.clock() #时间戳# Li = []## for i in range(1,10):# Li.append(i)# # 阅读全文
posted @ 2019-10-20 15:58 Test挖掘者 阅读(620) 评论(0) 推荐(0) 编辑
摘要: #类(面向对象) PageObject设计模式 unittest 知识体系#函数式编程import datetimebook_info = { "title":"Python", "price":"33.1", "auther":"毛桃", "publisher":"北京大学", "pubdate" 阅读全文
posted @ 2019-10-20 15:57 Test挖掘者 阅读(215) 评论(0) 推荐(0) 编辑
摘要: # 多线程实例# 例1.单线程from time import sleep,ctimedef task1(taskName): for i in range(2): print("正在执行 %s %s"%(taskName,ctime())) sleep(2)def task2(taskName): 阅读全文
posted @ 2019-10-20 15:56 Test挖掘者 阅读(417) 评论(0) 推荐(0) 编辑
摘要: #文件名 txt文件的读取#文件的读取 open("文件","读写方法") with open("文件","读写方法") as 句柄:#创建文件或者写入内容到文件中# file = open("userinfo.txt","w",encoding="utf-8")# file.write("人生苦短 阅读全文
posted @ 2019-10-20 15:55 Test挖掘者 阅读(576) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 22 下一页