androidviewclient 23.4.1__tar.gz → 24.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.
Files changed (47) hide show
  1. {androidviewclient-23.4.1/src/androidviewclient.egg-info → androidviewclient-24.1.0}/PKG-INFO +2 -2
  2. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/setup.py +2 -2
  3. {androidviewclient-23.4.1 → androidviewclient-24.1.0/src/androidviewclient.egg-info}/PKG-INFO +2 -2
  4. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/androidviewclient.egg-info/requires.txt +1 -1
  5. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/adb/adbclient.py +1 -1
  6. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/adb/dumpsys.py +1 -1
  7. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/code_generator.py +1 -1
  8. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/common.py +1 -1
  9. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/concertina.py +1 -1
  10. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/controlpanel.py +1 -1
  11. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/culebron.py +2 -2
  12. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/plot.py +1 -1
  13. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/robotframework/viewclientwrapper.py +1 -1
  14. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/uiautomator/uiautomatorhelper.py +38 -8
  15. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/viewclient.py +1 -1
  16. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/tools/culebra +3 -3
  17. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/tools/dump +1 -1
  18. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/LICENSE +0 -0
  19. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/README.md +0 -0
  20. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/setup.cfg +0 -0
  21. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/androidviewclient.egg-info/SOURCES.txt +0 -0
  22. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/androidviewclient.egg-info/dependency_links.txt +0 -0
  23. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/androidviewclient.egg-info/top_level.txt +0 -0
  24. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/__init__.py +0 -0
  25. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/__init__.py +0 -0
  26. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/__init__.py +0 -0
  27. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/adb/__init__.py +0 -0
  28. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/adb/androidkeymap.py +0 -0
  29. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/distance.py +0 -0
  30. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/kato/__init__.py +0 -0
  31. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/kato/kato.py +0 -0
  32. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/keyevent.py +0 -0
  33. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/robotframework/__init__.py +0 -0
  34. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/uiautomator/__init__.py +0 -0
  35. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/uiautomator/utils.py +0 -0
  36. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/com/dtmilano/android/window.py +0 -0
  37. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/share/__init__.py +0 -0
  38. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/share/pixmaps/__init__.py +0 -0
  39. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/share/pixmaps/culebra.png +0 -0
  40. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/share/pixmaps/plugins/__init__.py +0 -0
  41. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/share/pixmaps/plugins/android/__init__.py +0 -0
  42. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/share/pixmaps/plugins/android/lib/__init__.py +0 -0
  43. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/share/pixmaps/plugins/android/lib/device-art-resources/__init__.py +0 -0
  44. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/share/pixmaps/plugins/android/lib/device-art-resources/samsung_s4/__init__.py +0 -0
  45. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/share/pixmaps/plugins/android/lib/device-art-resources/samsung_s4/port_back.png +0 -0
  46. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/share/pixmaps/plugins/android/lib/device-art-resources/samsung_s4/port_fore.png +0 -0
  47. {androidviewclient-23.4.1 → androidviewclient-24.1.0}/src/share/pixmaps/plugins/android/lib/device-art-resources/samsung_s4/port_shadow.png +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: androidviewclient
3
- Version: 23.4.1
3
+ Version: 24.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
@@ -15,4 +15,4 @@ Requires-Dist: setuptools
15
15
  Requires-Dist: requests
16
16
  Requires-Dist: numpy
17
17
  Requires-Dist: matplotlib
18
- Requires-Dist: culebratester-client>=2.0.70
18
+ Requires-Dist: culebratester-client>=2.0.73
@@ -3,7 +3,7 @@
3
3
  from setuptools import setup, find_packages
4
4
 
5
5
  setup(name='androidviewclient',
6
- version='23.4.1',
6
+ version='24.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
@@ -22,5 +22,5 @@ setup(name='androidviewclient',
22
22
  classifiers=['Development Status :: 5 - Production/Stable',
23
23
  'Intended Audience :: Developers',
24
24
  'License :: OSI Approved :: Apache Software License'],
25
- install_requires=['setuptools', 'requests', 'numpy', 'matplotlib', 'culebratester-client >= 2.0.70'],
25
+ install_requires=['setuptools', 'requests', 'numpy', 'matplotlib', 'culebratester-client >= 2.0.73'],
26
26
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: androidviewclient
3
- Version: 23.4.1
3
+ Version: 24.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
@@ -15,4 +15,4 @@ Requires-Dist: setuptools
15
15
  Requires-Dist: requests
16
16
  Requires-Dist: numpy
17
17
  Requires-Dist: matplotlib
18
- Requires-Dist: culebratester-client>=2.0.70
18
+ Requires-Dist: culebratester-client>=2.0.73
@@ -2,4 +2,4 @@ setuptools
2
2
  requests
3
3
  numpy
4
4
  matplotlib
5
- culebratester-client>=2.0.70
5
+ culebratester-client>=2.0.73
@@ -27,7 +27,7 @@ from typing import Optional
27
27
 
28
28
  from com.dtmilano.android.adb.dumpsys import Dumpsys
29
29
 
30
- __version__ = '23.4.1'
30
+ __version__ = '24.1.0'
31
31
 
32
32
  import sys
33
33
  import warnings
@@ -23,7 +23,7 @@ import re
23
23
  import sys
24
24
  from _warnings import warn
25
25
 
26
- __version__ = '23.4.1'
26
+ __version__ = '24.1.0'
27
27
 
28
28
  DEBUG = False
29
29
 
@@ -3,7 +3,7 @@ import textwrap
3
3
  from abc import ABC
4
4
  from datetime import date
5
5
 
6
- __version__ = '23.4.1'
6
+ __version__ = '24.1.0'
7
7
 
8
8
  from typing import TextIO, Union, Dict, List
9
9
 
@@ -20,7 +20,7 @@ limitations under the License.
20
20
 
21
21
  from __future__ import print_function
22
22
 
23
- __version__ = '23.4.1'
23
+ __version__ = '24.1.0'
24
24
 
25
25
  import ast
26
26
  import os
@@ -22,7 +22,7 @@ import json
22
22
  import random
23
23
 
24
24
  __author__ = 'diego'
25
- __version__ = '23.4.1'
25
+ __version__ = '24.1.0'
26
26
 
27
27
  DEBUG = True
28
28
 
@@ -20,7 +20,7 @@
20
20
  '''
21
21
  import platform
22
22
 
23
- __version__ = '23.4.1'
23
+ __version__ = '24.1.0'
24
24
 
25
25
  import tkinter
26
26
  import tkinter.ttk
@@ -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__ = '23.4.1'
41
+ __version__ = '24.1.0'
42
42
 
43
43
  import sys
44
44
  import threading
@@ -412,7 +412,7 @@ This is usually installed by python package. Check your distribution details.
412
412
  if self.scale != 1:
413
413
  scaledWidth = int(width * self.scale)
414
414
  scaledHeight = int(height * self.scale)
415
- self.image = self.image.resize((scaledWidth, scaledHeight), PIL.Image.ANTIALIAS)
415
+ self.image = self.image.resize((scaledWidth, scaledHeight), PIL.Image.LANCZOS)
416
416
  (width, height) = self.image.size
417
417
  if self.isDarwin and 14 < self.sdkVersion < 23:
418
418
  if sys.version_info[0] < 3:
@@ -31,7 +31,7 @@ from mpl_toolkits.axes_grid1 import host_subplot
31
31
 
32
32
  from com.dtmilano.android.adb.dumpsys import Dumpsys
33
33
 
34
- __version__ = '23.4.1'
34
+ __version__ = '24.1.0'
35
35
 
36
36
  DEBUG = False
37
37
 
@@ -18,7 +18,7 @@ limitations under the License.
18
18
  @author: Diego Torres Milano
19
19
  '''
20
20
 
21
- __version__ = '23.4.1'
21
+ __version__ = '24.1.0'
22
22
  __author__ = 'diego'
23
23
 
24
24
  import sys
@@ -20,7 +20,7 @@ limitations under the License.
20
20
 
21
21
  from __future__ import print_function
22
22
 
23
- __version__ = '23.4.1'
23
+ __version__ = '24.1.0'
24
24
 
25
25
  import math
26
26
  import os
@@ -33,7 +33,7 @@ import time
33
33
  import warnings
34
34
  from abc import ABC
35
35
  from datetime import datetime
36
- from typing import Optional, List, Tuple
36
+ from typing import Optional, List, Tuple, Union
37
37
 
38
38
  import culebratester_client
39
39
  from culebratester_client import Text, ObjectRef, DefaultApi, Point, PerformTwoPointerGestureBody, \
@@ -259,9 +259,9 @@ class UiAutomatorHelper:
259
259
  self.uiAutomatorHelper = uiAutomatorHelper
260
260
 
261
261
  @staticmethod
262
- def intersection(l1: list, l2: list) -> list:
262
+ def intersection(l1: Union[list, tuple], l2: Union[list, tuple]) -> list:
263
263
  """
264
- Obtains the intersection between the two lists.
264
+ Obtains the intersection between the two lists or tuples.
265
265
 
266
266
  :param l1: list 1
267
267
  :type l1: list
@@ -272,7 +272,7 @@ class UiAutomatorHelper:
272
272
  """
273
273
  return list(set(l1) & set(l2))
274
274
 
275
- def some(self, l1: list, l2: list) -> bool:
275
+ def some(self, l1: Union[list, tuple], l2: Union[list, tuple]) -> bool:
276
276
  """
277
277
  Some elements are in both lists.
278
278
 
@@ -285,7 +285,7 @@ class UiAutomatorHelper:
285
285
  """
286
286
  return len(self.intersection(l1, l2)) > 0
287
287
 
288
- def all(self, l1: list, l2: list) -> bool:
288
+ def all(self, l1: Union[list, tuple], l2: Union[list, tuple]) -> bool:
289
289
  """
290
290
  All the elements are in both lists.
291
291
 
@@ -550,7 +550,7 @@ class UiAutomatorHelper:
550
550
  """
551
551
  if 'body' in kwargs:
552
552
  return self.uiAutomatorHelper.api_instance.ui_device_has_object_post(**kwargs).value
553
- if self.some(['resource_id', 'ui_selector', 'by_selector'], kwargs):
553
+ if self.some(('resource_id', 'ui_selector', 'by_selector'), tuple(kwargs.keys())):
554
554
  return self.uiAutomatorHelper.api_instance.ui_device_has_object_get(**kwargs).value
555
555
  body = culebratester_client.Selector(**kwargs)
556
556
  return self.uiAutomatorHelper.api_instance.ui_device_has_object_post(body=body).value
@@ -611,7 +611,7 @@ class UiAutomatorHelper:
611
611
  :param kwargs:
612
612
  :return:
613
613
  """
614
- if self.all(['start_x', 'start_y', 'end_x', 'end_y', 'steps'], kwargs):
614
+ if self.all(('start_x', 'start_y', 'end_x', 'end_y', 'steps'), tuple(kwargs.keys())):
615
615
  check_response(self.uiAutomatorHelper.api_instance.ui_device_swipe_get(**kwargs))
616
616
  return
617
617
  if 'segments' in kwargs:
@@ -757,11 +757,41 @@ class UiAutomatorHelper:
757
757
  rect: Rect = self.uiAutomatorHelper.api_instance.ui_object_oid_get_bounds_get(oid=oid)
758
758
  return rect.left, rect.top, rect.right, rect.bottom
759
759
 
760
+ def get_child(self, oid: int, ui_selector: str) -> ObjectRef:
761
+ """
762
+ Creates a new UiObject for a child view that is under the present UiObject.
763
+ :see https://github.com/dtmilano/CulebraTester2-public/blob/master/openapi.yaml
764
+
765
+ :param oid: The oid
766
+ :type oid: int
767
+ :param ui_selector:
768
+ :type ui_selector:
769
+ :return:
770
+ :rtype: ObjectRef
771
+ """
772
+ return self.uiAutomatorHelper.api_instance.ui_object_oid_get_child(oid, ui_selector=ui_selector)
773
+
774
+ def get_from_parent(self, oid: int, ui_selector: str) -> ObjectRef:
775
+ """
776
+ Creates a new UiObject for a sibling view or a child of the sibling view, relative to the present UiObject.
777
+ :see https://github.com/dtmilano/CulebraTester2-public/blob/master/openapi.yaml
778
+
779
+ :param oid: The oid
780
+ :type oid: int
781
+ :param ui_selector:
782
+ :type ui_selector:
783
+ :return:
784
+ :rtype: ObjectRef
785
+ """
786
+ return self.uiAutomatorHelper.api_instance.ui_object_oid_get_from_parent_get(oid,
787
+ ui_selector=ui_selector)
788
+
760
789
  def perform_two_pointer_gesture(self, oid: int, startPoint1: Tuple[int, int], startPoint2: Tuple[int, int],
761
790
  endPoint1: Tuple[int, int], endPoint2: Tuple[int, int], steps: int) -> None:
762
791
  """
763
792
  Generates a two-pointer gesture with arbitrary starting and ending points.
764
793
  :see https://github.com/dtmilano/CulebraTester2-public/blob/master/openapi.yaml
794
+
765
795
  :param oid: the oid
766
796
  :param startPoint1:
767
797
  :param startPoint2:
@@ -26,7 +26,7 @@ from typing import Optional, Union, Dict, Tuple
26
26
  import culebratester_client
27
27
  from culebratester_client import WindowHierarchyChild, WindowHierarchy
28
28
 
29
- __version__ = '23.4.1'
29
+ __version__ = '24.1.0'
30
30
 
31
31
  import sys
32
32
  import warnings
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env python3
2
2
  # -*- coding: utf-8 -*-
3
- """
3
+ r"""
4
4
  Copyright (C) 2013-2023 Diego Torres Milano
5
5
  Created on Mar 28, 2013
6
6
 
@@ -28,7 +28,7 @@ from typing import Pattern
28
28
  import culebratester_client
29
29
  from culebratester_client import WindowHierarchy, Selector
30
30
 
31
- __version__ = '23.4.1'
31
+ __version__ = '24.1.0'
32
32
 
33
33
  import calendar
34
34
  import codecs
@@ -1295,7 +1295,7 @@ def getWindowOption():
1295
1295
 
1296
1296
 
1297
1297
  def printScriptHeader():
1298
- print(f'''{getShebangJar()}
1298
+ print(rf'''{getShebangJar()}
1299
1299
  # -*- coding: utf-8 -*-
1300
1300
  """
1301
1301
  Copyright (C) 2013-2023 Diego Torres Milano
@@ -8,7 +8,7 @@ Created on Feb 3, 2012
8
8
 
9
9
  from __future__ import print_function
10
10
 
11
- __version__ = '23.4.1'
11
+ __version__ = '24.1.0'
12
12
 
13
13
  import getopt
14
14
  import os