mangoautomation 1.0.44__tar.gz → 1.0.47__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 (63) hide show
  1. {mangoautomation-1.0.44/mangoautomation.egg-info → mangoautomation-1.0.47}/PKG-INFO +2 -2
  2. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/models/__init__.py +2 -2
  3. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/_async_element.py +2 -2
  4. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/_sync_element.py +2 -2
  5. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/android/__init__.py +7 -18
  6. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/android/_application.py +2 -1
  7. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/android/_assertion.py +2 -1
  8. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/android/_element.py +2 -1
  9. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/android/_equipment.py +2 -1
  10. mangoautomation-1.0.47/mangoautomation/uidrive/ios/__init__.py +5 -0
  11. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/async_web/__init__.py +3 -11
  12. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/sync_web/__init__.py +3 -11
  13. {mangoautomation-1.0.44 → mangoautomation-1.0.47/mangoautomation.egg-info}/PKG-INFO +2 -2
  14. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation.egg-info/SOURCES.txt +1 -0
  15. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation.egg-info/requires.txt +1 -1
  16. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/setup.py +2 -2
  17. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/LICENSE +0 -0
  18. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/MANIFEST.in +0 -0
  19. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/README.md +0 -0
  20. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/__init__.py +0 -0
  21. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/enums/__init__.py +0 -0
  22. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/enums/_base_enum.py +0 -0
  23. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/enums/_ui_enum.py +0 -0
  24. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/exceptions/__init__.py +0 -0
  25. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/exceptions/_error_msg.py +0 -0
  26. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/exceptions/_exceptions.py +0 -0
  27. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/models/_ui_model.py +0 -0
  28. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/tools/__init__.py +0 -0
  29. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/tools/_mate.py +0 -0
  30. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/tools/_uiautodev.py +0 -0
  31. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/__init__.py +0 -0
  32. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/_base_data.py +0 -0
  33. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/_driver_object.py +0 -0
  34. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/android/_customization.py +0 -0
  35. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/android/_new_android.py +0 -0
  36. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/android/_page.py +0 -0
  37. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/pc/__init__.py +0 -0
  38. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/pc/assertion.py +0 -0
  39. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/pc/customization.py +0 -0
  40. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/pc/element.py +0 -0
  41. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/pc/input_device.py +0 -0
  42. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/pc/new_windows.py +0 -0
  43. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/__init__.py +0 -0
  44. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/async_web/_assertion.py +0 -0
  45. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/async_web/_browser.py +0 -0
  46. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/async_web/_customization.py +0 -0
  47. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/async_web/_element.py +0 -0
  48. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/async_web/_input_device.py +0 -0
  49. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/async_web/_new_browser.py +0 -0
  50. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/async_web/_page.py +0 -0
  51. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/sync_web/_assertion.py +0 -0
  52. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/sync_web/_browser.py +0 -0
  53. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/sync_web/_customization.py +0 -0
  54. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/sync_web/_element.py +0 -0
  55. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/sync_web/_input_device.py +0 -0
  56. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/sync_web/_new_browser.py +0 -0
  57. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation/uidrive/web/sync_web/_page.py +0 -0
  58. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation.egg-info/dependency_links.txt +0 -0
  59. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/mangoautomation.egg-info/top_level.txt +0 -0
  60. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/setup.cfg +0 -0
  61. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/tests/__init__.py +0 -0
  62. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/tests/test_ui_and.py +0 -0
  63. {mangoautomation-1.0.44 → mangoautomation-1.0.47}/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.44
3
+ Version: 1.0.47
4
4
  Summary: 测试工具
5
5
  Home-page: https://gitee.com/mao-peng/testkit
6
6
  Author: 毛鹏
@@ -12,7 +12,7 @@ Requires-Dist: pydantic==2.9.2
12
12
  Requires-Dist: playwright==1.43.0
13
13
  Requires-Dist: uiautomation==2.0.20
14
14
  Requires-Dist: uiautomator2==3.2.5
15
- Requires-Dist: mangotools>=1.0.28
15
+ Requires-Dist: mangotools>=1.1.14
16
16
  Requires-Dist: adbutils~=2.8.9
17
17
  Requires-Dist: uiautodev==0.9.0
18
18
 
@@ -1,6 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
- # @Project: 芒果测试平台# @Description:
3
- # @Time : 2023-09-09 23:17
2
+ # @Project: 芒果测试平台
3
+ # @Description:# @Time : 2023-09-09 23:17
4
4
  # @Author : 毛鹏
5
5
  import sys
6
6
 
@@ -10,7 +10,7 @@ from typing import Optional
10
10
 
11
11
  from playwright._impl._errors import TargetClosedError, Error
12
12
 
13
- from mangotools.assertion import PublicAssertion
13
+ from mangotools.assertion import MangoAssertion
14
14
  from mangotools.decorator import async_retry
15
15
  from mangotools.enums import StatusEnum
16
16
  from ..enums import ElementOperationEnum, DriveTypeEnum
@@ -221,7 +221,7 @@ class AsyncElement(AsyncWebDevice, AndroidDriver):
221
221
  if is_ass:
222
222
  if callable(getattr(AsyncWebAssertion, self.element_model.ope_key, None)):
223
223
  i.v = loc
224
- elif callable(getattr(PublicAssertion, self.element_model.ope_key, None)):
224
+ elif callable(getattr(MangoAssertion(), self.element_model.ope_key, None)):
225
225
  i.v = self.element_result_model.element_text
226
226
  else:
227
227
  i.v = loc
@@ -10,7 +10,7 @@ from typing import Optional
10
10
  import time
11
11
  from playwright._impl._errors import TargetClosedError, Error
12
12
 
13
- from mangotools.assertion import PublicAssertion
13
+ from mangotools.assertion import MangoAssertion
14
14
  from mangotools.decorator import sync_retry
15
15
  from mangotools.enums import StatusEnum
16
16
  from ..enums import ElementOperationEnum, DriveTypeEnum
@@ -221,7 +221,7 @@ class SyncElement(SyncWebDevice, AndroidDriver):
221
221
  if is_ass:
222
222
  if callable(getattr(SyncWebAssertion, self.element_model.ope_key, None)):
223
223
  i.v = loc
224
- elif callable(getattr(PublicAssertion, self.element_model.ope_key, None)):
224
+ elif callable(getattr(MangoAssertion(), self.element_model.ope_key, None)):
225
225
  i.v = self.element_result_model.element_text
226
226
  else:
227
227
  i.v = loc
@@ -1,5 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
- # @Project: 芒果测试平台# @Description:
2
+ # @Project: 芒果测试平台
3
+ # @Description:
3
4
  # @Time : 2023-09-09 23:17
4
5
  # @Author : 毛鹏
5
6
 
@@ -7,8 +8,7 @@ from uiautomator2 import UiObject, UiObjectNotFoundError
7
8
  from uiautomator2.exceptions import XPathElementNotFoundError
8
9
  from uiautomator2.xpath import XPathSelector
9
10
 
10
- from mangotools.assertion import PublicAssertion
11
- from mangotools.assertion import SqlAssertion
11
+ from mangotools.assertion import MangoAssertion
12
12
  from ..android._application import AndroidApplication
13
13
  from ..android._assertion import AndroidAssertion
14
14
  from ..android._customization import AndroidCustomization
@@ -65,28 +65,17 @@ class AndroidDriver(AndroidPage,
65
65
 
66
66
  def a_assertion_element(self, name, ope_key, ope_value):
67
67
  self.base_data.log.debug(f'断言元素,名称:{name},key:{ope_key},value:{ope_value}')
68
-
69
68
  is_method = callable(getattr(AndroidAssertion(self.base_data), ope_key, None))
70
- is_method_public = callable(getattr(PublicAssertion, ope_key, None))
71
-
72
- if is_method or is_method_public:
73
- if ope_value['value'] is None:
74
- raise MangoAutomationError(*ERROR_MSG_0031, value=(name,))
69
+ if is_method and ope_value.get('actual') is None:
70
+ raise MangoAutomationError(*ERROR_MSG_0031, value=(name,))
75
71
 
76
72
  try:
77
73
  if is_method:
78
74
  self.base_data.log.debug(f'开始断言-1,方法:{ope_key},断言值:{ope_value}')
79
75
  Mango.s_e(AndroidAssertion(self.base_data), ope_key, ope_value)
80
- elif is_method_public:
81
- self.base_data.log.debug(f'开始断言-2,方法:{ope_key},断言值:{ope_value}')
82
- Mango.s_e(PublicAssertion, ope_key, ope_value)
83
76
  else:
84
- if self.base_data.mysql_connect is not None:
85
- SqlAssertion.mysql_obj = self.base_data.mysql_connect
86
- self.base_data.log.debug(f'开始断言-3,方法:sql相等端游,实际值:{ope_value}')
87
- SqlAssertion.sql_is_equal(**ope_value)
88
- else:
89
- raise MangoAutomationError(*ERROR_MSG_0019)
77
+ self.base_data.log.debug(f'开始断言-2,方法:{ope_key},断言值:{ope_value}')
78
+ MangoAssertion(self.base_data.mysql_connect).ass(ope_key, ope_value)
90
79
  except AssertionError as error:
91
80
  self.base_data.log.error(f'安卓自动化失败-1,类型:{type(error)},失败详情:{error}')
92
81
  raise MangoAutomationError(*ERROR_MSG_0017, value=error.args)
@@ -1,5 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
- # @Project: 芒果测试平台# @Description:
2
+ # @Project: 芒果测试平台
3
+ # @Description:
3
4
  # @Time : 2023-09-09 23:17
4
5
  # @Author : 毛鹏
5
6
  import time
@@ -1,5 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
- # @Project: 芒果测试平台# @Description:
2
+ # @Project: 芒果测试平台
3
+ # @Description:
3
4
  # @Time : 2023-09-09 23:17
4
5
  # @Author : 毛鹏
5
6
  from uiautomator2 import UiObject
@@ -1,5 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
- # @Project: 芒果测试平台# @Description:
2
+ # @Project: 芒果测试平台
3
+ # @Description:
3
4
  # @Time : 2023-09-09 23:17
4
5
  # @Author : 毛鹏
5
6
  import os.path
@@ -1,5 +1,6 @@
1
1
  # -*- coding: utf-8 -*-
2
- # @Project: 芒果测试平台# @Description:
2
+ # @Project: 芒果测试平台
3
+ # @Description:
3
4
  # @Time : 03-09-09 3:17
4
5
  # @Author : 毛鹏
5
6
  from time import sleep
@@ -0,0 +1,5 @@
1
+ # -*- coding: utf-8 -*-
2
+ # @Project: 芒果测试平台
3
+ # @Description:
4
+ # @Time : 2025-07-03 14:38
5
+ # @Author : 毛鹏
@@ -9,7 +9,7 @@ import traceback
9
9
  from playwright._impl._errors import TimeoutError, Error
10
10
  from playwright.async_api._generated import Locator
11
11
 
12
- from mangotools.assertion import PublicAssertion, SqlAssertion
12
+ from mangotools.assertion import MangoAssertion
13
13
  from mangotools.enums import StatusEnum
14
14
  from mangotools.mangos import Mango
15
15
  from ....enums import ElementExpEnum, ElementOperationEnum
@@ -67,7 +67,6 @@ class AsyncWebDevice(AsyncWebBrowser,
67
67
  async def web_assertion_element(self, name, ope_key, ope_value):
68
68
  self.base_data.log.debug(f'断言元素,名称:{name},key:{ope_key},value:{ope_value}')
69
69
  is_method = callable(getattr(AsyncWebAssertion, ope_key, None))
70
- is_method_public = callable(getattr(PublicAssertion, ope_key, None))
71
70
  try:
72
71
  if is_method:
73
72
  if ope_value.get('actual', None) is None:
@@ -75,16 +74,9 @@ class AsyncWebDevice(AsyncWebBrowser,
75
74
  raise MangoAutomationError(*ERROR_MSG_0031, value=(name,))
76
75
  self.base_data.log.debug(f'开始断言-1,方法:{ope_key},断言值:{ope_value}')
77
76
  await Mango.a_e(AsyncWebAssertion(self.base_data), ope_key, ope_value)
78
- elif is_method_public:
79
- self.base_data.log.debug(f'开始断言-2,方法:{ope_key},断言值:{ope_value}')
80
- Mango.s_e(PublicAssertion, ope_key, ope_value)
81
77
  else:
82
- if self.base_data.mysql_connect is not None:
83
- SqlAssertion.mysql_obj = self.base_data.mysql_connect
84
- self.base_data.log.debug(f'开始断言-3,方法:sql相等端游,实际值:{ope_value}')
85
- await SqlAssertion.sql_is_equal(**ope_value)
86
- else:
87
- raise MangoAutomationError(*ERROR_MSG_0019)
78
+ self.base_data.log.debug(f'开始断言-2,方法:{ope_key},断言值:{ope_value}')
79
+ MangoAssertion(self.base_data.mysql_connect).ass(ope_key, ope_value)
88
80
  except AssertionError as error:
89
81
  self.base_data.log.debug(f'WEB自动化断言失败-1,类型:{type(error)},失败详情:{error}')
90
82
  raise MangoAutomationError(*ERROR_MSG_0017, value=error.args)
@@ -9,7 +9,7 @@ import traceback
9
9
  from playwright._impl._errors import TimeoutError, Error
10
10
  from playwright.sync_api._generated import Locator
11
11
 
12
- from mangotools.assertion import PublicAssertion, SqlAssertion
12
+ from mangotools.assertion import MangoAssertion
13
13
  from mangotools.enums import StatusEnum
14
14
  from mangotools.mangos import Mango
15
15
  from ....enums import ElementExpEnum
@@ -67,23 +67,15 @@ class SyncWebDevice(SyncWebBrowser,
67
67
  def web_assertion_element(self, name, ope_key, ope_value):
68
68
  self.base_data.log.debug(f'断言元素,名称:{name},key:{ope_key},value:{ope_value}')
69
69
  is_method = callable(getattr(SyncWebAssertion, ope_key, None))
70
- is_method_public = callable(getattr(PublicAssertion, ope_key, None))
71
70
  try:
72
71
  if is_method:
73
72
  if ope_value.get('actual', None) is None:
74
73
  raise MangoAutomationError(*ERROR_MSG_0031, value=(name,))
75
74
  self.base_data.log.debug(f'开始断言-1,方法:{ope_key},断言值:{ope_value}')
76
75
  Mango.s_e(SyncWebAssertion(self.base_data), ope_key, ope_value)
77
- elif is_method_public:
78
- self.base_data.log.debug(f'开始断言-2,方法:{ope_key},断言值:{ope_value}')
79
- Mango.s_e(PublicAssertion, ope_key, ope_value)
80
76
  else:
81
- if self.base_data.mysql_connect is not None:
82
- SqlAssertion.mysql_obj = self.base_data.mysql_connect
83
- self.base_data.log.debug(f'开始断言-3,方法:sql相等端游,实际值:{ope_value}')
84
- SqlAssertion.sql_is_equal(**ope_value)
85
- else:
86
- raise MangoAutomationError(*ERROR_MSG_0019)
77
+ self.base_data.log.debug(f'开始断言-2,方法:{ope_key},断言值:{ope_value}')
78
+ MangoAssertion(self.base_data.mysql_connect).ass(ope_key, ope_value)
87
79
  except AssertionError as error:
88
80
  self.base_data.log.debug(f'WEB自动化断言失败-1,类型:{type(error)},失败详情:{error}')
89
81
  raise MangoAutomationError(*ERROR_MSG_0017, value=error.args)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mangoautomation
3
- Version: 1.0.44
3
+ Version: 1.0.47
4
4
  Summary: 测试工具
5
5
  Home-page: https://gitee.com/mao-peng/testkit
6
6
  Author: 毛鹏
@@ -12,7 +12,7 @@ Requires-Dist: pydantic==2.9.2
12
12
  Requires-Dist: playwright==1.43.0
13
13
  Requires-Dist: uiautomation==2.0.20
14
14
  Requires-Dist: uiautomator2==3.2.5
15
- Requires-Dist: mangotools>=1.0.28
15
+ Requires-Dist: mangotools>=1.1.14
16
16
  Requires-Dist: adbutils~=2.8.9
17
17
  Requires-Dist: uiautodev==0.9.0
18
18
 
@@ -32,6 +32,7 @@ mangoautomation/uidrive/android/_element.py
32
32
  mangoautomation/uidrive/android/_equipment.py
33
33
  mangoautomation/uidrive/android/_new_android.py
34
34
  mangoautomation/uidrive/android/_page.py
35
+ mangoautomation/uidrive/ios/__init__.py
35
36
  mangoautomation/uidrive/pc/__init__.py
36
37
  mangoautomation/uidrive/pc/assertion.py
37
38
  mangoautomation/uidrive/pc/customization.py
@@ -3,6 +3,6 @@ pydantic==2.9.2
3
3
  playwright==1.43.0
4
4
  uiautomation==2.0.20
5
5
  uiautomator2==3.2.5
6
- mangotools>=1.0.28
6
+ mangotools>=1.1.14
7
7
  adbutils~=2.8.9
8
8
  uiautodev==0.9.0
@@ -1,6 +1,6 @@
1
1
  from setuptools import setup, find_packages
2
2
 
3
- __version__ = '1.0.44'
3
+ __version__ = '1.0.47'
4
4
 
5
5
  with open("README.md", "r", encoding='utf-8') as fh:
6
6
  long_description = fh.read()
@@ -21,7 +21,7 @@ setup(
21
21
  'playwright==1.43.0',
22
22
  'uiautomation==2.0.20',
23
23
  'uiautomator2==3.2.5',
24
- 'mangotools>=1.0.28',
24
+ 'mangotools>=1.1.14',
25
25
  'adbutils~=2.8.9',
26
26
  'uiautodev==0.9.0',
27
27