mangoautomation 1.0.51__tar.gz → 1.0.53__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.
- {mangoautomation-1.0.51/mangoautomation.egg-info → mangoautomation-1.0.53}/PKG-INFO +1 -1
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/_async_element.py +3 -1
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/_sync_element.py +2 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/async_web/_element.py +22 -6
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/sync_web/_element.py +18 -4
- {mangoautomation-1.0.51 → mangoautomation-1.0.53/mangoautomation.egg-info}/PKG-INFO +1 -1
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/setup.py +1 -1
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/LICENSE +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/MANIFEST.in +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/README.md +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/__init__.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/enums/__init__.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/enums/_base_enum.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/enums/_ui_enum.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/exceptions/__init__.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/exceptions/_error_msg.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/exceptions/_exceptions.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/models/__init__.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/models/_ui_model.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/tools/__init__.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/tools/_mate.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/tools/_uiautodev.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/__init__.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/_base_data.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/_driver_object.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/android/__init__.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/android/_application.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/android/_assertion.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/android/_customization.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/android/_element.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/android/_equipment.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/android/_new_android.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/android/_page.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/ios/__init__.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/pc/__init__.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/pc/assertion.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/pc/customization.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/pc/element.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/pc/input_device.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/pc/new_windows.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/__init__.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/async_web/__init__.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/async_web/_assertion.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/async_web/_browser.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/async_web/_customization.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/async_web/_input_device.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/async_web/_new_browser.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/async_web/_page.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/sync_web/__init__.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/sync_web/_assertion.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/sync_web/_browser.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/sync_web/_customization.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/sync_web/_input_device.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/sync_web/_new_browser.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/sync_web/_page.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation.egg-info/SOURCES.txt +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation.egg-info/dependency_links.txt +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation.egg-info/requires.txt +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation.egg-info/top_level.txt +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/setup.cfg +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/tests/__init__.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/tests/test_ui_and.py +0 -0
- {mangoautomation-1.0.51 → mangoautomation-1.0.53}/tests/test_ui_web.py +0 -0
|
@@ -126,6 +126,7 @@ class AsyncElement(AsyncWebDevice, AndroidDriver):
|
|
|
126
126
|
if self.element_model.ope_value is None:
|
|
127
127
|
raise MangoAutomationError(*ERROR_MSG_0054)
|
|
128
128
|
await self.__ope_value()
|
|
129
|
+
self.element_model.ope_value = self.base_data.test_data.replace(self.element_model.ope_value)
|
|
129
130
|
if self.drive_type == DriveTypeEnum.WEB.value:
|
|
130
131
|
await self.web_action_element(
|
|
131
132
|
self.element_model.name,
|
|
@@ -146,6 +147,7 @@ class AsyncElement(AsyncWebDevice, AndroidDriver):
|
|
|
146
147
|
if self.element_model.ope_value is None:
|
|
147
148
|
raise MangoAutomationError(*ERROR_MSG_0054)
|
|
148
149
|
await self.__ope_value(True)
|
|
150
|
+
self.element_model.ope_value = self.base_data.test_data.replace(self.element_model.ope_value)
|
|
149
151
|
try:
|
|
150
152
|
if self.drive_type == DriveTypeEnum.WEB.value:
|
|
151
153
|
self.element_result_model.ass_msg = await self.web_assertion_element(
|
|
@@ -197,7 +199,7 @@ class AsyncElement(AsyncWebDevice, AndroidDriver):
|
|
|
197
199
|
value = self.element_data.get('value')
|
|
198
200
|
self.base_data.test_data.set_cache(key, self.base_data.test_data.replace(value))
|
|
199
201
|
|
|
200
|
-
async def __ope_value(self,
|
|
202
|
+
async def __ope_value(self,is_ass: bool = False):
|
|
201
203
|
try:
|
|
202
204
|
ope_key = 'actual' if is_ass else 'locating'
|
|
203
205
|
for i in self.element_model.ope_value:
|
|
@@ -126,6 +126,7 @@ class SyncElement(SyncWebDevice, AndroidDriver):
|
|
|
126
126
|
if self.element_model.ope_value is None:
|
|
127
127
|
raise MangoAutomationError(*ERROR_MSG_0054)
|
|
128
128
|
self.__ope_value()
|
|
129
|
+
self.element_model.ope_value = self.base_data.test_data.replace(self.element_model.ope_value)
|
|
129
130
|
if self.drive_type == DriveTypeEnum.WEB.value:
|
|
130
131
|
self.web_action_element(
|
|
131
132
|
self.element_model.name,
|
|
@@ -146,6 +147,7 @@ class SyncElement(SyncWebDevice, AndroidDriver):
|
|
|
146
147
|
if self.element_model.ope_value is None:
|
|
147
148
|
raise MangoAutomationError(*ERROR_MSG_0054)
|
|
148
149
|
self.__ope_value(True)
|
|
150
|
+
self.element_model.ope_value = self.base_data.test_data.replace(self.element_model.ope_value)
|
|
149
151
|
try:
|
|
150
152
|
if self.drive_type == DriveTypeEnum.WEB.value:
|
|
151
153
|
self.element_result_model.ass_msg = self.web_assertion_element(
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/async_web/_element.py
RENAMED
|
@@ -6,10 +6,10 @@ import asyncio
|
|
|
6
6
|
import os
|
|
7
7
|
|
|
8
8
|
import time
|
|
9
|
-
from mangotools.decorator import async_method_callback
|
|
10
|
-
from mangotools.models import MethodModel
|
|
11
9
|
from playwright.async_api import Locator, Error
|
|
12
10
|
|
|
11
|
+
from mangotools.decorator import async_method_callback
|
|
12
|
+
from mangotools.models import MethodModel
|
|
13
13
|
from ..._base_data import BaseData
|
|
14
14
|
from ....exceptions import MangoAutomationError
|
|
15
15
|
from ....exceptions._error_msg import ERROR_MSG_0024, ERROR_MSG_0056
|
|
@@ -55,10 +55,26 @@ class AsyncWebElement(metaclass=Meta):
|
|
|
55
55
|
MethodModel(f='set_cache_key', p='请输入获取元素文本后存储的key', d=True)])
|
|
56
56
|
async def w_get_text(self, locating: Locator, set_cache_key=None):
|
|
57
57
|
"""获取元素文本"""
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
methods = [
|
|
59
|
+
("inner_text", locating.inner_text),
|
|
60
|
+
("text_content", locating.text_content),
|
|
61
|
+
("input_value", locating.input_value),
|
|
62
|
+
("get_attribute", lambda: locating.get_attribute("value")),
|
|
63
|
+
("evaluate", lambda: locating.evaluate("el => el.value")),
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
for method_name, method in methods:
|
|
67
|
+
try:
|
|
68
|
+
value = await method()
|
|
69
|
+
if value is not None and str(value).strip() and set_cache_key:
|
|
70
|
+
self.base_data.test_data.set_cache(key=set_cache_key, value=value)
|
|
71
|
+
return value
|
|
72
|
+
elif value is not None and str(value).strip():
|
|
73
|
+
return value
|
|
74
|
+
except Exception:
|
|
75
|
+
continue
|
|
76
|
+
|
|
77
|
+
return None
|
|
62
78
|
|
|
63
79
|
@async_method_callback('web', '元素操作', 5, [
|
|
64
80
|
MethodModel(f='locating'),
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/sync_web/_element.py
RENAMED
|
@@ -54,10 +54,24 @@ class SyncWebElement(metaclass=Meta):
|
|
|
54
54
|
MethodModel(f='set_cache_key', p='请输入获取元素文本后存储的key', d=True)])
|
|
55
55
|
def w_get_text(self, locating: Locator, set_cache_key=None):
|
|
56
56
|
"""获取元素文本"""
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
methods = [
|
|
58
|
+
("inner_text", lambda: locating.inner_text()),
|
|
59
|
+
("text_content", lambda: locating.text_content()),
|
|
60
|
+
("input_value", lambda: locating.input_value() if locating.is_visible() else None),
|
|
61
|
+
("get_attribute", lambda: locating.get_attribute("value")),
|
|
62
|
+
("evaluate", lambda: locating.evaluate("el => el.value")),
|
|
63
|
+
]
|
|
64
|
+
for method_name, method in methods:
|
|
65
|
+
try:
|
|
66
|
+
value = method()
|
|
67
|
+
if value is not None and str(value).strip() and set_cache_key:
|
|
68
|
+
self.base_data.test_data.set_cache(key=set_cache_key, value=value)
|
|
69
|
+
return value
|
|
70
|
+
elif value is not None and str(value).strip():
|
|
71
|
+
return value
|
|
72
|
+
except Exception:
|
|
73
|
+
continue
|
|
74
|
+
return None
|
|
61
75
|
|
|
62
76
|
@sync_method_callback('web', '元素操作', 5, [
|
|
63
77
|
MethodModel(f='locating'),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/android/__init__.py
RENAMED
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/android/_application.py
RENAMED
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/android/_assertion.py
RENAMED
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/android/_customization.py
RENAMED
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/android/_element.py
RENAMED
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/android/_equipment.py
RENAMED
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/android/_new_android.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/pc/customization.py
RENAMED
|
File without changes
|
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/pc/input_device.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/async_web/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/async_web/_browser.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/async_web/_page.py
RENAMED
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/sync_web/__init__.py
RENAMED
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/sync_web/_assertion.py
RENAMED
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/sync_web/_browser.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation/uidrive/web/sync_web/_page.py
RENAMED
|
File without changes
|
|
File without changes
|
{mangoautomation-1.0.51 → mangoautomation-1.0.53}/mangoautomation.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|