androidviewclient 25.0.1__tar.gz → 25.1.0__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.
- {androidviewclient-25.0.1/src/androidviewclient.egg-info → androidviewclient-25.1.0}/PKG-INFO +1 -2
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/setup.py +1 -2
- {androidviewclient-25.0.1 → androidviewclient-25.1.0/src/androidviewclient.egg-info}/PKG-INFO +1 -2
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/androidviewclient.egg-info/requires.txt +0 -1
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/adb/adbclient.py +1 -1
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/adb/dumpsys.py +1 -1
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/code_generator.py +1 -1
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/common.py +1 -1
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/concertina.py +1 -1
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/controlpanel.py +1 -1
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/culebron.py +25 -5
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/mcp/__init__.py +1 -1
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/mcp/object_store.py +1 -1
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/mcp/server.py +1 -1
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/mcp/tools.py +22 -12
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/plot.py +1 -1
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/robotframework/viewclientwrapper.py +1 -1
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/uiautomator/uiautomatorhelper.py +10 -3
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/viewclient.py +1 -1
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/tools/culebra +1 -1
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/tools/dump +1 -1
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/LICENSE +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/README.md +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/setup.cfg +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/androidviewclient.egg-info/SOURCES.txt +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/androidviewclient.egg-info/dependency_links.txt +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/androidviewclient.egg-info/entry_points.txt +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/androidviewclient.egg-info/top_level.txt +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/__init__.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/__init__.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/__init__.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/adb/__init__.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/adb/androidkeymap.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/distance.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/kato/__init__.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/kato/kato.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/keyevent.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/robotframework/__init__.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/uiautomator/__init__.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/uiautomator/utils.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/window.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/share/__init__.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/share/pixmaps/__init__.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/share/pixmaps/culebra.png +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/share/pixmaps/plugins/__init__.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/share/pixmaps/plugins/android/__init__.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/share/pixmaps/plugins/android/lib/__init__.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/share/pixmaps/plugins/android/lib/device-art-resources/__init__.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/share/pixmaps/plugins/android/lib/device-art-resources/samsung_s4/__init__.py +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/share/pixmaps/plugins/android/lib/device-art-resources/samsung_s4/port_back.png +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/share/pixmaps/plugins/android/lib/device-art-resources/samsung_s4/port_fore.png +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/share/pixmaps/plugins/android/lib/device-art-resources/samsung_s4/port_shadow.png +0 -0
- {androidviewclient-25.0.1 → androidviewclient-25.1.0}/tools/culebra-mcp +0 -0
{androidviewclient-25.0.1/src/androidviewclient.egg-info → androidviewclient-25.1.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: androidviewclient
|
|
3
|
-
Version: 25.0
|
|
3
|
+
Version: 25.1.0
|
|
4
4
|
Summary: AndroidViewClient is a 100% pure python library and tools
|
|
5
5
|
Home-page: https://github.com/dtmilano/AndroidViewClient/
|
|
6
6
|
Author: Diego Torres Milano
|
|
@@ -16,7 +16,6 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
17
|
Requires-Python: >=3.9
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: setuptools
|
|
20
19
|
Requires-Dist: requests
|
|
21
20
|
Requires-Dist: numpy
|
|
22
21
|
Requires-Dist: matplotlib
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from setuptools import setup, find_packages
|
|
4
4
|
|
|
5
5
|
setup(name='androidviewclient',
|
|
6
|
-
version='25.0
|
|
6
|
+
version='25.1.0',
|
|
7
7
|
description='''AndroidViewClient is a 100% pure python library and tools
|
|
8
8
|
that simplifies test script creation providing higher level
|
|
9
9
|
operations and the ability of obtaining the tree of Views present at
|
|
@@ -33,7 +33,6 @@ setup(name='androidviewclient',
|
|
|
33
33
|
'Programming Language :: Python :: 3.11',
|
|
34
34
|
'Programming Language :: Python :: 3.12'],
|
|
35
35
|
install_requires=[
|
|
36
|
-
'setuptools',
|
|
37
36
|
'requests',
|
|
38
37
|
'numpy',
|
|
39
38
|
'matplotlib',
|
{androidviewclient-25.0.1 → androidviewclient-25.1.0/src/androidviewclient.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: androidviewclient
|
|
3
|
-
Version: 25.0
|
|
3
|
+
Version: 25.1.0
|
|
4
4
|
Summary: AndroidViewClient is a 100% pure python library and tools
|
|
5
5
|
Home-page: https://github.com/dtmilano/AndroidViewClient/
|
|
6
6
|
Author: Diego Torres Milano
|
|
@@ -16,7 +16,6 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
17
|
Requires-Python: >=3.9
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: setuptools
|
|
20
19
|
Requires-Dist: requests
|
|
21
20
|
Requires-Dist: numpy
|
|
22
21
|
Requires-Dist: matplotlib
|
|
@@ -38,7 +38,7 @@ from com.dtmilano.android.keyevent import KEY_EVENT
|
|
|
38
38
|
from com.dtmilano.android.uiautomator.uiautomatorhelper import UiAutomatorHelper
|
|
39
39
|
from com.dtmilano.android.viewclient import ViewClient, View, VERSION_SDK_PROPERTY
|
|
40
40
|
|
|
41
|
-
__version__ = '25.0
|
|
41
|
+
__version__ = '25.1.0'
|
|
42
42
|
|
|
43
43
|
import sys
|
|
44
44
|
import threading
|
|
@@ -46,7 +46,28 @@ import warnings
|
|
|
46
46
|
import copy
|
|
47
47
|
import os
|
|
48
48
|
import platform
|
|
49
|
-
from
|
|
49
|
+
from importlib.metadata import PackageNotFoundError, distribution
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _culebra_icon_path() -> Optional[str]:
|
|
53
|
+
"""
|
|
54
|
+
Path to the culebra window icon, or None if it cannot be found.
|
|
55
|
+
|
|
56
|
+
Replaces pkg_resources.resource_filename(Requirement.parse("androidviewclient"), ...),
|
|
57
|
+
which resolved the file relative to the installed distribution's location. pkg_resources
|
|
58
|
+
has been removed from setuptools, so it is looked up with the standard library instead,
|
|
59
|
+
falling back to the source tree when running from a checkout.
|
|
60
|
+
"""
|
|
61
|
+
relative = os.path.join('share', 'pixmaps', 'culebra.png')
|
|
62
|
+
try:
|
|
63
|
+
located = str(distribution('androidviewclient').locate_file(relative))
|
|
64
|
+
if os.path.isfile(located):
|
|
65
|
+
return located
|
|
66
|
+
except PackageNotFoundError:
|
|
67
|
+
pass
|
|
68
|
+
# src/com/dtmilano/android/culebron.py -> src/share/pixmaps/culebra.png
|
|
69
|
+
in_tree = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', relative)
|
|
70
|
+
return os.path.normpath(in_tree) if os.path.isfile(in_tree) else None
|
|
50
71
|
|
|
51
72
|
# noinspection PyBroadException
|
|
52
73
|
try:
|
|
@@ -289,9 +310,8 @@ This is usually installed by python package. Check your distribution details.
|
|
|
289
310
|
self.concertinaConfigFile = concertinaConfigFile
|
|
290
311
|
self.window = tkinter.Tk()
|
|
291
312
|
try:
|
|
292
|
-
f =
|
|
293
|
-
|
|
294
|
-
icon = ImageTk.PhotoImage(file=f)
|
|
313
|
+
f = _culebra_icon_path()
|
|
314
|
+
icon = ImageTk.PhotoImage(file=f) if f else None
|
|
295
315
|
except:
|
|
296
316
|
icon = None
|
|
297
317
|
if icon:
|
{androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/mcp/server.py
RENAMED
|
@@ -31,7 +31,7 @@ from culebratester_client import ApiClient, Configuration
|
|
|
31
31
|
from culebratester_client.api import DefaultApi
|
|
32
32
|
from com.dtmilano.android.mcp.object_store import ObjectStore
|
|
33
33
|
|
|
34
|
-
__version__ = '25.0
|
|
34
|
+
__version__ = '25.1.0'
|
|
35
35
|
|
|
36
36
|
# Configure logging
|
|
37
37
|
DEBUG = os.environ.get('CULEBRATESTER2_DEBUG', '').lower() in ('1', 'true', 'yes')
|
|
@@ -65,10 +65,10 @@ def getDeviceInfo() -> str:
|
|
|
65
65
|
@mcp.tool()
|
|
66
66
|
def dumpUiHierarchy() -> str:
|
|
67
67
|
"""
|
|
68
|
-
Dump the current UI hierarchy
|
|
69
|
-
|
|
68
|
+
Dump the current UI hierarchy.
|
|
69
|
+
|
|
70
70
|
Returns:
|
|
71
|
-
JSON string
|
|
71
|
+
JSON string whose "data" is the window hierarchy as a nested dict
|
|
72
72
|
"""
|
|
73
73
|
try:
|
|
74
74
|
hierarchy = client.ui_device_dump_window_hierarchy_get()
|
|
@@ -351,19 +351,29 @@ def startApp(packageName: str, activityName: str = None) -> str:
|
|
|
351
351
|
|
|
352
352
|
Args:
|
|
353
353
|
packageName: The package name of the app (e.g., "com.example.app")
|
|
354
|
-
activityName:
|
|
355
|
-
|
|
354
|
+
activityName: The activity to start, either fully qualified
|
|
355
|
+
("com.example.app.MainActivity") or relative to the package
|
|
356
|
+
(".MainActivity"). Required: CulebraTester2's startActivity
|
|
357
|
+
endpoint takes an explicit class and cannot resolve a launcher
|
|
358
|
+
activity from the package name alone.
|
|
359
|
+
|
|
356
360
|
Returns:
|
|
357
361
|
JSON string with success status
|
|
358
362
|
"""
|
|
359
363
|
try:
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
364
|
+
if not activityName:
|
|
365
|
+
return json.dumps({
|
|
366
|
+
"success": False,
|
|
367
|
+
"error": "activityName is required (e.g. \".MainActivity\"): "
|
|
368
|
+
"CulebraTester2 starts activities by explicit class"
|
|
369
|
+
})
|
|
370
|
+
|
|
371
|
+
# The endpoint takes pkg and cls as separate required query params,
|
|
372
|
+
# and the server does not expand a relative class name -- ".Main"
|
|
373
|
+
# reaches the Intent verbatim and fails with ActivityNotFoundException.
|
|
374
|
+
cls = packageName + activityName if activityName.startswith('.') else activityName
|
|
375
|
+
|
|
376
|
+
result = client.target_context_start_activity_get(pkg=packageName, cls=cls)
|
|
367
377
|
return json.dumps({
|
|
368
378
|
"success": True,
|
|
369
379
|
"data": str(result) if result else "OK"
|
|
@@ -20,7 +20,7 @@ limitations under the License.
|
|
|
20
20
|
|
|
21
21
|
from __future__ import print_function
|
|
22
22
|
|
|
23
|
-
__version__ = '25.0
|
|
23
|
+
__version__ = '25.1.0'
|
|
24
24
|
|
|
25
25
|
import math
|
|
26
26
|
import os
|
|
@@ -500,8 +500,15 @@ class UiAutomatorHelper:
|
|
|
500
500
|
|
|
501
501
|
:see https://github.com/dtmilano/CulebraTester2-public/blob/master/openapi.yaml
|
|
502
502
|
:param _format: the format (e.g.: JSON, XML)
|
|
503
|
-
:return: the window hierarchy
|
|
504
|
-
"""
|
|
503
|
+
:return: the window hierarchy: a WindowHierarchy for JSON, the XML document as a str for XML
|
|
504
|
+
"""
|
|
505
|
+
if _format and _format.upper() == 'XML':
|
|
506
|
+
# The server answers XML as a text/plain document, but the generated client declares a
|
|
507
|
+
# single response type (WindowHierarchy) for this endpoint and tries to deserialize the
|
|
508
|
+
# XML into it, which fails. Take the body undeserialized and hand back the document.
|
|
509
|
+
response = self.uiAutomatorHelper.api_instance.ui_device_dump_window_hierarchy_get(
|
|
510
|
+
format=_format, _preload_content=False)
|
|
511
|
+
return response.data.decode('utf-8')
|
|
505
512
|
return self.uiAutomatorHelper.api_instance.ui_device_dump_window_hierarchy_get(format=_format)
|
|
506
513
|
|
|
507
514
|
@kato.kato
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/androidviewclient.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/androidviewclient.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/adb/__init__.py
RENAMED
|
File without changes
|
{androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/adb/androidkeymap.py
RENAMED
|
File without changes
|
|
File without changes
|
{androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/kato/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/com/dtmilano/android/uiautomator/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{androidviewclient-25.0.1 → androidviewclient-25.1.0}/src/share/pixmaps/plugins/android/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|