标签:intro highlight log 配置 div loading device content ack
一、安装sdk,配置环境变量,前提还要配置好jdk,安装完之后可以使用adb命令了,具体的安装可以看其他教程
adb connect 127.0.0.1:7555 #连接mumu模拟器,关联才可调用
安装后启动appium
那么如何获取当前的包名和AppActivity呢?
可以使用adb命令:
adb logcat | findstr START
如果使用Python脚本调用
import unittest from appium.webdriver import Remote as Android class DituTest(unittest.TestCase): def setUp(self): self.cap = { "platformName": "Android", "deviceName": "127.0.0.1:7555", # 当前设备端口号 "appPackage": "com.taotao.androidmydemo", "appActivity": ".activities.MainActivity", "noSign": "true", "noRest": "true" } self.phone_driver = Android("127.0.0.1:4723/wd/hub", self.cap) def test_agree_click(self): self.phone_driver.implicitly_wait(20) self.phone_driver.find_element_by_id(‘com.taotao.androidmydemo:id/sub1‘).click() #self.phone_driver.find_element_by_accessibility_id(‘b_introduce‘) #对应的content-desc def tearDown(self): pass
标签:intro highlight log 配置 div loading device content ack
原文地址:https://www.cnblogs.com/wangxuetest/p/13285816.html