Appium移动端自动化测试之测试应用实战

贵有恒,何必三更起、五更眠、最无益,只怕一日曝、十日寒。这篇文章主要讲述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移动端自动化测试之测试应用实战

文章图片

【Appium移动端自动化测试之测试应用实战】 

    推荐阅读