mangoautomation 1.0.0__py3-none-any.whl → 1.0.1__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.

@@ -14,7 +14,7 @@ ERROR_MSG_0007 = (307, '请先启动容器')
14
14
  ERROR_MSG_0008 = (308, '浏览器类型不正确,请联系管理员检查')
15
15
  ERROR_MSG_0009 = (309, '浏览器路径不正确,请手动设置一个正确的浏览器路径,现在的路径:{}')
16
16
  ERROR_MSG_0010 = (310, '浏览器被关闭,请重试')
17
- ERROR_MSG_0011 = (311, '操作元素:{} 超时,请检查元素可见但是是否可操作,或元素在iframe中,或调整定位方式')
17
+ ERROR_MSG_0011 = (311, '操作元素【{}】超时,请检查元素可见但是是否可操作或调整定位方式')
18
18
  ERROR_MSG_0012 = (312, '操作失败,请检查输入的值是否有空字符串,null或不满足传参的值')
19
19
  ERROR_MSG_0013 = (
20
20
  313, '打开url时超时,分为2个问题:1.启用的浏览器过多,应当减少浏览器并发个数;2.自行查看为啥60秒还未打开:{}')
@@ -37,14 +37,9 @@ ERROR_MSG_0028 = (328, '一个元素内只能包含一个需要被替换的内
37
37
  ERROR_MSG_0029 = (329, '页面无元素:{} 表达式:{}')
38
38
  ERROR_MSG_0030 = (330, '断言时没有找到元素')
39
39
  ERROR_MSG_0031 = (331, '元素未找到准备进行断言获取元素文本类容异常')
40
- ERROR_MSG_0032 = (332, '元素:{} 的元素表达式定位的标签无法对应操作的类型,或其他操作异常')
41
- ERROR_MSG_0033 = (333, 'mysql中无:{}库')
42
- ERROR_MSG_0034 = (334, 'sql存在语法错误,sql:{}')
43
- ERROR_MSG_0035 = (335, 'sql语句是空,或查询字段或条件字段不存在')
40
+ ERROR_MSG_0032 = (332, '元素:{} 的元素表达式定位有多个,或其他元素异常,请检查元素是否可用')
44
41
  ERROR_MSG_0036 = (336, '公共参数sql在数据库中查询不到结果,sql:{}')
45
- ERROR_MSG_0037 = (337, '用例前置sql在数据库中查询不到结果,sql:{}')
46
42
  ERROR_MSG_0038 = (338, '公共参数的sql_key不是列表')
47
- ERROR_MSG_0039 = (339, '用例前置的sql_key不是列表')
48
43
  ERROR_MSG_0040 = (
49
44
  340, '设备启动超时!请检查设备是否开启了:文件传输模式、开发者模式、usb调试,开启后请重新连接电脑,设备号:{}')
50
45
  ERROR_MSG_0041 = (341, '查找页面元素时直接失败,元素:{},报错信息:{}')
@@ -10,9 +10,9 @@ from playwright._impl._errors import TimeoutError, Error, TargetClosedError
10
10
  from playwright.async_api._generated import Locator
11
11
 
12
12
  from mangotools.assertion import PublicAssertion, SqlAssertion
13
- from mangotools.mangos import Mango
14
13
  from mangotools.enums import StatusEnum
15
- from ....enums import ElementExpEnum
14
+ from mangotools.mangos import Mango
15
+ from ....enums import ElementExpEnum, ElementOperationEnum
16
16
  from ....exceptions import MangoAutomationError
17
17
  from ....exceptions._error_msg import *
18
18
  from ....uidrive._base_data import BaseData
@@ -137,6 +137,10 @@ class AsyncWebDevice(AsyncWebBrowser,
137
137
  ele_list.append(locator.nth(nth))
138
138
  else:
139
139
  raise MangoAutomationError(*ERROR_MSG_0023)
140
+ if not ele_list:
141
+ raise MangoAutomationError(*ERROR_MSG_0023)
142
+ if not ele_list and _type == ElementOperationEnum.OPE.value:
143
+ raise MangoAutomationError(*ERROR_MSG_0029, value=(name, loc))
140
144
  try:
141
145
  count = len(ele_list)
142
146
  loc = ele_list[sub - 1] if sub else ele_list
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mangoautomation
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: 测试工具
5
5
  Home-page: https://gitee.com/mao-peng/testkit
6
6
  Author: 毛鹏
@@ -3,7 +3,7 @@ mangoautomation/enums/__init__.py,sha256=xPv6158_Tup3U9rbYtUGgWR8W479-7czLvcRk4D
3
3
  mangoautomation/enums/_base_enum.py,sha256=dpaXsdhWY08BhIzi1B1ksh_p18ZTmhWvTYhbd3n_ONQ,1176
4
4
  mangoautomation/enums/_ui_enum.py,sha256=rdkejsyc4ogZbyNfZcp1q0V0bDPo14vg0A6or6ShaXA,4494
5
5
  mangoautomation/exceptions/__init__.py,sha256=dXtRZSuYg3e_lwYUKYvYjtxTKHITdbi2l9XkHk9DpfY,374
6
- mangoautomation/exceptions/_error_msg.py,sha256=CIwAJAEeXGr93zKWY75NxjqIhcuux0wn0ZTf6jYwfUs,6339
6
+ mangoautomation/exceptions/_error_msg.py,sha256=IhD60gAFfqtOWraDhuKuh_5y6GtpCAtWD2E3BkoRPoQ,5983
7
7
  mangoautomation/exceptions/_exceptions.py,sha256=s3vF0g4nGA1tPiGdI7Mxv9W7uR3uZ9qUSl-KzYppVEU,371
8
8
  mangoautomation/models/__init__.py,sha256=XdqEQNfIw7mcnmv3ZgWPJyFwQvap5Cu2ZMKcIK4wn9M,416
9
9
  mangoautomation/models/_ui_model.py,sha256=IGophozQMO-NQjM_DPdlwud484yfWQw1CRwbDWjI3Vs,1446
@@ -29,7 +29,7 @@ mangoautomation/uidrive/pc/element.py,sha256=LdlWHhvXsaHH6jTp6nNrF81OWPtx81dct4y
29
29
  mangoautomation/uidrive/pc/input_device.py,sha256=F6ZqKja3XkJww66x3l9Idha3R19D832J-5TfiKWmUso,353
30
30
  mangoautomation/uidrive/pc/new_windows.py,sha256=lETHZa7cW8Z0iUShzgVTRxqivkYaOo8WIE58q_8KYfQ,2338
31
31
  mangoautomation/uidrive/web/__init__.py,sha256=MgTklzty_SvX4UemCnqJuViq3cIjUgAjFoEtP-mcDWw,123
32
- mangoautomation/uidrive/web/async_web/__init__.py,sha256=54LvEPe3zmjLsXYhk8VB07mkZ7YDAuItej4ibkaokqI,8839
32
+ mangoautomation/uidrive/web/async_web/__init__.py,sha256=gJxCPWUALVzbQJAM5RH_1-7Jto0hcm1kAXy72pZw24g,9106
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
@@ -48,8 +48,8 @@ mangoautomation/uidrive/web/sync_web/_page.py,sha256=MNekcL7o5YXEloeuvi3YrpOZxGh
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.0.dist-info/LICENSE,sha256=03WP-mgFmo8ofRYDe1HVDQUEUKQZ2q6P6Q-2A4c-46A,1085
52
- mangoautomation-1.0.0.dist-info/METADATA,sha256=rWHSMMkVZD9Ktq3THbVV-9a231Hk3Jap9YO20qUdlYI,624
53
- mangoautomation-1.0.0.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
54
- mangoautomation-1.0.0.dist-info/top_level.txt,sha256=g-uCmjvEODG8WFbmwbGM0-G0zHntHv8ZsS0PQRaMGtE,22
55
- mangoautomation-1.0.0.dist-info/RECORD,,
51
+ mangoautomation-1.0.1.dist-info/LICENSE,sha256=03WP-mgFmo8ofRYDe1HVDQUEUKQZ2q6P6Q-2A4c-46A,1085
52
+ mangoautomation-1.0.1.dist-info/METADATA,sha256=tyBiFL_aYF1daU1cAZxuxcb89wt1-1FxGM8GGPNYZes,624
53
+ mangoautomation-1.0.1.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
54
+ mangoautomation-1.0.1.dist-info/top_level.txt,sha256=g-uCmjvEODG8WFbmwbGM0-G0zHntHv8ZsS0PQRaMGtE,22
55
+ mangoautomation-1.0.1.dist-info/RECORD,,