摘要: Math类概述: 包含用于执行基本数字运算的方法, 成员方法: public static int abs(int a) public static double ceil(double a) public static double floor(double a) public static in 阅读全文
posted @ 2018-11-13 17:49 红豆· 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 正则分割功能: public String【】 split(string str) 替换功能: public String replaceAll(String regex, String replacement) 正则表达式的分组功能: 阅读全文
posted @ 2018-11-13 10:26 红豆· 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 为什么会有基本类型包装类 将基本数据类型封装成对象的好处在于可以在对象中定义更多的功能方法操作该数据。 常用操作: 1.用于基本数据类型与字符串之间的转换 基本类型和包装类的对应: byte Byte short Short int Integer long Long float Float dou 阅读全文
posted @ 2018-11-12 22:14 红豆· 阅读(2094) 评论(0) 推荐(0) 编辑
摘要: Array类概述: 针对数组排序进行操作的工具类 提供了排序,查找等功能 成员方法: public static String toString(int 【】 a) 数组转字符串 public static void sort(int 【】a) 数组排序 public static int bina 阅读全文
posted @ 2018-11-12 21:19 红豆· 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 冒泡排序: 选择排序: 二分查找:前提数组有序 阅读全文
posted @ 2018-11-12 20:55 红豆· 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 一起运行: 添加测试用例运作: 多个py包,py文件用例运行: 阅读全文
posted @ 2018-11-11 15:18 红豆· 阅读(161) 评论(0) 推荐(0) 编辑
摘要: from appium import webdriverdesired_caps = {} desired_caps['platformName'] = 'Android' 测试的手机操作系统desired_caps['platformVersion'] = '5.1.1' 手机操作系统版本desi 阅读全文
posted @ 2018-11-11 13:40 红豆· 阅读(881) 评论(0) 推荐(0) 编辑
摘要: 1.查询 import pymysql conn = pymysql.connect(host='127.0.0.1', user='root', passwd='root', db='test') cur = conn.cursor() 查询 sql = "select * from info" 阅读全文
posted @ 2018-11-09 13:48 红豆· 阅读(152) 评论(0) 推荐(0) 编辑
摘要: xlrd模块:只能读xls文件 data = xlrd.open_workbook('excelFile.xls') 打开excel文件 获取表 r_sheet = data.sheet_names() 获取所有的表名 table = data.sheets()[0] 通过索引获取表 table = 阅读全文
posted @ 2018-11-09 11:25 红豆· 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 在Python中,通常有这几种方式来表示时间:1)时间戳 2)格式化的时间字符串 3)元组(struct_time)共九个元素。 1)time.localtime([secs]):将一个时间戳转换为当前时区的struct_time。secs参数未提供,则以当前时间为准。 2)time.gmtime( 阅读全文
posted @ 2018-11-08 22:03 红豆· 阅读(193) 评论(0) 推荐(0) 编辑