尝试get_element("w-calendar").move() 方法或get_current_page().scroll_to(),或提供一下代码片段
minium自动化测试,对calendar有什么支持的方法吗?[图片] 可以定位其中的数据,但是获取其他月份时需要上下拉页面,才可以有其他月份出现,定位其他月份,有没有这个控件自带的区其他月份日期
2021-06-04https://developers.weixin.qq.com/community/develop/doc/0004083345c3686e1c3c0b8d751000
【minium】真机运行后,如何获取Console中的日志内容?使用minium使用真机运行后,我想要获取Console中的日志内容做断言,想问下通过什么办法可以获取?
2021-05-25https://developers.weixin.qq.com/community/develop/doc/000a6ccdbb8b507dcf2c008c453c00
【minium】提示配置文件中找不到project_path?按照官方文档对config.json做了如下配置: { "project_path": "C:\\Users\\wb.chenchunzhi20\\Desktop\\小程序测试包\\测试环境\\V4.2.1测试", "dev_tool_path": "C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat", "platform": "Android", "device_desire": { "serial": "e4ddf97e", "uiautomator_version": "2" }, "debug_mode": "info", "test_port": "9420", "close_ide": "False" } /也用\\做了替换; first_test.py文件中代码如下: #!/usr/bin/env python3 import minium mini = minium.WXMinium() mini.connect_dev_tool() class test(minium.MiniTest): def test_ui_op(self): self.assertTexts(["房间名"], "view") if __name__ == "__main__": test().test_ui_op() 右键运行first_test.py文件后,报如下错误: D:\Python3\python.exe C:/Users/wb.chenchunzhi20/Desktop/UI自动化/小程序自动化/wechatDemo序自动化/wechatDemo/test/first_test.py C:\Users\wb.chenchunzhi20\Desktop\UI自动化\小程序自动化\wechatDemo序自动化\wechatDemo Can not find project_path in config, that means you must open dev tool by automation way first [WinError 10061] 由于目标计算机积极拒绝,无法连接。 minumexception: {'TimeStamp': '2021-05-21 10:59:19', 'Type': 'MiniTimeoutError', 'Args': 'connect to server timeout: ws://localhost:9420, thread:False', 'Trace': '', 'Uin': 0, 'version': '', 'ext': ''} connect to server timeout: ws://localhost:9420, thread:False Traceback (most recent call last): File "D:\Python3\lib\site-packages\minium\miniprogram\wx_minium.py", line 204, in connect_dev_tool connection = Connection( File "D:\Python3\lib\site-packages\minium\miniprogram\base_driver\connection.py", line 59, in __init__ self._connect() File "D:\Python3\lib\site-packages\minium\miniprogram\base_driver\connection.py", line 109, in _connect raise MiniTimeoutError( minium.framework.exception.MiniTimeoutError: connect to server timeout: ws://localhost:9420, thread:False <html> <head><title>404 Not Found</title></head> <body bgcolor="white"> <center><h1>404 Not Found</h1></center> <hr><center>nginx</center> </body> </html> [WinError 10061] 由于目标计算机积极拒绝,无法连接。 python版本3.9.5; minitest版本1.0.6; 微信开发者工具版本为1.05.2105170; 微信开发者工具安全-服务端口已打开; 微信开发者工具基础库为2.16.1;
2021-05-25受用minitest命令执行,可读取执行目录下的config文件 https://minitest.weixin.qq.com/#/minium/Python/framework/example?id=%e8%bf%90%e8%a1%8ccase 另:unittest的case不是通过实例化minitest实例后直接调用测试函数的
【minium】提示config中找不到project_path,由于目标计算机积极拒绝,无法连接?使用Windows电脑,用安卓手机做小程序自动化,config.json文件中配置了以下内容: { "project_path": "C:\\Users\\wb.chenchunzhi20\\Desktop\\小程序测试包\\测试环境\\V4.2.1测试", "dev_tool_path": "C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat", "platform": "Android", "device_desire": { "serial": "e4ddf97e", "uiautomator_version": "2" }, "debug_mode": "info", "test_port": "9420", "close_ide": "False" } 配置文件中的/也用\\做了替换; 然后first_test.py中的代码如下: #!/usr/bin/env python3 import minium mini = minium.WXMinium() mini.connect_dev_tool() class test(minium.MiniTest): def test_ui_op(self): self.assertTexts(["房间名"], "view") if __name__ == "__main__": test().test_ui_op() 使用pycharm右键运行first_test.py文件后,控制台输出以下错误: D:\Python3\python.exe C:/Users/wb.chenchunzhi20/Desktop/UI自动化/小程序自动化/wechatDemo序自动化/wechatDemo/test/first_test.py C:\Users\wb.chenchunzhi20\Desktop\UI自动化\小程序自动化\wechatDemo序自动化\wechatDemo Can not find project_path in config, that means you must open dev tool by automation way first [WinError 10061] 由于目标计算机积极拒绝,无法连接。 minumexception: {'TimeStamp': '2021-05-21 10:34:09', 'Type': 'MiniTimeoutError', 'Args': 'connect to server timeout: ws://localhost:9420, thread:False', 'Trace': '', 'Uin': 0, 'version': '', 'ext': ''} <html> <head><title>404 Not Found</title></head> <body bgcolor="white"> <center><h1>404 Not Found</h1></center> <hr><center>nginx</center> </body> </html> connect to server timeout: ws://localhost:9420, thread:False Traceback (most recent call last): File "D:\Python3\lib\site-packages\minium\miniprogram\wx_minium.py", line 204, in connect_dev_tool connection = Connection( File "D:\Python3\lib\site-packages\minium\miniprogram\base_driver\connection.py", line 59, in __init__ self._connect() File "D:\Python3\lib\site-packages\minium\miniprogram\base_driver\connection.py", line 109, in _connect raise MiniTimeoutError( minium.framework.exception.MiniTimeoutError: connect to server timeout: ws://localhost:9420, thread:False [WinError 10061] 由于目标计算机积极拒绝,无法连接。 minumexception: {'TimeStamp': '2021-05-21 10:34:40', 'Type': 'MiniTimeoutError', 'Args': 'connect to server timeout: ws://localhost:9420, thread:False', 'Trace': '', 'Uin': 0, 'version': '', 'ext': ''} connect to server timeout: ws://localhost:9420, thread:False Traceback (most recent call last): File "D:\Python3\lib\site-packages\minium\miniprogram\wx_minium.py", line 204, in connect_dev_tool connection = Connection( File "D:\Python3\lib\site-packages\minium\miniprogram\base_driver\connection.py", line 59, in __init__ self._connect() File "D:\Python3\lib\site-packages\minium\miniprogram\base_driver\connection.py", line 109, in _connect raise MiniTimeoutError( minium.framework.exception.MiniTimeoutError: connect to server timeout: ws://localhost:9420, thread:False <html> <head><title>404 Not Found</title></head> <body bgcolor="white"> <center><h1>404 Not Found</h1></center> <hr><center>nginx</center> </body> </html> [WinError 10061] 由于目标计算机积极拒绝,无法连接。 微信开发者工具版本号为最新版本:1.05.2105170; 微信开发者工具基础库为:2.16.1; 微信开发者工具中的安全-服务端口也已打开; python版本为V3.9.5; minitest版本为1.0.6;
2021-05-25https://minitest.weixin.qq.com/#/minium/Python/framework/config enable_app_log: true 或https://minitest.weixin.qq.com/#/minium/Python/api/App?id=enable_log
【minium】小程序运行后,如何通过minium获取console中的日志信息?各位朋友,我想问下如何听过minium获取微信开发者工具中console下的日志?
2021-05-25select picker -> trigger event https://minitest.weixin.qq.com/#/minium/Python/api/Element?id=trigger
【minium】如何实现操作picker选项?这种如何实现选择项: [图片]
2021-05-24select picker -> trigger event https://minitest.weixin.qq.com/#/minium/Python/api/Element?id=trigger
minium对picker选项中的内容如何定位?[图片]如何通过脚本实现值的选择
2021-05-24请参考https://minitest.weixin.qq.com/#/minium/Python/framework/example
【minium】config.json文件不生效怎么办?使用Windows电脑进行真机运行,根目录下添加了config.json文件,内容如下: { "project_path": "C:\\Users\\wb.chenchunzhi20\\Desktop\\小程序测试包\\测试环境\\V4.2.1测试", "dev_tool_path": "C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\.cli.bat", "platform": "Android" } first.test.py文件中的代码如下: import minium # mini = minium.Minium({ # # 小程序项目目录地址,这里是Windows系统的目录 # "project_path": "C:\\Users\\wb.chenchunzhi20\\Desktop\\小程序测试包\\测试环境\\V4.2.1测试", # # 开发者工具cli地址,Windows系统就是默认这个路径 # "dev_tool_path": "C:\\Program Files (x86)\\Tencent\\微信web开发者工具\\cli.bat", # "platform": "Android" # # }) import minium class ExceptionTest(minium.MiniTest): def test_get_current_page(self): self.page.get_element('view', inner_text='加入').click() if __name__ == '__main__': ExceptionTest().test_get_current_page() 运行first_test.py无法调用微信开发者工具,报错内容如下: Traceback (most recent call last): File "<input>", line 1, in <module> File "C:\Program Files\JetBrains\PyCharm Community Edition 2021.1.1\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "C:\Program Files\JetBrains\PyCharm Community Edition 2021.1.1\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "C:/Users/wb.chenchunzhi20/Desktop/UI自动化/小程序自动化/wechatDemo序自动化/wechatDemo/test/first_test.py", line 22, in <module> ExceptionTest().test_get_current_page() File "C:/Users/wb.chenchunzhi20/Desktop/UI自动化/小程序自动化/wechatDemo序自动化/wechatDemo/test/first_test.py", line 18, in test_get_current_page self.page.get_element('view', inner_text='加入').click() File "D:\Python3\lib\site-packages\minium-1.0.6-py3.9.egg\minium\framework\assertbase.py", line 346, in __getattribute__ attr = super().__getattribute__(item) File "D:\Python3\lib\site-packages\minium-1.0.6-py3.9.egg\minium\framework\minitest.py", line 656, in page return self.mini.app.get_current_page() AttributeError: 'NoneType' object has no attribute 'app' 将first.test.py上边注释掉的内容打开后,可以正常真机运行,但是依旧会报以下错误: received async msg: 9dfd40ee-6d1c-4ecf-b234-e7634084aada Traceback (most recent call last): File "<input>", line 1, in <module> File "C:\Program Files\JetBrains\PyCharm Community Edition 2021.1.1\plugins\python-ce\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "C:\Program Files\JetBrains\PyCharm Community Edition 2021.1.1\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "C:/Users/wb.chenchunzhi20/Desktop/UI自动化/小程序自动化/wechatDemo序自动化/wechatDemo/test/first_test.py", line 22, in <module> ExceptionTest().test_get_current_page() File "C:/Users/wb.chenchunzhi20/Desktop/UI自动化/小程序自动化/wechatDemo序自动化/wechatDemo/test/first_test.py", line 18, in test_get_current_page self.page.get_element('view', inner_text='加入').click() File "D:\Python3\lib\site-packages\minium-1.0.6-py3.9.egg\minium\framework\assertbase.py", line 346, in __getattribute__ attr = super().__getattribute__(item) File "D:\Python3\lib\site-packages\minium-1.0.6-py3.9.egg\minium\framework\minitest.py", line 656, in page return self.mini.app.get_current_page() AttributeError: 'NoneType' object has no attribute 'app' 这种情况下我想问以下问题: 1.config.json文件如何生效? 2.'NoneType' object has no attribute 'app'这个问题怎么解决?
2021-05-19麻烦提供一下运行时使用的基础库sdk或使用最新的基础库尝试
minium case用行正常,但未截图?1.case 之前运行一直是正常截图,今天突然出现这个错误。 [图片]
2021-05-18http://minium.oa.com/#/minium/Python/api/Native?id=input_text 输入窗使用以上接口。建议直接使用page.data = xxx的方式/element.trigger方法来进行输入
[minnium]定位元素后,调用Input方法报错?报错信息,minium.framework.exception.MiniAppError: webview Element.callFunction unimplemented,求解!更新了开发工具基础库也不行
2021-04-26