文章分类 -  appium

摘要:在 unittest 单元测试框架中,TestCase 类提供了一些方法来检查并报告故障,如下图 : 上面所提供的断言方法(assertRaises(), assertRaisesRegexp()除外)接收 msg 参数,如果指定,将体作为失败的错误信息。1 try:2 num = i... 阅读全文
posted @ 2015-05-18 18:01 Mr.Dantes 阅读(6186) 评论(0) 推荐(0)
摘要:如果你是固定读取的账号密码两个值,那么可以考虑用字典来实现。随机值不在本次参数化的讨论范畴之内。 创建字典用大括号,数据由 key/value 键值对组成,keys()方法返回字典中的键列表。values()返回字典中的值列表,items()返回(key,value)元组。下面创建一个存放字典... 阅读全文
posted @ 2015-05-18 17:22 Mr.Dantes 阅读(1730) 评论(0) 推荐(1)
摘要:1 source = open("D:\\appium\\testdata\\username.txt", "r") #用户名文件 2 un = source.readlines() #读取用户名 3 source.close() 4 5 ... 阅读全文
posted @ 2015-05-18 16:44 Mr.Dantes 阅读(1526) 评论(0) 推荐(0)
摘要:1 #appium的错误截图跟webdriver大同小异~2 #捕捉百度输入框异常3 try:4 driver.find_element_by_id("kwsss").send_keys("selenium")5 driver.find_element_by_id("su1").cl... 阅读全文
posted @ 2015-05-18 15:24 Mr.Dantes 阅读(1625) 评论(0) 推荐(1)
摘要:1 #三种appium设置等待时间的方法 2 #作者:Mr.Dantes QQ:79523822 3 4 #第一种 sleep(): 设置固定休眠时间。 python 的 time 包提供了休眠方法 sleep() , 导入 time包后就可以使用 sleep()进行脚本的执行过程进行休眠。 5... 阅读全文
posted @ 2015-05-18 13:56 Mr.Dantes 阅读(4388) 评论(1) 推荐(0)
摘要:http://www.51testing.com/html/04/n-1025404.html 阅读全文
posted @ 2015-05-15 15:25 Mr.Dantes 阅读(794) 评论(0) 推荐(2)
摘要:1 class MobileCommand(object): 2 CONTEXTS = 'getContexts', 3 GET_CURRENT_CONTEXT = 'getCurrentContext', 4 SWITCH_TO_CONTEXT = 'switchToCo... 阅读全文
posted @ 2015-05-08 22:04 Mr.Dantes 阅读(553) 评论(0) 推荐(0)
摘要:1 def find_element_by_ios_uiautomation(self, uia_string): 2 """Finds an element by uiautomation in iOS. 3 4 :Args: 5 - uia_... 阅读全文
posted @ 2015-05-08 22:03 Mr.Dantes 阅读(868) 评论(0) 推荐(0)
摘要:1 from selenium.webdriver.remote.switch_to import SwitchTo 2 3 from .mobilecommand import MobileCommand 4 5 6 class MobileSwitchTo(SwitchTo): 7 ... 阅读全文
posted @ 2015-05-08 22:00 Mr.Dantes 阅读(981) 评论(0) 推荐(0)
摘要:1 #各位客官,虽然今天是周末,我还是奋斗到工作的第一线 2 #研究python-client,也就是api,哈哈,大家自己翻译吧,我把代码贴出来 3 @property 4 def contexts(self): 5 """ 6 Returns... 阅读全文
posted @ 2015-05-08 21:58 Mr.Dantes 阅读(2249) 评论(7) 推荐(1)
摘要:本人翻译,翻版必究,觉得好请点赞本人qq:79523822~Appium Windows的GUI如果你是新Appium然后请参阅入门指南关于这个项目的更多信息。Pre-req:所需要.NET Framework 4.5可再发行的库如何安装:从Appium.io下载最新版本。提取的ZIP文件。启动ap... 阅读全文
posted @ 2015-05-08 17:11 Mr.Dantes 阅读(1319) 评论(2) 推荐(0)
摘要:原文地址:http://blog.csdn.net/roenfun/article/details/44087997A Windows GUI for AppiumIf you are new to Appium then please see theGetting startedguide for... 阅读全文
posted @ 2015-05-08 16:59 Mr.Dantes 阅读(434) 评论(0) 推荐(0)
摘要:提问:appium怎么打开手机的功能菜单和后退键?回答:driver.execute_script('mobile: keyevent', :keycode => 4)附录 keycode:原文:http://testerhome.com/topics/799电话键KEYCODE_CALL 拨号键 ... 阅读全文
posted @ 2015-05-08 16:38 Mr.Dantes 阅读(6536) 评论(0) 推荐(0)
摘要:原文地址:http://blog.sina.com.cn/s/blog_68f262210102v536.html 阅读全文
posted @ 2015-05-08 16:10 Mr.Dantes 阅读(1154) 评论(0) 推荐(0)
摘要:desired_caps = {} desired_caps['platformName'] = 'Android' desired_caps['platformVersion'] = '4.3' desired_caps['deviceName'] = '... 阅读全文
posted @ 2015-05-08 15:32 Mr.Dantes 阅读(1349) 评论(0) 推荐(0)
摘要:在运行app的过程,如果我想一个个模块单独的运行并产生测试报告。那么该怎么做呢? 我可以把公共的部分,如登录功能放在setup()里面,那么每次运行你定义的一个个函数,都会调用这个setup()中的数据。 还是贴一下代码的思路 #coding=utf-8import osimport un... 阅读全文
posted @ 2015-05-08 14:11 Mr.Dantes 阅读(767) 评论(0) 推荐(1)
摘要:http://www.tuicool.com/articles/YvAJ7vhttp://testerhome.com/topics/167 阅读全文
posted @ 2015-05-06 16:21 Mr.Dantes 阅读(592) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/zhubaitian/article/details/39754041 阅读全文
posted @ 2015-05-06 16:20 Mr.Dantes 阅读(428) 评论(0) 推荐(0)
摘要:#你也想跟webdriver一样搞出逼格高的测试报告么,appium一样也可以~不说废话了,请看,仔细学习~#coding=utf-8import osimport unittest,sys,time,re,datetime,HTMLTestRunnerfrom appium import webd... 阅读全文
posted @ 2015-05-06 15:09 Mr.Dantes 阅读(2651) 评论(1) 推荐(1)
摘要:在下午搞appium的过程中,我发现有关乱码的报错如何解决这个问题:加上三行~import sysreload(sys)sys.setdefaultencoding('utf-8')#coding=utf-8import osimport unittest,sys,time,re,datetime,... 阅读全文
posted @ 2015-05-06 15:03 Mr.Dantes 阅读(1188) 评论(0) 推荐(0)