Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多设备如何分别使用 poco 控制 #11

Open
Moking1997 opened this issue Sep 17, 2020 · 3 comments
Open

多设备如何分别使用 poco 控制 #11

Moking1997 opened this issue Sep 17, 2020 · 3 comments

Comments

@Moking1997
Copy link

我在测试中,poco 只对一台设备起作用.
例如下面代码,每次只会对一台设备加快滑动操作,而且每一次手机都会弹出 安装 pocoservice 程序

# -*- encoding=utf8 -*-
__author__ = "to"

import logging
logger = logging.getLogger("airtest")
logger.setLevel(logging.ERROR)
from airtest.core.api import *
from airtest.cli.parser import cli_setup
from poco.drivers.android.uiautomation import AndroidUiautomationPoco
# script content
print("start...")

PWD = os.path.dirname(__file__)
PKG = "com.smile.gifmaker"

keyevent("HOME")
stop_app(PKG)
start_app(PKG)
sleep(6.0)
poco = AndroidUiautomationPoco(use_airtest_input=True, screenshot_each_action=False)
poco.swipe([0.5, 0.92], [0.5, 0.2], duration=(1))
poco("com.smile.gifmaker:id/right_btn").click()
@Moking1997
Copy link
Author

已解决

@Test-Jim
Copy link

怎么解决的

已解决

@namedlock
Copy link

已解决

大佬最好也分享一下怎么解决的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants