会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
jasonchenYT
见贤思齐焉,见不贤而内自省也~
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
下一页
2021年7月3日
binarySearch 二分法算法
摘要: # 二分法算法def binary_search(arr, num): if len(arr)==0: print('该值不存在') return False mid = int(len(arr)/2) print(mid) if arr[mid] > num: arr = arr[:mid-1]
阅读全文
posted @ 2021-07-03 01:12 jasonchenYT
阅读(49)
评论(0)
推荐(0)
2021年6月21日
【python】赋值引用、浅拷贝、深拷贝的使用
摘要: 【个人理解】 赋值后的变量还是指向相同的内存地址,也不算叫变量,相当于原有列表的别名或标签名。 浅拷贝:浅拷贝只会拷贝原列表最外层(父层),且套的列表指向的内存地址还是和原列表一致。原来的列表操作父层没有关系,操作子层会和原列表一致。 深拷贝:深拷贝会把父层子层都重新有新的内存地址,原来的列表操作和
阅读全文
posted @ 2021-06-21 15:30 jasonchenYT
阅读(57)
评论(0)
推荐(0)
2021年6月1日
MD5加密的接口测试【hashlib+requests】
摘要: 【测试环境】 hashlib 内置库 requsts 2.25.1 # pip install requests python 3.9.5 【代码实现】 import requestsimport hashlibimport jsonpath class ActionInterfaceTest(ob
阅读全文
posted @ 2021-06-01 16:31 jasonchenYT
阅读(109)
评论(0)
推荐(0)
2021年5月28日
读取.robot文件写入excel文件中示例
摘要: 【环境】 xlwt :1.3 python:3.9.5 【代码示例】 import osimport reimport xlwtdef robot_file_xls_utils(): current_path = os.path.dirname(__file__) file_path = os.pa
阅读全文
posted @ 2021-05-28 19:32 jasonchenYT
阅读(181)
评论(0)
推荐(0)
2020年12月15日
提示框、滚动条处理与JS的应用
摘要: # 提示框的处理import timefrom selenium import webdriverdriver = webdriver.Chrome()driver.get('https://www.baidu.com')driver.maximize_window()driver.implicit
阅读全文
posted @ 2020-12-15 01:24 jasonchenYT
阅读(160)
评论(0)
推荐(0)
2020年12月14日
下拉框
摘要: import timefrom selenium import webdriverfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.support.select import Selectdriver = webdr
阅读全文
posted @ 2020-12-14 01:03 jasonchenYT
阅读(25)
评论(0)
推荐(0)
切换框架ifame
摘要: # ifame 框架切换# 知识点:切换框架 driver.switch_to.frame(id & name),返回默认框架:driver.switch_to.default_content()# 熟悉使用By来定位元素 CSS_SELECTOR和XPATHimport timefrom sele
阅读全文
posted @ 2020-12-14 01:02 jasonchenYT
阅读(90)
评论(0)
推荐(0)
层级定位
摘要: # 层级定位import timefrom selenium.webdriver.common.by import Byfrom selenium.webdriver.common.action_chains import ActionChainsfrom selenium import webdr
阅读全文
posted @ 2020-12-14 01:00 jasonchenYT
阅读(62)
评论(0)
推荐(0)
定位一组元素
摘要: import timefrom selenium.webdriver.common.by import Byfrom selenium.webdriver.common.action_chains import ActionChainsfrom selenium import webdriverdr
阅读全文
posted @ 2020-12-14 00:58 jasonchenYT
阅读(50)
评论(0)
推荐(0)
等待时间
摘要: # 1 sleep():固定休眠时间设置,python的time包里提供了休眠方法sleep,# 导入包time后就能使用;# sleep()方法以秒为单位,如果超时设置小于1秒,可以使用小数import timefrom selenium.webdriver.common.by import By
阅读全文
posted @ 2020-12-14 00:56 jasonchenYT
阅读(59)
评论(0)
推荐(0)
上一页
1
2
3
4
下一页
公告