收藏
回答

minitest个人使用过程中的问题合集?

mi'nitest {'version': '1.4.3', 'revision': '441a30f6097b9e229f4bb7c20980bb47689a5d67', 'branch': 'master', 'update_at': '2023-07-06 10:49:59'}

微信开发者工具 1.06.2307260 调试基础库 2.33.0

启动开发者工具时卡死,一片空白,需要手动去点,才能正常打开小程序,一点也不自动化

page destroyed(1.4.2说修复了,但是我用的1.4.3还是经常出现)

时不时就会出现,明显是工具和框架的问题

File "D:\PythonProject\cyy_automate_test\fixtures\MyMiniumBase.py", line 156, in find_element

    return self.page.get_element(

  File "D:\PythonProject\ui_env\lib\site-packages\minium\miniprogram\base_driver\app.py", line 217, in wrapper

    return attr(*args, **kwargs)

  File "D:\PythonProject\ui_env\lib\site-packages\minium\miniprogram\base_driver\minium_log.py", line 172, in wrapper

    result = func(*args, **kwargs)

  File "D:\PythonProject\ui_env\lib\site-packages\minium\miniprogram\base_driver\page.py", line 277, in get_element

    r = self.get_elements(

  File "D:\PythonProject\ui_env\lib\site-packages\minium\miniprogram\base_driver\minium_log.py", line 172, in wrapper

    result = func(*args, **kwargs)

  File "D:\PythonProject\ui_env\lib\site-packages\minium\miniprogram\base_driver\page.py", line 398, in get_elements

    return filter_elements()

  File "D:\PythonProject\ui_env\lib\site-packages\minium\utils\utils.py", line 56, in wrapper

    r = func(*args, **kwargs)

  File "D:\PythonProject\ui_env\lib\site-packages\minium\miniprogram\base_driver\page.py", line 384, in filter_elements

    elements = self._get_elements_by_css(selector, max_timeout, index=-1)

  File "D:\PythonProject\ui_env\lib\site-packages\minium\miniprogram\base_driver\page.py", line 560, in _get_elements_by_css

    els = search_elements(_selector_list)

  File "D:\PythonProject\ui_env\lib\site-packages\minium\utils\utils.py", line 56, in wrapper

    r = func(*args, **kwargs)

  File "D:\PythonProject\ui_env\lib\site-packages\minium\miniprogram\base_driver\page.py", line 553, in search_elements

    return self.__search_child(

  File "D:\PythonProject\ui_env\lib\site-packages\minium\miniprogram\base_driver\page.py", line 517, in __search_child

    els = self.__get_elements(_selector)

  File "D:\PythonProject\ui_env\lib\site-packages\minium\utils\utils.py", line 82, in wrapper

    ret = func(*args, **kwargs)

  File "D:\PythonProject\ui_env\lib\site-packages\minium\miniprogram\base_driver\page.py", line 495, in __get_elements

    ret = self._send("Page.getElements", {"selector": selector})

  File "D:\PythonProject\ui_env\lib\site-packages\minium\miniprogram\base_driver\page.py", line 488, in _send

    self.connection.send(method, params)

  File "D:\PythonProject\ui_env\lib\site-packages\minium\miniprogram\base_driver\connection.py", line 447, in send

    return self._receive_response(cmd)

  File "D:\PythonProject\ui_env\lib\site-packages\minium\miniprogram\base_driver\connection.py", line 473, in _receive_response

    raise response

minium.framework.exception.PageDestroyed: page destroyed

找不到元素

时而找到时而找不到,超时报错,程序很不流畅


......还会继续更新

最后一次编辑于  2023-08-25
回答关注问题邀请回答
收藏

1 个回答

  • 云测服务
    云测服务
    2023-09-01
    1. 启动开发者工具时卡死,一片空白,需要手动去点: 启动的时候开发者工具需要在前台的。这种情况一般只有出现在小程序1分钟都还没有编译运行完成和把开发者工具置于后台才会出现的弹窗。
    2. PageDestroyed: page destroyed:这个处理是已经进行过重试了。该能力依赖一个页面完成回调通知。如果运行过程中小程序项目目录有文件变化导致小程序被重新刷新或手动刷新,都会把这个通知取消掉。导致没法正常使用
    3. 找不到元素最大可能就是,你页面没有加载好。你可以尝试使用wait_for_page和element_is_exists来判断页面加载状态或者元素加载状态


    2023-09-01
    有用
    回复
登录 后发表内容