摘要: """ rename files """# --*-- encoding:utf-8 --*-- import os Number = 0newnames = [] def rnfiles(path=None): global Number filesname = os.listdir(path) 阅读全文
posted @ 2016-11-28 17:15 sukekes 阅读(432) 评论(0) 推荐(0) 编辑
摘要: 最近在用appium做自动化时发现,有一些元素无法通过uiautomatorviewer进行定位,这样就只能通过相对坐标来进行定位了。但是,问题又来了:如何获取元素的坐标呢? 在网上找了半天也没找到相应的解决方法,后来在testerhome一篇文章中看到打开手机指针位置来确定元素所在坐标。具体方法: 阅读全文
posted @ 2016-01-28 19:14 sukekes 阅读(7173) 评论(3) 推荐(0) 编辑
摘要: 在使用appium过程中遇到了执行一个用例时有多个不同的acitivity的情况,以下为app内部切换acitivity的方法:如果仅需要切换一次activity,可以通过设置desired_caps['appWaitActivity'] = 'xxxxxx'来实现。如果需要多次切换activity... 阅读全文
posted @ 2015-11-19 10:01 sukekes 阅读(7058) 评论(1) 推荐(0) 编辑
摘要: npm安装newman时系统提示需要安装.net framwork环境通过查询文档安装visual studio express:于是安装visual studio 2012 express.安装之后再次运行npm install -g newman,安装完成。注:安装所须其他环境在此就省略不提了。... 阅读全文
posted @ 2015-04-17 16:39 sukekes 阅读(675) 评论(0) 推荐(0) 编辑
摘要: pytesser使用 阅读全文
posted @ 2014-11-19 10:58 sukekes 阅读(928) 评论(0) 推荐(0) 编辑
摘要: 文件循环读取 阅读全文
posted @ 2014-11-18 14:45 sukekes 阅读(1539) 评论(2) 推荐(0) 编辑
摘要: 登录 对话框 阅读全文
posted @ 2014-11-13 09:21 sukekes 阅读(517) 评论(1) 推荐(0) 编辑
摘要: TypeError: 'str' does not support the buffer interface 阅读全文
posted @ 2014-10-10 10:49 sukekes 阅读(1828) 评论(0) 推荐(0) 编辑
摘要: Selenium Webdriver百度搜索设置,代码参照虫师selenium_webdriver(python)第一版中百度搜索框设置的代码#coding:utf-8from selenium import webdriverimport timedr=webdriver.Ie()dr.get("... 阅读全文
posted @ 2014-09-30 09:34 sukekes 阅读(893) 评论(0) 推荐(0) 编辑
摘要: from sys import argvinput(argv)#python自带的IDLE直接执行不能提供命令行参数script,first,second,third=argvprint("The script is called:",script)print("Your first variabl... 阅读全文
posted @ 2014-09-20 13:39 sukekes 阅读(1981) 评论(0) 推荐(0) 编辑