推荐
  • 全部
  • 文章
  • 问答

  • 【minium】app.evaluate方法执行js代码报错应该怎么解决?

    js = """ var ctx = document.getElementsByClassName(arguments[0]).getContext('2d'); ctx.font = '70px Arial'; ctx.fillText(arguments[1], 10, 50); """ canvas = {'selector': 'view.firstCanvas>canvas'} self.app.evaluate(app_function=js, args=[canvas['selector'], text], sync=True) 如果直接传递元素会报json序列化错误, TypeError: Object of type BaseElement is not JSON serializable 如果传元素定位会报unexcepted token var; [E 2024-07-16 14:39:45 minium.Conn6672 connection#661 __on_message] [15f69751-1cc7-47c3-b89a-fe398f822552]: Unexpected token 'var' 业务场景,需要在canvas签署中文汉字,想要通过ctx实现绘制;

  • 云测执行录制回放用例超时,总是超时,可能有哪些原因?超时的用例为何还会消费时长?

    [图片]

  • miniprogram-ci preview/upload 上传 报 10009 错误 ?

    [图片][图片]

  • minium运行用例定位元素或者跳转页面的时候,总出现page destoryed,然后重定向页面?

    [图片]

  • minium自带的测试报告多次打开后显示该网页无法正常运作?

    [图片][图片] 为了方便每次测试完自动打开报告,但是发现打开次数多了之后会进行报错,是因为我什么操作没对呢?

  • 【minium】1. 报告里无运行日志 2. 多账号为什么时而好使时而不好使?

    版本:1.5.5 suite.json { "pkg_list": [ { "case_list": [ "*" ], "pkg": "cases.wx.weapp_u_sopei_project.*" } ] } config.json [ { "project_path": "D:\\Project\\sopei-other\\weapp_u_sopei_cn", "dev_tool_path": "D:\\Software\\微信web开发者工具\\cli.bat", "debug_mode": "info", "outputs": ".\\output\\wx_u_report\\report_data", "platform": "ide", "app": "wx", "debug": true, "close_ide": false, "full_reset": true, "test_port": 9422, "assert_capture": true, "auto_relaunch": true, "auto_authorize": true, "enable_app_log": false, "use_push": false, "account_info": { "openid": "xxx", "nickName": "xxx" } }, { "project_path": "D:\\Project\\sopei-other\\weapp_u_sopei_cn", "dev_tool_path": "D:\\Software\\微信web开发者工具\\cli.bat", "debug_mode": "info", "outputs": ".\\output\\wx_u_report\\report_data", "platform": "ide", "app": "wx", "debug": true, "close_ide": false, "full_reset": true, "test_port": 9423, "assert_capture": true, "auto_relaunch": true, "auto_authorize": true, "enable_app_log": false, "use_push": false, "account_info": { "openid": "xxx", "nickName": "xxx" } } ] 1. 报告里无运行日志 loader下是有日志的 [图片] [图片] 2. 多账号运行模式下为什么还是串行跑case? 假设我跑两个case,然后配置了多个账户,但是跑case时依旧是一个一个跑 【第二个问题解决了】 3. 多账号运行为啥在parallel模式下不好使呢?我希望几个账户分批运行case,但是parallel模式运行的效果是串行,而不加--mode parallel是所有账号同时跑一个case??? 【这个问题也解决了,文档中说每个账号从队列中取一个pkg运行,是指从pkg_list下选一个,所以我每个case都得单独写在一个文件里???】 { "pkg_list": [ { "case_list": [ "*" ], "pkg": "cases.wx.weapp_u_sopei_project.test_adapt_data_project" }, { "case_list": [ "*" ], "pkg": "cases.wx.weapp_u_sopei_project.test_adapt_data_project2" }, { "case_list": [ "*" ], "pkg": "cases.wx.weapp_u_sopei_project.test_adapt_data_project3" } ] } 4.多账户为什么时而好使时而不好使???明明日志都打出来了 ==========Scan Cases from suite=========== └─ cases.wx.weapp_u_sopei_project.test_adapt_data_project │ ├─ TestDataAssert.test_weapp_u_adapt_lsc1 └─ cases.wx.weapp_u_sopei_project.test_adapt_data_project2 │ ├─ TestDataAssert2.test_weapp_u_adapt_lsc2 └─ cases.wx.weapp_u_sopei_project.test_adapt_data_project3 │ ├─ TestDataAssert3.test_weapp_u_adapt_lsc3 [I 2024-07-02 10:22:14 minium loader#646 main] load 3 cases [I 2024-07-02 10:22:14 minium loader#647 main] import package 【cases.wx.weapp_u_sopei_project.test_adapt_data_project2,cases.wx.weapp_u_sopei_project.test_adapt_data_project3,cases.wx.weapp_u_sopei_project.test_adapt_data_project】 success, import package 【】 fail 2024-07-02 10:22:14 "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\framework\loader.py:659" -main-[print]- after load config/wx_u_sopei_project/suite.json 2024-07-02 10:22:14 "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\framework\loader.py:660" -main-[print]- g_case_list size: 3 2024-07-02 10:22:14 "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\framework\loader.py:662" -main-[print]- test_weapp_u_adapt_lsc1 (cases.wx.weapp_u_sopei_project.test_adapt_data_project.TestDataAssert) 2024-07-02 10:22:14 "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\framework\loader.py:662" -main-[print]- test_weapp_u_adapt_lsc2 (cases.wx.weapp_u_sopei_project.test_adapt_data_project2.TestDataAssert2) 2024-07-02 10:22:14 "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\framework\loader.py:662" -main-[print]- test_weapp_u_adapt_lsc3 (cases.wx.weapp_u_sopei_project.test_adapt_data_project3.TestDataAssert3) 2024-07-02 10:22:14 "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\framework\loader.py:673" -main-[print]- {'version': '1.5.5', 'revision': 'dcf6f3345021813b36f0d1b3002746ebf0ec334b', 'branch': 'master', 'update_at': '2024-06-04 11:56:11'} [I 2024-07-02 10:22:14 minium loader#299 run_session] start session with parallel mode {'debug': True, 'base_dir': 'D:\\Project\\sopei-other\\other\\TestAutomation\\config\\wx_u_sopei_project', 'platform': 'ide', 'app': 'wx', 'debug_mode': 'info', 'close_ide': False, 'auto_capture': 'auto', 'check_mp_foreground': True, 'auto_relaunch': True, 'device_desire': {}, 'account_info': {'openid': 'o6zAJsz5tL2WOSML-li4x4OT_oRg', 'nickName': '17167851889'}, 'report_usage': True, 'remote_connect_timeout': 180, 'request_timeout': 60, 'use_push': False, 'full_reset': False, 'outputs': '.\\output\\wx_u_report\\report_data', 'enable_app_log': False, 'enable_network_panel': False, 'project_path': 'D:\\Project\\sopei-other\\weapp_u_sopei_cn', 'dev_tool_path': 'D:\\Software\\微信web开发者工具\\cli.bat', 'test_port': 9421, 'mock_native_modal': {}, 'mock_request': [], 'auto_authorize': True, 'audits': None, 'teardown_snapshot': False, 'mock_images_dir': '', 'mock_images': {}, 'need_perf': False, 'appid': None, 'enable_h5': True, 'assert_capture': True, 'framework_capture': True, 'error_capture': False, 'create_time': '20240702102214'} [I 2024-07-02 10:22:14 minium loader#299 run_session] start session with parallel mode {'debug': True, 'base_dir': 'D:\\Project\\sopei-other\\other\\TestAutomation\\config\\wx_u_sopei_project', 'platform': 'ide', 'app': 'wx', 'debug_mode': 'info', 'close_ide': False, 'auto_capture': 'auto', 'check_mp_foreground': True, 'auto_relaunch': True, 'device_desire': {}, 'account_info': {'openid': 'o6zAJs3IX0J0FkkGbyVPdIO-qJfI', 'nickName': '17167851887'}, 'report_usage': True, 'remote_connect_timeout': 180, 'request_timeout': 60, 'use_push': False, 'full_reset': False, 'outputs': '.\\output\\wx_u_report\\report_data', 'enable_app_log': False, 'enable_network_panel': False, 'project_path': 'D:\\Project\\sopei-other\\weapp_u_sopei_cn', 'dev_tool_path': 'D:\\Software\\微信web开发者工具\\cli.bat', 'test_port': 9422, 'mock_native_modal': {}, 'mock_request': [], 'auto_authorize': True, 'audits': None, 'teardown_snapshot': False, 'mock_images_dir': '', 'mock_images': {}, 'need_perf': False, 'appid': None, 'enable_h5': True, 'assert_capture': True, 'framework_capture': True, 'error_capture': False} [I 2024-07-02 10:22:15 minium minitest#200 init_miniprogram] start init miniprogram [I 2024-07-02 10:22:15 minium basenative#59 wrapper] call IdeNative.start_wechat [I 2024-07-02 10:22:15 minium basenative#63 wrapper] call IdeNative.start_wechat end None [I 2024-07-02 10:22:15 minium wx_minium#680 launch_dev_tool] Starting dev tool and launch MiniProgram project ... [I 2024-07-02 10:22:15 minium minium_object#83 _do_shell] de shell: cli.bat auto --project "D:\Project\sopei-other\weapp_u_sopei_cn" --auto-port 9421 [I 2024-07-02 10:22:16 minium minitest#200 init_miniprogram] start init miniprogram [I 2024-07-02 10:22:16 minium basenative#59 wrapper] call IdeNative.start_wechat [I 2024-07-02 10:22:16 minium basenative#63 wrapper] call IdeNative.start_wechat end None [I 2024-07-02 10:22:16 minium wx_minium#680 launch_dev_tool] Starting dev tool and launch MiniProgram project ... [I 2024-07-02 10:22:16 minium minium_object#83 _do_shell] de shell: cli.bat auto --project "D:\Project\sopei-other\weapp_u_sopei_cn" --auto-port 9422 [I 2024-07-02 10:22:20 minium minium_object#101 _do_shell] err: - initialize × IDE may already started at port 64672, trying to connect × #initialize-error: wait IDE port timeout [I 2024-07-02 10:22:46 minium minium_object#102 _do_shell] out: [I 2024-07-02 10:22:56 minium wx_minium#777 connect_dev_tool] Trying to connect Dev tool ... [E 2024-07-02 10:23:00 minium.Conn4528 connection#632 _on_error] [WinError 10061] 由于目标计算机积极拒绝,无法连接。 [I 2024-07-02 10:23:00 minium.Conn4528 connection#367 _ws_run_forever] websocket run forever shutdown [E 2024-07-02 10:23:00 minium wx_minium#789 connect_dev_tool] [WinError 10061] 由于目标计算机积极拒绝,无法连接。 Traceback (most recent call last): File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\wx_minium.py", line 778, in connect_dev_tool self.connection = Connection.create( File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 169, in create instance = cls(uri, *args, **kwargs) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 209, in __init__ self._connect() File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 351, in _connect raise error_callback.result File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_app.py", line 327, in run_forever self.sock.connect( File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_core.py", line 244, in connect self.sock, addrs = connect(url, self.sock_opt, proxy_info(**options), File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 130, in connect sock = _open_socket(addrinfo_list, options.sockopt, options.timeout) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 205, in _open_socket raise err File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 185, in _open_socket sock.connect(address) ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 [I 2024-07-02 10:23:00 minium wx_minium#777 connect_dev_tool] Trying to connect Dev tool ... [E 2024-07-02 10:23:05 minium.Conn6976 connection#632 _on_error] [WinError 10061] 由于目标计算机积极拒绝,无法连接。 [I 2024-07-02 10:23:05 minium.Conn6976 connection#367 _ws_run_forever] websocket run forever shutdown [E 2024-07-02 10:23:05 minium wx_minium#789 connect_dev_tool] [WinError 10061] 由于目标计算机积极拒绝,无法连接。 Traceback (most recent call last): File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\wx_minium.py", line 778, in connect_dev_tool self.connection = Connection.create( File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 169, in create instance = cls(uri, *args, **kwargs) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 209, in __init__ self._connect() File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 351, in _connect raise error_callback.result File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_app.py", line 327, in run_forever self.sock.connect( File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_core.py", line 244, in connect self.sock, addrs = connect(url, self.sock_opt, proxy_info(**options), File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 130, in connect sock = _open_socket(addrinfo_list, options.sockopt, options.timeout) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 205, in _open_socket raise err File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 185, in _open_socket sock.connect(address) ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 [I 2024-07-02 10:23:05 minium wx_minium#777 connect_dev_tool] Trying to connect Dev tool ... [E 2024-07-02 10:23:09 minium.Conn8512 connection#632 _on_error] [WinError 10061] 由于目标计算机积极拒绝,无法连接。 [I 2024-07-02 10:23:09 minium.Conn8512 connection#367 _ws_run_forever] websocket run forever shutdown [E 2024-07-02 10:23:09 minium wx_minium#789 connect_dev_tool] [WinError 10061] 由于目标计算机积极拒绝,无法连接。 Traceback (most recent call last): File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\wx_minium.py", line 778, in connect_dev_tool self.connection = Connection.create( File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 169, in create instance = cls(uri, *args, **kwargs) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 209, in __init__ self._connect() File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\minium\miniprogram\base_driver\connection.py", line 351, in _connect raise error_callback.result File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_app.py", line 327, in run_forever self.sock.connect( File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_core.py", line 244, in connect self.sock, addrs = connect(url, self.sock_opt, proxy_info(**options), File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 130, in connect sock = _open_socket(addrinfo_list, options.sockopt, options.timeout) File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 205, in _open_socket raise err File "C:\Users\94391\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\websocket\_http.py", line 185, in _open_socket sock.connect(address) ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。 [E 2024-07-02 10:23:09 minium wx_minium#739 launch_dev_tool] three times try to connect Dev tool has all fail ..., restart now... [I 2024-07-02 10:23:09 minium wx_minium#753 launch_dev_tool] Starting dev tool again... [I 2024-07-02 10:23:09 minium minium_object#83 _do_shell] de shell: cli.bat auto --project "D:\Project\sopei-other\weapp_u_sopei_cn" --auto-port 9422 [E 2024-07-02 10:23:12 minium.Conn5536 connection#632 _on_error] [WinError 10054] 远程主机强迫关闭了一个现有的连接。 [I 2024-07-02 10:23:12 minium.Conn5536 connection#367 _ws_run_forever] websocket run forever shutdown [W 2024-07-02 10:23:12 minium.Conn5536 connection#552 reconnect] connection reconnect [I 2024-07-02 10:23:12 minium minium_object#101 _do_shell] err: - initialize √ IDE server has started, listening on http://127.0.0.1:14150 - preparing - Fetching AppID (wxc32a18a73224dc73) permissions √ Using AppID: wxc32a18a73224dc73 √ auto

  • 【minium】可以支持无头模式运行吗?

    或者是有其他可以弥补case运行时卡顿的方案吗?

  • 如何实现扫码跳转其它页面?

    怎么扫码跳转页面?

  • 【minium】小程序自动化需要源码的问题?

    想了解自动化测试源码是必须的么?还是因为必须用到开发者工具所以才需要源码? 根据当前的了解,小程序自动化是基于基础库调试进行自动化的,定位方式是微信WXSS选择器,需要开发者工具打开源码查看。 但是云测好像并不需要上传源码便能对对应小程序的线上版本,体验版本和开发版本进行测试,因此才有这个疑问。 望解答,谢谢。

  • 【minium】如果以unitest的方式运行,该如何配置并行运行case?(parallel)

    如果以unitest的方式运行【比如unitest.main】,该如何配置并行运行case? 实现类似minitest命令行的--mode parallel

  • 录制用例可以定位到截图红框中的button,用minium启动开发者获取不到button是怎么回事?

    [图片]

  • 怎么才能获取到text标签的值呢?

    [图片]

  • 想录制用例上传到云测回放,但测试环境仅支持内网访问怎么办?

    想录制用例上传到云测回放,但测试环境仅支持内网访问怎么办?

  • 使用class选择器无法正确获取Elmenet对象?

    当前minium版本是1.5.3 开发者工具调试基础库是3.2.5 [图片] 我在编写过程中使用ret = self.mini.page.get_elements('.at-button__text') 进行调试无法获取到元素。同时也使用过//view[text()=使用账号密码登录']也无法正常获取,使用绝对路径才可以,目前来看它也不是自定义组件,请问一下这个是什么原因呢

  • TDesign框架开发miniprogram_npm主包太大如何处理?

    在使用TDesign开发小程序,miniprogram_npm目录下很多组件,感觉很多组件我都没引用,为什么都在主包来,导致主包很大。如何优化? [图片] [图片]

  • 如何在开发者工具上通过坐标点击,不用真机,click_coordinate用不了?

    我们小程序自动化是跑在开发者工具上,没有用真机。所以不能用native.click_coordinate,但是有通过坐标点击元素的诉求,请问各位,这种情况下应该怎么处理?是否可以支持?

  • 小程序内嵌h5测试?

    小程序自动化,现在小程序内嵌h5测试只能支持安卓真机测试吗?ios不行?

  • 自定义组件元素定位问题?

    小程序使用了自定义组件,但是通过官方文档的“如何写跨自定义组件的选择器”教程也无法定位到,因为我们的元素都是同样的view,这样要怎么寻找[图片]

  • 【minium】/【云测试】自动化测试-小程序搜索时,需要软键盘回车确认,使用哪个方法呀?

    RT, 小程序商城的搜索栏,send_key 后,只能软键盘回车搜索。

    有用 1
    0
  • 怎么定位微信小程序来电弹窗?

    [图片]

云测官方企业微信群

欢迎大家进群交流