随笔分类 - 自动化测试-python
python自动化测试
【adb】执行adb devices 设备offline
摘要:解决办法: 1.执行adb kill-server,在执行adb devices 2.重启手机
阅读全文
【pycharm】pycharm修改文件名快捷键
摘要:shift+F6 修改文件名
阅读全文
【python-时间戳】时间与时间戳之间的转换
摘要:对于时间数据,如2016-05-05 20:28:54,有时需要与时间戳进行相互的运算,此时就需要对两种形式进行转换,在Python中,转换时需要用到time模块,具体的操作有如下的几种: 将时间转换为时间戳 重新格式化时间 时间戳转换为时间 获取当前时间及将其转换成时间戳 1、将时间转换成时间戳
阅读全文
【python-appium】模拟手机按键搜索异常
摘要:执行代码的过程中运行self.driver.press_keycode(84)设备没反映,则需要关闭#desired_caps["unicodeKeyboard"] = "True"输入法, 若self.driver.press_keycode(84)还是没反映就用,self.driver.pres
阅读全文
【python-appium】appium 关键字
摘要:Appium 服务关键字 Android特有 iOS特有
阅读全文
【python-appium】Appium的一些坑问题错误解决 与 技巧集锦
摘要:问题 1. error: Failed to start an Appium session, err was: Error: Requested a new session but one was in progress 之前的会话没有关闭,然后你又运行了测试实例,也没有设置覆盖. 解决: 1.
阅读全文
【python-appium】手机一直提示重新安装settings unlock 输入法等 注释掉以下代码
摘要:注释掉目录:C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\android.js this.initUnicode.bind(this)这句话会影响手机键盘的弹出 是否注释掉根据情况来定
阅读全文
【jenkins git】Failed to connect to repository:Error performing command:git.exe ls-remote-h
摘要:Failed to connect to repository:Error performing command:git.exe ls-remote-h
阅读全文
【pycharm 密钥】pycharm 2017 密钥
摘要:pycharm 2017 密钥
阅读全文
【jenkins 忘记密码】忘记Jenkins管理员密码的解决办法
摘要:一、admin密码未更改情况 1.进入\Jenkins\secrets目录,打开initialAdminPassword文件,复制密码; 2.访问Jenkins页面,输入管理员admin,及刚才的密码; 3.进入后可更改其他管理员密码; 二、admin密码更改忘记情况 1.删除Jenkins目录下c
阅读全文
【git 报错】Could not read from remote repository.Please make sure you have the correct access rights.
摘要:Could not read from remote repository.Please make sure you have the correct access rights.
阅读全文
【pycharm 警告】unittest RuntimeWarning: Parent module ” not found while handling absolute import
摘要:Pycharm 2016.2执行单元测试遇到如下问题: RuntimeWarning: Parent module ‘YOUR_MODULE_HERE’ not found while handling absolute import import unittest 解决方法,使用旧的utrunne
阅读全文
【python-strip】Python strip()方法
摘要:Python strip()方法
阅读全文
【python-HTMLTestRunner】生成HTMLTestRunner报告报错ERROR 'ascii' codec can't decode byte 0xe5 in position 0: ordinal not in range(128)
摘要:ERROR 'ascii' codec can't decode byte 0xe5 in position 0: ordinal not in range(128)
阅读全文
【python-HTMLTestRunner】HTMLTestRunner测试报告中文乱码问题解决
摘要:打开HTMLTestRunner。改动如图所示行 改成‘utf-8’
阅读全文
【python-ini】python读写ini文件
摘要:【python-ini】python读写ini文件 本文实例讲述了Python读写ini文件的方法。分享给大家供大家参考。具体如下: 比如有一个文件update.ini,里面有这些内容: 1 2 3 4 5 6 7 8 [ZIP] EngineVersion=0 DATVersion=5127 Fi
阅读全文
【python-字典】判断python字典中key是否存在的
摘要:一般有两种通用做法: 第一种方法:使用自带函数实现: 在python的字典的属性方法里面有一个has_key()方法: [python] view plain copy #生成一个字典 d = {'name':Tom, 'age':10, 'Tel':110} #打印返回值 print d.has_
阅读全文
【python 字典、json】python字典和Json的相互转换
摘要:【python 字典、json】python字典和Json的相互转换 dump/dumps字典转换成json load/loadsjson转化成字典 dumps、loads直接输出字符 dump、load需要输出到具体的文本中 ####################################
阅读全文
【python3+request】python3+requests接口自动化测试框架实例详解教程
摘要:转自:https://my.oschina.net/u/3041656/blog/820023 【python3+request】python3+requests接口自动化测试框架实例详解教程 前段时间由于公司测试方向的转型,由原来的web页面功能测试转变成接口测试,之前大多都是手工进行,利用pos
阅读全文
【python-crypto】导入crypto包失败的情况,怎么处理
摘要:【python-crypto】导入crypto包失败的情况,怎么处理 是因为你自己安装的python的版本太高,所以自己降版本吧,捣鼓了一下午 pip install crypto pip install pycrypto 这俩包都安装吧,我降低了python的版本,然后安装这俩包之后就可以导入了
阅读全文