mangoautomation 1.0.1__py3-none-any.whl → 1.0.21__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/web/async_web/_element.py +13 -1
- mangoautomation/uidrive/web/async_web/_input_device.py +0 -5
- mangoautomation/uidrive/web/sync_web/_element.py +15 -3
- {mangoautomation-1.0.1.dist-info → mangoautomation-1.0.21.dist-info}/METADATA +1 -1
- {mangoautomation-1.0.1.dist-info → mangoautomation-1.0.21.dist-info}/RECORD +8 -8
- {mangoautomation-1.0.1.dist-info → mangoautomation-1.0.21.dist-info}/LICENSE +0 -0
- {mangoautomation-1.0.1.dist-info → mangoautomation-1.0.21.dist-info}/WHEEL +0 -0
- {mangoautomation-1.0.1.dist-info → mangoautomation-1.0.21.dist-info}/top_level.txt +0 -0
|
@@ -58,9 +58,15 @@ class AsyncWebElement(metaclass=Meta):
|
|
|
58
58
|
value = await locating.inner_text()
|
|
59
59
|
if set_cache_key:
|
|
60
60
|
self.base_data.test_data.set_cache(key=set_cache_key, value=value)
|
|
61
|
-
|
|
62
61
|
return value
|
|
63
62
|
|
|
63
|
+
@async_method_callback('web', '元素操作', 6, [MethodModel(f='locating')])
|
|
64
|
+
async def w_many_click(self, locating: Locator):
|
|
65
|
+
"""多元素循环单击"""
|
|
66
|
+
elements = await locating.all()
|
|
67
|
+
for element in elements:
|
|
68
|
+
await element.click()
|
|
69
|
+
|
|
64
70
|
@async_method_callback('web', '元素操作', 6, [
|
|
65
71
|
MethodModel(f='locating'),
|
|
66
72
|
MethodModel(f='file_path', p='请输入文件路径,参照帮助文档', d=True)])
|
|
@@ -98,6 +104,12 @@ class AsyncWebElement(metaclass=Meta):
|
|
|
98
104
|
await download.save_as(save_path)
|
|
99
105
|
self.base_data.test_data.set_cache(file_key, file_name)
|
|
100
106
|
|
|
107
|
+
@async_method_callback('web', '元素操作', 9, [
|
|
108
|
+
MethodModel(f='locating')])
|
|
109
|
+
async def w_element_wheel(self, locating: Locator):
|
|
110
|
+
"""滚动到元素位置"""
|
|
111
|
+
await locating.scroll_into_view_if_needed()
|
|
112
|
+
|
|
101
113
|
@async_method_callback('web', '元素操作', 9, [
|
|
102
114
|
MethodModel(f='locating1'),
|
|
103
115
|
MethodModel(f='locating2')])
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
# @Project: 芒果测试平台
|
|
3
3
|
# @Description: # @Time : 2023-04-29 12:11
|
|
4
4
|
# @Author : 毛鹏
|
|
5
|
-
from playwright.async_api import Locator
|
|
6
5
|
|
|
7
6
|
from mangotools.decorator import async_method_callback
|
|
8
7
|
from mangotools.models import MethodModel
|
|
@@ -22,10 +21,6 @@ class AsyncWebDeviceInput(metaclass=Meta):
|
|
|
22
21
|
"""模拟按下指定的键"""
|
|
23
22
|
await self.base_data.page.keyboard.press(str(keyboard))
|
|
24
23
|
|
|
25
|
-
async def w_element_wheel(self, locating: Locator):
|
|
26
|
-
"""滚动到元素位置"""
|
|
27
|
-
await locating.scroll_into_view_if_needed()
|
|
28
|
-
|
|
29
24
|
@async_method_callback('web', '输入设备', 1, [
|
|
30
25
|
MethodModel(f='y', p='请输入向上滚动像素', d=True)])
|
|
31
26
|
async def w_wheel(self, y):
|
|
@@ -7,12 +7,12 @@ import os
|
|
|
7
7
|
import time
|
|
8
8
|
from playwright.sync_api import Locator, Error
|
|
9
9
|
|
|
10
|
+
from mangotools.decorator import sync_method_callback
|
|
11
|
+
from mangotools.models import MethodModel
|
|
10
12
|
from ....exceptions import MangoAutomationError
|
|
11
13
|
from ....exceptions._error_msg import ERROR_MSG_0024, ERROR_MSG_0056
|
|
12
14
|
from ....tools import Meta
|
|
13
15
|
from ....uidrive._base_data import BaseData
|
|
14
|
-
from mangotools.decorator import sync_method_callback
|
|
15
|
-
from mangotools.models import MethodModel
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class SyncWebElement(metaclass=Meta):
|
|
@@ -57,9 +57,15 @@ class SyncWebElement(metaclass=Meta):
|
|
|
57
57
|
value = locating.inner_text()
|
|
58
58
|
if set_cache_key:
|
|
59
59
|
self.base_data.test_data.set_cache(key=set_cache_key, value=value)
|
|
60
|
-
|
|
61
60
|
return value
|
|
62
61
|
|
|
62
|
+
@sync_method_callback('web', '元素操作', 6, [MethodModel(f='locating')])
|
|
63
|
+
def w_many_click(self, locating: Locator):
|
|
64
|
+
"""多元素循环单击"""
|
|
65
|
+
elements = locating.all()
|
|
66
|
+
for element in elements:
|
|
67
|
+
element.click()
|
|
68
|
+
|
|
63
69
|
@sync_method_callback('web', '元素操作', 6, [
|
|
64
70
|
MethodModel(f='locating'),
|
|
65
71
|
MethodModel(f='file_path', p='请输入文件路径,参照帮助文档', d=True)])
|
|
@@ -97,6 +103,12 @@ class SyncWebElement(metaclass=Meta):
|
|
|
97
103
|
download.save_as(save_path)
|
|
98
104
|
self.base_data.test_data.set_cache(file_key, file_name)
|
|
99
105
|
|
|
106
|
+
@sync_method_callback('web', '元素操作', 9, [
|
|
107
|
+
MethodModel(f='locating')])
|
|
108
|
+
def w_element_wheel(self, locating: Locator):
|
|
109
|
+
"""滚动到元素位置"""
|
|
110
|
+
locating.scroll_into_view_if_needed()
|
|
111
|
+
|
|
100
112
|
@sync_method_callback('web', '元素操作', 9, [
|
|
101
113
|
MethodModel(f='locating1'),
|
|
102
114
|
MethodModel(f='locating2')])
|
|
@@ -33,23 +33,23 @@ mangoautomation/uidrive/web/async_web/__init__.py,sha256=gJxCPWUALVzbQJAM5RH_1-7
|
|
|
33
33
|
mangoautomation/uidrive/web/async_web/_assertion.py,sha256=8cLYPe3pP6FrcjDZoFOphP7psgoJJMozq0Z_BDGNXCo,11859
|
|
34
34
|
mangoautomation/uidrive/web/async_web/_browser.py,sha256=s7piT1w8UHocwF9OnZkff8rFfuNHRMSjCxOSM4BC5DQ,4327
|
|
35
35
|
mangoautomation/uidrive/web/async_web/_customization.py,sha256=uw6p9uLHLXglgSkH4qjDl1v0iGlaNjvf8LljRH5cAHU,347
|
|
36
|
-
mangoautomation/uidrive/web/async_web/_element.py,sha256=
|
|
37
|
-
mangoautomation/uidrive/web/async_web/_input_device.py,sha256=
|
|
36
|
+
mangoautomation/uidrive/web/async_web/_element.py,sha256=bbSb4jop7ZueGilC2CbTWIRcMYwB6i3exrw0eDzHrfk,8895
|
|
37
|
+
mangoautomation/uidrive/web/async_web/_input_device.py,sha256=sMAMHb_8QyPx3pKci0gRDQc2O7h1OYMGyA7fCWl81iM,3288
|
|
38
38
|
mangoautomation/uidrive/web/async_web/_new_browser.py,sha256=cmamXXguIq-Zfhb_je8t3klX5vAaK4IqgENXi9TmmrA,5604
|
|
39
39
|
mangoautomation/uidrive/web/async_web/_page.py,sha256=TCYf79qQdVBBTTNq2COZFJVcLCgg5Ksu9lMgmQPVInU,2147
|
|
40
40
|
mangoautomation/uidrive/web/sync_web/__init__.py,sha256=vHDYYESVi-6ApllUXOrDopcQod3dBXcPlTSAng8eIGE,8662
|
|
41
41
|
mangoautomation/uidrive/web/sync_web/_assertion.py,sha256=zZ4_4WiBQFSRwAh0P0JANa5z-ozbNTh3bnUqcZBti9s,11424
|
|
42
42
|
mangoautomation/uidrive/web/sync_web/_browser.py,sha256=vQJq-TWEUq0rHWLWglE5wptqy8WQKWy4P3NUr2pzsSA,4187
|
|
43
43
|
mangoautomation/uidrive/web/sync_web/_customization.py,sha256=E_pfI8gKd0O6r4huJIvA6hoW-X9fSDVL4zEUqhHgxwE,355
|
|
44
|
-
mangoautomation/uidrive/web/sync_web/_element.py,sha256=
|
|
44
|
+
mangoautomation/uidrive/web/sync_web/_element.py,sha256=sYFYj_R2uN8VasW4XHfsM5RHgONE6Ca7Unxpzfu_U80,8498
|
|
45
45
|
mangoautomation/uidrive/web/sync_web/_input_device.py,sha256=8t6tJgMb4zgb4Sv02XP3gUU0ZVbApCs3WaILv8Fe1iY,3169
|
|
46
46
|
mangoautomation/uidrive/web/sync_web/_new_browser.py,sha256=RO1e4fQoeBol3w8NIx_oxIfRkGvx3ZbPSARTwMwetVQ,5378
|
|
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.21.dist-info/LICENSE,sha256=03WP-mgFmo8ofRYDe1HVDQUEUKQZ2q6P6Q-2A4c-46A,1085
|
|
52
|
+
mangoautomation-1.0.21.dist-info/METADATA,sha256=tDFalBQrnu6LkEWbdOuyyqeONX2Opr205PavLGlXmhk,625
|
|
53
|
+
mangoautomation-1.0.21.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
54
|
+
mangoautomation-1.0.21.dist-info/top_level.txt,sha256=g-uCmjvEODG8WFbmwbGM0-G0zHntHv8ZsS0PQRaMGtE,22
|
|
55
|
+
mangoautomation-1.0.21.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|