资源服务器
仅课堂上 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)
参考资料
-
ApiDemos.apk https://github.com/appium/java-client/raw/master/src/test/java/io/appium/java_client/ApiDemos-debug.apk
-
Python客户端:https://github.com/appium/python-client
-
官方提供的例子:https://github.com/appium/python-client/tree/master/test
-
配置元素查找的时间,都是js的文档
https://appium.readthedocs.io/en/latest/en/commands/session/timeouts/implicit-wait/
-
anyproxy文档 http://anyproxy.io/cn/
多种选择控件方法
通过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()