appium 1.3.4 版本
机型为米 4,系统 4.4
如图 1 运行后手机出现确认浮层:
然后点击确定,浮层消失:
等于每次修改代码,都要手动的去点这两个确定(很郁闷啊,这还怎么叫自动化呢)
代码就是最普通:
import time
from appium import webdriver
import threading
desired_caps = {}
desired_caps["platformName"] = "Android"
desired_caps["platformVersion"] = "4.4.4"
desired_caps["deviceName"] = "123"
desired_caps["udid"] = "d2732a11"
desired_caps["appPackage"] = "com.tencent.videopioneer"
desired_caps["appActivity"] = ".ona.activity.HomeActivity"
desired_caps["unicodeKeyboard"] = "True"
desired_caps["resetKeyboard"] = "True"
driver = webdriver.Remote(r"http://localhost:4723/wd/hub",desired_caps)
#这下面的应该更没有关系了,是进入app后的操作
if driver.current_activity == ".ona.activity.LoginActivity2":
time.sleep(3)
driver.find_element_by_id("com.tencent.videopioneer:id/qqView").click()
if driver.current_activity == "com.tencent.open.agent.QuickLoginAuthorityActivity":
time.sleep(10)
driver.find_element_by_name("登录").click()
time.sleep(3)
求大神们帮忙救助一下,看下是我哪里写错了吗