mangoautomation 1.0.31__tar.gz → 1.0.33__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mangoautomation might be problematic. Click here for more details.

Files changed (61) hide show
  1. {mangoautomation-1.0.31/mangoautomation.egg-info → mangoautomation-1.0.33}/PKG-INFO +1 -1
  2. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/_async_element.py +7 -1
  3. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/_sync_element.py +7 -1
  4. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/async_web/_browser.py +7 -4
  5. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/sync_web/_browser.py +6 -3
  6. {mangoautomation-1.0.31 → mangoautomation-1.0.33/mangoautomation.egg-info}/PKG-INFO +1 -1
  7. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/setup.py +1 -1
  8. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/LICENSE +0 -0
  9. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/MANIFEST.in +0 -0
  10. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/README.md +0 -0
  11. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/__init__.py +0 -0
  12. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/enums/__init__.py +0 -0
  13. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/enums/_base_enum.py +0 -0
  14. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/enums/_ui_enum.py +0 -0
  15. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/exceptions/__init__.py +0 -0
  16. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/exceptions/_error_msg.py +0 -0
  17. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/exceptions/_exceptions.py +0 -0
  18. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/models/__init__.py +0 -0
  19. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/models/_ui_model.py +0 -0
  20. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/tools/__init__.py +0 -0
  21. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/tools/_mate.py +0 -0
  22. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/__init__.py +0 -0
  23. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/_base_data.py +0 -0
  24. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/_driver_object.py +0 -0
  25. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/android/__init__.py +0 -0
  26. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/android/_application.py +0 -0
  27. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/android/_assertion.py +0 -0
  28. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/android/_customization.py +0 -0
  29. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/android/_element.py +0 -0
  30. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/android/_equipment.py +0 -0
  31. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/android/_new_android.py +0 -0
  32. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/android/_page.py +0 -0
  33. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/pc/__init__.py +0 -0
  34. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/pc/assertion.py +0 -0
  35. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/pc/customization.py +0 -0
  36. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/pc/element.py +0 -0
  37. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/pc/input_device.py +0 -0
  38. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/pc/new_windows.py +0 -0
  39. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/__init__.py +0 -0
  40. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/async_web/__init__.py +0 -0
  41. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/async_web/_assertion.py +0 -0
  42. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/async_web/_customization.py +0 -0
  43. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/async_web/_element.py +0 -0
  44. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/async_web/_input_device.py +0 -0
  45. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/async_web/_new_browser.py +0 -0
  46. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/async_web/_page.py +0 -0
  47. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/sync_web/__init__.py +0 -0
  48. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/sync_web/_assertion.py +0 -0
  49. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/sync_web/_customization.py +0 -0
  50. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/sync_web/_element.py +0 -0
  51. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/sync_web/_input_device.py +0 -0
  52. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/sync_web/_new_browser.py +0 -0
  53. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation/uidrive/web/sync_web/_page.py +0 -0
  54. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation.egg-info/SOURCES.txt +0 -0
  55. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation.egg-info/dependency_links.txt +0 -0
  56. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation.egg-info/requires.txt +0 -0
  57. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/mangoautomation.egg-info/top_level.txt +0 -0
  58. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/setup.cfg +0 -0
  59. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/tests/__init__.py +0 -0
  60. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/tests/test_ui_and.py +0 -0
  61. {mangoautomation-1.0.31 → mangoautomation-1.0.33}/tests/test_ui_web.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mangoautomation
3
- Version: 1.0.31
3
+ Version: 1.0.33
4
4
  Summary: 测试工具
5
5
  Home-page: https://gitee.com/mao-peng/testkit
6
6
  Author: 毛鹏
@@ -255,7 +255,13 @@ class AsyncElement(AsyncWebDevice, AndroidDriver):
255
255
  file_path = os.path.join(self.base_data.screenshot_path, file_name)
256
256
  self.element_result_model.picture_path = file_path
257
257
  self.element_result_model.picture_name = file_name
258
- await self.__error_screenshot(file_path)
258
+ try:
259
+ await self.__error_screenshot(file_path)
260
+ except MangoAutomationError as error:
261
+ self.element_result_model.error_message += f'执行过程中发生失败,准备截图时截图失败,失败原因:{error.msg}'
262
+ except Exception as error:
263
+ self.base_data.log.error(
264
+ f'截图失败未知异常-1,类型:{type(error)},失败详情:{error},失败明细:{traceback.format_exc()}')
259
265
 
260
266
  async def __error_screenshot(self, file_path):
261
267
  if self.drive_type == DriveTypeEnum.WEB.value:
@@ -255,7 +255,13 @@ class SyncElement(SyncWebDevice, AndroidDriver):
255
255
  file_path = os.path.join(self.base_data.screenshot_path, file_name)
256
256
  self.element_result_model.picture_path = file_path
257
257
  self.element_result_model.picture_name = file_name
258
- self.__error_screenshot(file_path)
258
+ try:
259
+ self.__error_screenshot(file_path)
260
+ except MangoAutomationError as error:
261
+ self.element_result_model.error_message += f'执行过程中发生失败,准备截图时截图失败,失败原因:{error.msg}'
262
+ except Exception as error:
263
+ self.base_data.log.error(
264
+ f'截图失败未知异常-1,类型:{type(error)},失败详情:{error},失败明细:{traceback.format_exc()}')
259
265
 
260
266
  def __error_screenshot(self, file_path):
261
267
  if self.drive_type == DriveTypeEnum.WEB.value:
@@ -8,12 +8,12 @@ import os.path
8
8
  import traceback
9
9
  from urllib.parse import urlparse
10
10
 
11
- from playwright._impl._errors import TimeoutError, Error
11
+ from playwright._impl._errors import TimeoutError, Error, TargetClosedError
12
12
 
13
13
  from mangotools.decorator import async_method_callback
14
14
  from mangotools.models import MethodModel
15
15
  from ....exceptions import MangoAutomationError
16
- from ....exceptions._error_msg import ERROR_MSG_0049, ERROR_MSG_0013, ERROR_MSG_0058, ERROR_MSG_0059
16
+ from ....exceptions._error_msg import ERROR_MSG_0049, ERROR_MSG_0013, ERROR_MSG_0058, ERROR_MSG_0059, ERROR_MSG_0010
17
17
  from ....tools import Meta
18
18
  from ..._base_data import BaseData
19
19
 
@@ -41,11 +41,14 @@ class AsyncWebBrowser(metaclass=Meta):
41
41
  await self.base_data.page.goto(url, timeout=60000)
42
42
  await asyncio.sleep(2)
43
43
  except TimeoutError as error:
44
- self.base_data.log.debug(f'打开URL失败-2,类型:{type(error)},失败详情:{error}')
44
+ self.base_data.log.debug(f'打开URL失败-1,类型:{type(error)},失败详情:{error}')
45
45
  raise MangoAutomationError(*ERROR_MSG_0013, value=(url,))
46
+ except TargetClosedError as error:
47
+ self.base_data.log.debug(f'打开URL失败-2,类型:{type(error)},失败详情:{error}')
48
+ raise MangoAutomationError(*ERROR_MSG_0010, value=(url,))
46
49
  except Error as error:
47
50
  self.base_data.log.debug(
48
- f'打开URL失败-2,类型:{type(error)},失败详情:{error},失败明细:{traceback.format_exc()}')
51
+ f'打开URL失败-3,类型:{type(error)},失败详情:{error},失败明细:{traceback.format_exc()}')
49
52
  raise MangoAutomationError(*ERROR_MSG_0058, value=(url,))
50
53
 
51
54
  @async_method_callback('web', '浏览器操作', 2, [
@@ -8,12 +8,12 @@ import traceback
8
8
  from urllib.parse import urlparse
9
9
 
10
10
  import time
11
- from playwright._impl._errors import TimeoutError, Error
11
+ from playwright._impl._errors import TimeoutError, Error, TargetClosedError
12
12
 
13
13
  from mangotools.decorator import sync_method_callback
14
14
  from mangotools.models import MethodModel
15
15
  from ....exceptions import MangoAutomationError
16
- from ....exceptions._error_msg import ERROR_MSG_0049, ERROR_MSG_0013, ERROR_MSG_0058, ERROR_MSG_0059
16
+ from ....exceptions._error_msg import ERROR_MSG_0049, ERROR_MSG_0013, ERROR_MSG_0058, ERROR_MSG_0059, ERROR_MSG_0010
17
17
  from ....tools import Meta
18
18
  from ....uidrive._base_data import BaseData
19
19
 
@@ -43,9 +43,12 @@ class SyncWebBrowser(metaclass=Meta):
43
43
  except TimeoutError as error:
44
44
  self.base_data.log.debug(f'打开URL失败-2,类型:{type(error)},失败详情:{error}')
45
45
  raise MangoAutomationError(*ERROR_MSG_0013, value=(url,))
46
+ except TargetClosedError as error:
47
+ self.base_data.log.debug(f'打开URL失败-2,类型:{type(error)},失败详情:{error}')
48
+ raise MangoAutomationError(*ERROR_MSG_0010, value=(url,))
46
49
  except Error as error:
47
50
  self.base_data.log.debug(
48
- f'打开URL失败-2,类型:{type(error)},失败详情:{error},失败明细:{traceback.format_exc()}')
51
+ f'打开URL失败-3,类型:{type(error)},失败详情:{error},失败明细:{traceback.format_exc()}')
49
52
  raise MangoAutomationError(*ERROR_MSG_0058, value=(url,))
50
53
 
51
54
  @sync_method_callback('web', '浏览器操作', 2, [MethodModel(f='path', p='请输入截图保存路径', d=True)])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mangoautomation
3
- Version: 1.0.31
3
+ Version: 1.0.33
4
4
  Summary: 测试工具
5
5
  Home-page: https://gitee.com/mao-peng/testkit
6
6
  Author: 毛鹏
@@ -1,6 +1,6 @@
1
1
  from setuptools import setup, find_packages
2
2
 
3
- __version__ = '1.0.31'
3
+ __version__ = '1.0.33'
4
4
 
5
5
  with open("README.md", "r", encoding='utf-8') as fh:
6
6
  long_description = fh.read()