05 2020 档案

摘要:# 二分法查找模板 def bin_search(nums, val): if len(nums) == 0: return -1 left = 0 right = len(nums) - 1 # 当left 和right相邻 或者left等于right的时候停止循环 while left + 1 阅读全文
posted @ 2020-05-19 20:01 ilovetesting 阅读(259) 评论(0) 推荐(0) 编辑
摘要:# 判断一个字符串中的有效括号()[]{}是否有效 def is_invalid(s): stack = [] for i in s: # 遇到左括号,则添加到堆栈中 if i == '(' or i == '[' or i == '{': stack.append(i) else: # 遇到右括号 阅读全文
posted @ 2020-05-19 13:03 ilovetesting 阅读(199) 评论(0) 推荐(0) 编辑
摘要:# 通过标签的id属性定位, 如 <div id='id'>xxxx<div/> driver.find_element_by_id('id') # 通过标签的name属性定位,如 <div name='name'>xxxx<div/> driver.find_element_by_name('na 阅读全文
posted @ 2020-05-16 21:06 ilovetesting 阅读(537) 评论(0) 推荐(0) 编辑
摘要:1. pc端安装chrome浏览器 2.安装adb扩展 3.pc端通过adb能识别出手机 4.使用adb扩展, 点击View inspection Targets进入chrome://inspect/#devices 5. 点击inspect 点击后出现如下页面 阅读全文
posted @ 2020-05-15 21:37 ilovetesting 阅读(206) 评论(0) 推荐(0) 编辑
摘要:1、如何处理 android 权限弹窗 # 处理 android 权限弹窗 while True: for i in range(6): if '允许' in driver.page_source: driver.switch_to.alert.accept() time.sleep(1) brea 阅读全文
posted @ 2020-05-15 14:38 ilovetesting 阅读(302) 评论(0) 推荐(0) 编辑
摘要:1. 安装Node.js 2.使用npm安装appium,npm install -g appium 3. 安装appium client 端, pip install Appium-Python-Client ( python 版) 4. 命令行启动 appium https://www.cnbl 阅读全文
posted @ 2020-05-14 22:37 ilovetesting 阅读(113) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示