AirtestProject / AirtestProject/Poco

请先帮忙看下我截图中poco的用法对吗,为什么这样用在第二次进行登录的时候输入不了密码

未关闭
#97 4 条评论 0 个 reaction 已指派 1 人 已被 @adolli 认领 在 GitHub 查看
主要语言
Python
星标
2k
派生
341
PR 合并指标
30 天内没有已合并 PR

描述

```py
# -*- encoding=utf8 -*-
__author__ = "lenovo"

import random
from airtest.core.api import *
from poco.drivers.android.uiautomation import AndroidUiautomationPoco
poco = AndroidUiautomationPoco(use_airtest_input=True, screenshot_each_action=True)

login=poco("com.test.parentsmeeting.debug:id/tv_splash_login")
pwd=poco("com.test.parentsmeeting.debug:id/et_login_type_pwd_number")
login_confirm=poco("com.test.parentsmeeting.debug:id/btn_login_verify_enter")
def start_app():
# connect_device(
# "Android://127.0.0.1:5037/HC47EWY05363?cap_method=javacap&touch_method=adb")

#dev.start_recording();
wake() # 唤醒手机屏幕
# start_app('com.test.parentsmeeting.debug','com.test.parentsmeeting.module.home.SplashActivity')
# 进入LaunchActivity 这样每次启动app就是进入到登录页面了方便流程控制
shell(
"am start -n com.test.parentsmeeting.debug/com.test.parentsmeeting.module.home.SplashActivity")
login.click()
sleep(3)
pwd.set_text("")
pwd.set_text("15088888888") #第二次循环运行到这里的时候输入不了密码
login_confirm.click()
sleep(10)
auto_setup(__file__)
connect_device("Android://127.0.0.1:5037/4496f28c?cap_method=javacap&touch_method=adb")
for i in range(2):
start_app()
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。