楼主有解决问题吗?遇到了类似的问题
执行minitest的用例时经常报错WaitTimeoutError如何解决?报错详细日志如下 test_pro_resemblance_product========= INFO 2023-05-06 20:18:35,825 basenative.py wrapper 23 call BaseNative.get_start_up INFO 2023-05-06 20:18:35,825 basenative.py wrapper 27 call BaseNative.get_start_up end ERROR 2023-05-06 20:18:35,827 assertbase.py _teardown_collect 273 <bound method rerun.<locals>.wrapper.<locals>.decorator of <test_cases.test_product_details.ProductDetailsTest testMethod=test_pro_resemblance_product>> Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/minium/utils/utils.py", line 432, in get_result return fut.result(timeout) File "/usr/local/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/concurrent/futures/_base.py", line 460, in result raise TimeoutError() concurrent.futures._base.TimeoutError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/minium/framework/libs/unittest/case.py", line 39, in testPartExecutor yield File "/usr/local/lib/python3.10/site-packages/minium/framework/libs/unittest/case.py", line 125, in run self._callTestMethod(testMethod) File "/usr/local/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/unittest/case.py", line 549, in _callTestMethod method() File "/usr/local/lib/python3.10/site-packages/unittestreport/core/reRun.py", line 41, in decorator run_count(count, interval, func, *args, **kwargs) File "/usr/local/lib/python3.10/site-packages/unittestreport/core/reRun.py", line 23, in run_count raise e File "/usr/local/lib/python3.10/site-packages/unittestreport/core/reRun.py", line 18, in run_count func(*args, **kwargs) File "/Users/tester/.jenkins/workspace/UI_mini_pro/test_cases/test_product_details.py", line 50, in test_pro_resemblance_product self.execute_case(path) File "/Users/tester/.jenkins/workspace/UI_mini_pro/base/base_operate.py", line 22, in execute_case self.app.go_home() File "/usr/local/lib/python3.10/site-packages/minium/miniprogram/base_driver/minium_log.py", line 131, in wrapper result = func(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/minium/miniprogram/base_driver/app.py", line 482, in go_home page = self.relaunch(main_page_path) File "/usr/local/lib/python3.10/site-packages/minium/miniprogram/base_driver/minium_log.py", line 131, in wrapper result = func(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/minium/miniprogram/base_driver/app.py", line 388, in relaunch page = self._change_route_async("reLaunch", url, is_wait_url_change) File "/usr/local/lib/python3.10/site-packages/minium/miniprogram/base_driver/app.py", line 564, in _change_route_async if get_result(wait_route_changed, 15): # 接口调用成功后15s内应有on app route done File "/usr/local/lib/python3.10/site-packages/minium/utils/utils.py", line 436, in get_result raise WaitTimeoutError() from ext minium.utils.utils.WaitTimeoutError
2023-07-04我们的业务场景就是点击扫码按钮,弹窗订阅弹窗后点击允许,在开发者工具中就会弹出系统的文件夹选择图片上传,跳转到下一个页面,这种场景要怎么实现呢 [图片]
mock_choose_image接口,没有触发图片上传?使用场景:点击扫码组件弹出微信订阅的弹窗,点击弹窗上的确认后(如下图),触发照片上传。代码实现如下,但是最终没有上传图片[图片] image_name = "detail_page.png" # 运行这个case时需要在本目录下有名为test.png的图片 with open(image_name, "rb") as fd: c = fd.read() image_b64data = base64.b64encode(c).decode("utf8") self.app.mock_choose_image(image_name, image_b64data) # qr = "th-view >>> bottomnavigator >>> th-view >>> th-view >>> th-image >>> image" qr = "th-view >>> bottomnavigator >>> th-view >>> th-view >>> th-view >>> view" elements = self.page.get_elements(qr) print("elements size is " + str(len(elements))) # 这个element class属性中有scan的标志 elements[11].click() self.native.allow_send_subscribe_message(True)
2023-06-19