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

使用最新u2,弱网下操作设备1小时以上,会断开连接提示:[WinError 10054] 远程主机强迫关闭了一个现有的连接。 #1045

Open
zytwell opened this issue Oct 11, 2024 · 0 comments

Comments

@zytwell
Copy link

zytwell commented Oct 11, 2024

问题如标题,请协助如何解决?

  • 手机型号
    小米K40

  • uiautomator2的版本号(pip show uiautomator2)
    Name: uiautomator2
    Version: 3.2.5

  • 手机截图
    2024-10-10 23:44:21,530 31896 1628 MainThread myunit.py[line:26] INFO ==========setUp==========
    2024-10-10 23:44:32,252 31896 1628 MainThread basic.py[line:698] ERROR 查找 resourceId=com.hpplay.sdk.source.test:id/edit_url 元素失败![WinError 10054] 远程主机强迫关闭了一个现有的连接。
    2024-10-10 23:44:32,252 31896 1628 MainThread push_file.py[line:149] ERROR file push error:'bool' object has no attribute 'clear_text'
    2024-10-10 23:44:32,395 31896 1628 MainThread myunit.py[line:30] INFO ==========tearDown==========

  • 最好能附上可能复现问题的代码。
    try:
    element = self.device(resourceId=resource_id)
    if element.wait(timeout=wait):
    logging.info(f'点击含有 resourceId={resource_id} 元素成功')
    return element
    else:
    logging.warning(f'未找到含有 resourceId={resource_id}元素')
    return False
    except Exception as e:
    logging.error(f'查找 resourceId={resource_id} 元素失败!{e}')
    return False

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

1 participant