Appium运行脚本初始化数据

亦余心之所善兮,虽九死其犹未悔。这篇文章主要讲述Appium运行脚本初始化数据相关的知识,希望能为你提供帮助。

class MyTestCase(unittest.TestCase): def setUp(self): desired_caps = {} #以下是初始化数据 desired_caps[‘platformName‘] = ‘android‘ desired_caps[‘platformVersion‘] = ‘5.1‘ desired_caps[‘deviceName‘] = ‘Android Emulator‘ desired_caps[‘appPackage‘] = ‘com.android.calculator2‘ desired_caps[‘appActivity‘] = ‘.Calculator‘ desired_caps["unicodeKeyboard"] = "True" #设置输入发 desired_caps["resetKeyboard"] = "True" #恢复原来的输入法 self.driver = webdriver.Remote(‘http://localhost:4723/wd/hub‘, desired_caps)def test_something(self): passdef tearDown(self): self.driver.quit()if __name__ == ‘__main__‘: unittest.main()

【Appium运行脚本初始化数据】 

    推荐阅读