Appium Quick Reference

资源服务器

仅课堂上 http://192.168.31.53:8000/

网易云音乐

DesiredCapabilities

{
  "platformName": "Android",
  "deviceName": "whatever",
  "appPackage": "com.netease.cloudmusic",
  "appActivity": ".activity.LoadingActivity",
  "noReset": true,
  "unicodeKeyboard": true,
  "resetKeyboard": true
}

设置session的等待新命令的超时时间

driver.implicitly_wait(5000)

参考资料

多种选择控件方法

通过uiautomator原生的查找方法定位

self.driver.find_element_by_android_uiautomator('new UiSelector().text("Animation")')

单元测试

# coding: utf-8
#

import unittest


class AppTest(unittest.TestCase):
    def setUp(self):
        print("Prepare")
    
    def tearDown(self):
        print("CleanUP")
    
    def test_a(self):
        print("test a")
    
    def test_b(self):
        print("test b")


if __name__ == '__main__':
    unittest.main()
关闭