贵有恒,何必三更起、五更眠、最无益,只怕一日曝、十日寒。这篇文章主要讲述Appium移动端自动化测试之测试应用实战相关的知识,希望能为你提供帮助。
#coding=utf-8from appium import webdriver import time from appium.webdriver.support.ui import WebDriverWait import time from appium.webdriver.common.by import By from appium.webdriver.support import expected_conditions as EC import unittest from common.lianxi import *class Itest_Appium(unitTests.TestCase):def setUp(self): self.desired_caps = { \'platformName\': \'android\', \'platformVersion\': \'4.4.2\', \'deviceName\': \'127.0.0.1:62001\', \'appPackage\': \'iflytek.testTech.propertytool\', \'appActivity\': \'.activity.BootActivity\', # \'appWaitActivity\':\'.activity.HomeActivity\', \'unicodeKeyboard\': "True",#使用 Unicode 输入法 \'resetKeyboard\': "True"}#重置输入法到原有状态\'udid\':\'\'self.driver = webdriver.Remote(\'http://127.0.0.1:4723/wd/hub\', self.desired_caps) self.driver.wait_activity(\'.activity.HomeActivity\',20)# 等待app首页出现def tearDown(self): passdef test_addapp_jiankong(self): driver = self.driver delapp(driver) addapp(driver,\'appium_practice\',\'io.appium.android.ime\',\'io.appium.settings\') jiankong(driver,\'电量\',True) jiankong(driver,\'CPU\',True) closeapp(driver)if __name__ == \'__main__\': unitTests.main(verbosity=2)
文章图片
【Appium移动端自动化测试之测试应用实战】
推荐阅读
- springboot使用遇到问题(Class “model.Address” is listed in the persistence.xml file but not mapped)
- poj3321-Apple Tree(DFS序+树状数组)
- 497. Random Point in Non-overlapping Rectangles
- Error: Default interface methods are only supported starting with Android N (--min-api 24): java.io.
- 分享一下身边朋友自学android开发及找工作的那些事!不足勿喷
- 超实用教程,教你用墨刀做出小红书app原型
- WinXP内码输入法如何添加到Vista中
- WinXP如何按照笔划来排列文件名
- WinXP无法打开安全中心且提示不可用的处理办法