mangoautomation 1.0.37__py3-none-any.whl → 1.0.39__py3-none-any.whl
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.
- mangoautomation/uidrive/_async_element.py +3 -1
- mangoautomation/uidrive/_sync_element.py +3 -0
- mangoautomation/uidrive/web/async_web/_new_browser.py +7 -8
- mangoautomation/uidrive/web/sync_web/_new_browser.py +7 -8
- {mangoautomation-1.0.37.dist-info → mangoautomation-1.0.39.dist-info}/METADATA +1 -1
- {mangoautomation-1.0.37.dist-info → mangoautomation-1.0.39.dist-info}/RECORD +9 -9
- {mangoautomation-1.0.37.dist-info → mangoautomation-1.0.39.dist-info}/LICENSE +0 -0
- {mangoautomation-1.0.37.dist-info → mangoautomation-1.0.39.dist-info}/WHEEL +0 -0
- {mangoautomation-1.0.37.dist-info → mangoautomation-1.0.39.dist-info}/top_level.txt +0 -0
|
@@ -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
|
-
|
|
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
|
-
|
|
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:
|
|
@@ -10,10 +10,10 @@ mangoautomation/models/_ui_model.py,sha256=IGophozQMO-NQjM_DPdlwud484yfWQw1CRwbD
|
|
|
10
10
|
mangoautomation/tools/__init__.py,sha256=i0rZF_gS0h1Rd0bMhgDSJp4JbEb3rm33zg-MDEX7KdE,342
|
|
11
11
|
mangoautomation/tools/_mate.py,sha256=9lk_EJnAX_OyXbe5WacyHkkcEr2ScBgasl6eUnlklWA,405
|
|
12
12
|
mangoautomation/uidrive/__init__.py,sha256=Tk_gh4Qg2qnewEGxa-7Id4fkQLY3fvQE4X7JB0BEscY,577
|
|
13
|
-
mangoautomation/uidrive/_async_element.py,sha256=
|
|
13
|
+
mangoautomation/uidrive/_async_element.py,sha256=gXHsUxZxmiYvUNq8RqPP3UGupOscTvz_mD7xI2qapRA,13424
|
|
14
14
|
mangoautomation/uidrive/_base_data.py,sha256=ur2Ts40MAhOYXb0vGVXZdSwEVCI3Csri9I9f1pw1r4Y,3766
|
|
15
15
|
mangoautomation/uidrive/_driver_object.py,sha256=Re8j6VLHKfwW2VFdi-1XFRuix8tRBLcHYRBLVF6CApE,1962
|
|
16
|
-
mangoautomation/uidrive/_sync_element.py,sha256=
|
|
16
|
+
mangoautomation/uidrive/_sync_element.py,sha256=s9wb_RUCDcyONhRghe5T0I7zpTfvzRK3DhlxmT_DyVk,13242
|
|
17
17
|
mangoautomation/uidrive/android/__init__.py,sha256=FSIzfPane33QEj6bXslpd8bF1xGCDwMAHBOrpNzdyE4,5874
|
|
18
18
|
mangoautomation/uidrive/android/_application.py,sha256=frvRyqUlx6__3j4xQdaJ4SOnEnipR3uPCOnWKDrkT7Y,2771
|
|
19
19
|
mangoautomation/uidrive/android/_assertion.py,sha256=xkSBdjSfAbYtidHWWWY7Ko2OYaHi9OcZZOlnqIUT-FM,3611
|
|
@@ -35,7 +35,7 @@ mangoautomation/uidrive/web/async_web/_browser.py,sha256=39YroURzagpq0HoEn1RZnNf
|
|
|
35
35
|
mangoautomation/uidrive/web/async_web/_customization.py,sha256=uw6p9uLHLXglgSkH4qjDl1v0iGlaNjvf8LljRH5cAHU,347
|
|
36
36
|
mangoautomation/uidrive/web/async_web/_element.py,sha256=btIkX2nlic17sgSbXtNZ8h5wD-rPyIK6TH5fH4WaoPk,9506
|
|
37
37
|
mangoautomation/uidrive/web/async_web/_input_device.py,sha256=sMAMHb_8QyPx3pKci0gRDQc2O7h1OYMGyA7fCWl81iM,3288
|
|
38
|
-
mangoautomation/uidrive/web/async_web/_new_browser.py,sha256=
|
|
38
|
+
mangoautomation/uidrive/web/async_web/_new_browser.py,sha256=ilUBdsJ0S7EAYBq0D6UbYEpMhmuVghnq133oTpvraC0,5597
|
|
39
39
|
mangoautomation/uidrive/web/async_web/_page.py,sha256=TCYf79qQdVBBTTNq2COZFJVcLCgg5Ksu9lMgmQPVInU,2147
|
|
40
40
|
mangoautomation/uidrive/web/sync_web/__init__.py,sha256=wCYW7V-32Zpw7C8m6zLoxb8niLNopVVBvA-zJBS7e9M,8387
|
|
41
41
|
mangoautomation/uidrive/web/sync_web/_assertion.py,sha256=zZ4_4WiBQFSRwAh0P0JANa5z-ozbNTh3bnUqcZBti9s,11424
|
|
@@ -43,13 +43,13 @@ mangoautomation/uidrive/web/sync_web/_browser.py,sha256=c7xHkIIFPawlzcVkGjwqeKfW
|
|
|
43
43
|
mangoautomation/uidrive/web/sync_web/_customization.py,sha256=E_pfI8gKd0O6r4huJIvA6hoW-X9fSDVL4zEUqhHgxwE,355
|
|
44
44
|
mangoautomation/uidrive/web/sync_web/_element.py,sha256=P5kSFkKyRP8a7qpKJZf_Lhp6Ik1jgHfIVB8Tgpl7kNw,9078
|
|
45
45
|
mangoautomation/uidrive/web/sync_web/_input_device.py,sha256=8t6tJgMb4zgb4Sv02XP3gUU0ZVbApCs3WaILv8Fe1iY,3169
|
|
46
|
-
mangoautomation/uidrive/web/sync_web/_new_browser.py,sha256=
|
|
46
|
+
mangoautomation/uidrive/web/sync_web/_new_browser.py,sha256=SGt3P7hFrPWkBLVEgN8O1p2V39Zjack7u__hsW123SM,5489
|
|
47
47
|
mangoautomation/uidrive/web/sync_web/_page.py,sha256=MNekcL7o5YXEloeuvi3YrpOZxGhEWfrq-5i4PbtTLFg,2027
|
|
48
48
|
tests/__init__.py,sha256=UhCNFqiVjxdh4CXESNo4oE7qfjpYYVkeHbSE5-7LGDY,125
|
|
49
49
|
tests/test_ui_and.py,sha256=4k0_3bx_k2KbZifeRWGK65sxtdiPUOjkNzZ5oxjrc18,672
|
|
50
50
|
tests/test_ui_web.py,sha256=MFaUN8O5qKOMMgyk2eelhKZsYcSJm0Do6pCgsdBZEH4,2765
|
|
51
|
-
mangoautomation-1.0.
|
|
52
|
-
mangoautomation-1.0.
|
|
53
|
-
mangoautomation-1.0.
|
|
54
|
-
mangoautomation-1.0.
|
|
55
|
-
mangoautomation-1.0.
|
|
51
|
+
mangoautomation-1.0.39.dist-info/LICENSE,sha256=03WP-mgFmo8ofRYDe1HVDQUEUKQZ2q6P6Q-2A4c-46A,1085
|
|
52
|
+
mangoautomation-1.0.39.dist-info/METADATA,sha256=6BsaDv5ErPZqn_7zNNoV2EDK59wjRBWt0cyZEkcK4Yc,626
|
|
53
|
+
mangoautomation-1.0.39.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
54
|
+
mangoautomation-1.0.39.dist-info/top_level.txt,sha256=g-uCmjvEODG8WFbmwbGM0-G0zHntHv8ZsS0PQRaMGtE,22
|
|
55
|
+
mangoautomation-1.0.39.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|