mangoautomation 1.0.37__tar.gz → 1.0.39__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.37/mangoautomation.egg-info → mangoautomation-1.0.39}/PKG-INFO +1 -1
  2. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/_async_element.py +3 -1
  3. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/_sync_element.py +3 -0
  4. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/async_web/_new_browser.py +7 -8
  5. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/sync_web/_new_browser.py +7 -8
  6. {mangoautomation-1.0.37 → mangoautomation-1.0.39/mangoautomation.egg-info}/PKG-INFO +1 -1
  7. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/setup.py +1 -1
  8. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/LICENSE +0 -0
  9. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/MANIFEST.in +0 -0
  10. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/README.md +0 -0
  11. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/__init__.py +0 -0
  12. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/enums/__init__.py +0 -0
  13. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/enums/_base_enum.py +0 -0
  14. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/enums/_ui_enum.py +0 -0
  15. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/exceptions/__init__.py +0 -0
  16. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/exceptions/_error_msg.py +0 -0
  17. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/exceptions/_exceptions.py +0 -0
  18. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/models/__init__.py +0 -0
  19. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/models/_ui_model.py +0 -0
  20. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/tools/__init__.py +0 -0
  21. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/tools/_mate.py +0 -0
  22. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/__init__.py +0 -0
  23. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/_base_data.py +0 -0
  24. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/_driver_object.py +0 -0
  25. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/android/__init__.py +0 -0
  26. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/android/_application.py +0 -0
  27. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/android/_assertion.py +0 -0
  28. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/android/_customization.py +0 -0
  29. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/android/_element.py +0 -0
  30. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/android/_equipment.py +0 -0
  31. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/android/_new_android.py +0 -0
  32. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/android/_page.py +0 -0
  33. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/pc/__init__.py +0 -0
  34. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/pc/assertion.py +0 -0
  35. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/pc/customization.py +0 -0
  36. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/pc/element.py +0 -0
  37. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/pc/input_device.py +0 -0
  38. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/pc/new_windows.py +0 -0
  39. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/__init__.py +0 -0
  40. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/async_web/__init__.py +0 -0
  41. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/async_web/_assertion.py +0 -0
  42. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/async_web/_browser.py +0 -0
  43. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/async_web/_customization.py +0 -0
  44. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/async_web/_element.py +0 -0
  45. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/async_web/_input_device.py +0 -0
  46. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/async_web/_page.py +0 -0
  47. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/sync_web/__init__.py +0 -0
  48. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/sync_web/_assertion.py +0 -0
  49. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/sync_web/_browser.py +0 -0
  50. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/sync_web/_customization.py +0 -0
  51. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/sync_web/_element.py +0 -0
  52. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/sync_web/_input_device.py +0 -0
  53. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation/uidrive/web/sync_web/_page.py +0 -0
  54. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation.egg-info/SOURCES.txt +0 -0
  55. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation.egg-info/dependency_links.txt +0 -0
  56. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation.egg-info/requires.txt +0 -0
  57. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/mangoautomation.egg-info/top_level.txt +0 -0
  58. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/setup.cfg +0 -0
  59. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/tests/__init__.py +0 -0
  60. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/tests/test_ui_and.py +0 -0
  61. {mangoautomation-1.0.37 → mangoautomation-1.0.39}/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.37
3
+ Version: 1.0.39
4
4
  Summary: 测试工具
5
5
  Home-page: https://gitee.com/mao-peng/testkit
6
6
  Author: 毛鹏
@@ -41,7 +41,6 @@ class AsyncElement(AsyncWebDevice, AndroidDriver):
41
41
  self.base_data.log.debug(f'不存在这个类型,如果是非管理员看到这种提示,请联系管理员')
42
42
  raise Exception('不存在的设备类型')
43
43
 
44
-
45
44
  async def element_main(self, element_model: ElementModel, element_data: dict | None = None) -> ElementResultModel:
46
45
  self.element_model = element_model
47
46
  self.element_data = element_data
@@ -93,8 +92,11 @@ class AsyncElement(AsyncWebDevice, AndroidDriver):
93
92
  async def __main(self):
94
93
  try:
95
94
  self.element_model.loc = self.base_data.test_data.replace(self.element_model.loc)
95
+ self.element_result_model.loc = self.element_model.loc
96
96
  self.element_model.sleep = self.base_data.test_data.replace(self.element_model.sleep)
97
+ self.element_result_model.sleep = self.element_model.sleep
97
98
  self.element_model.sub = self.base_data.test_data.replace(self.element_model.sub)
99
+ self.element_result_model.sub = self.element_model.sub
98
100
  except MangoAutomationError as error:
99
101
  self.base_data.log.error(f'操作元素解析数据失败,类型:{type(error)}, 详情:{error}')
100
102
  raise MangoAutomationError(error.code, error.msg)
@@ -92,8 +92,11 @@ class SyncElement(SyncWebDevice, AndroidDriver):
92
92
  def __main(self):
93
93
  try:
94
94
  self.element_model.loc = self.base_data.test_data.replace(self.element_model.loc)
95
+ self.element_result_model.loc = self.element_model.loc
95
96
  self.element_model.sleep = self.base_data.test_data.replace(self.element_model.sleep)
97
+ self.element_result_model.sleep = self.element_model.sleep
96
98
  self.element_model.sub = self.base_data.test_data.replace(self.element_model.sub)
99
+ self.element_result_model.sub = self.element_model.sub
97
100
  except MangoAutomationError as error:
98
101
  self.base_data.log.debug(f'操作元素解析数据失败,类型:{type(error)}, 详情:{error}')
99
102
  raise MangoAutomationError(error.code, error.msg)
@@ -101,16 +101,15 @@ class AsyncWebNewBrowser:
101
101
  raise MangoAutomationError(*ERROR_MSG_0009, value=(self.web_path,))
102
102
 
103
103
  async def new_context(self) -> BrowserContext:
104
- args_dict = {
105
- 'no_viewport': True,
106
- }
107
-
108
- if self.web_recording and self.videos_path:
109
- args_dict['record_video_dir'] = self.videos_path
110
-
104
+ args_dict = {}
105
+ if self.web_is_default:
106
+ args_dict["viewport"] = {"width": 1600, "height": 1080}
111
107
  if self.web_h5:
112
- del args_dict['no_viewport']
113
108
  args_dict.update(self.playwright.devices[self.web_h5])
109
+ if not (self.web_is_default or self.web_h5):
110
+ args_dict["no_viewport"] = True
111
+ if self.web_recording and self.videos_path:
112
+ args_dict["record_video_dir"] = self.videos_path
114
113
  return await self.browser.new_context(**args_dict)
115
114
 
116
115
  async def new_page(self, context: BrowserContext) -> Page:
@@ -101,16 +101,15 @@ class SyncWebNewBrowser:
101
101
  raise MangoAutomationError(*ERROR_MSG_0009, value=(self.web_path,))
102
102
 
103
103
  def new_context(self) -> BrowserContext:
104
- args_dict = {
105
- 'no_viewport': True,
106
- }
107
-
108
- if self.web_recording and self.videos_path:
109
- args_dict['record_video_dir'] = self.videos_path
110
-
104
+ args_dict = {}
105
+ if self.web_is_default:
106
+ args_dict["viewport"] = {"width": 1600, "height": 1080}
111
107
  if self.web_h5:
112
- del args_dict['no_viewport']
113
108
  args_dict.update(self.playwright.devices[self.web_h5])
109
+ if not (self.web_is_default or self.web_h5):
110
+ args_dict["no_viewport"] = True
111
+ if self.web_recording and self.videos_path:
112
+ args_dict["record_video_dir"] = self.videos_path
114
113
  return self.browser.new_context(**args_dict)
115
114
 
116
115
  def new_page(self, context: BrowserContext) -> Page:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mangoautomation
3
- Version: 1.0.37
3
+ Version: 1.0.39
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.37'
3
+ __version__ = '1.0.39'
4
4
 
5
5
  with open("README.md", "r", encoding='utf-8') as fh:
6
6
  long_description = fh.read()