androidviewclient 23.3.0__tar.gz → 23.4.1__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.3.0/src/androidviewclient.egg-info → androidviewclient-23.4.1}/PKG-INFO +1 -1
  2. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/setup.py +1 -1
  3. {androidviewclient-23.3.0 → androidviewclient-23.4.1/src/androidviewclient.egg-info}/PKG-INFO +1 -1
  4. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/adb/adbclient.py +14 -14
  5. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/adb/dumpsys.py +3 -3
  6. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/code_generator.py +1 -1
  7. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/common.py +1 -1
  8. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/concertina.py +1 -1
  9. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/controlpanel.py +1 -1
  10. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/culebron.py +1 -1
  11. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/plot.py +1 -1
  12. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/robotframework/viewclientwrapper.py +1 -1
  13. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/uiautomator/uiautomatorhelper.py +1 -1
  14. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/viewclient.py +17 -17
  15. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/tools/culebra +1 -1
  16. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/tools/dump +1 -1
  17. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/LICENSE +0 -0
  18. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/README.md +0 -0
  19. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/setup.cfg +0 -0
  20. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/androidviewclient.egg-info/SOURCES.txt +0 -0
  21. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/androidviewclient.egg-info/dependency_links.txt +0 -0
  22. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/androidviewclient.egg-info/requires.txt +0 -0
  23. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/androidviewclient.egg-info/top_level.txt +0 -0
  24. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/__init__.py +0 -0
  25. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/__init__.py +0 -0
  26. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/__init__.py +0 -0
  27. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/adb/__init__.py +0 -0
  28. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/adb/androidkeymap.py +0 -0
  29. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/distance.py +0 -0
  30. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/kato/__init__.py +0 -0
  31. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/kato/kato.py +0 -0
  32. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/keyevent.py +0 -0
  33. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/robotframework/__init__.py +0 -0
  34. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/uiautomator/__init__.py +0 -0
  35. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/uiautomator/utils.py +0 -0
  36. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/com/dtmilano/android/window.py +0 -0
  37. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/share/__init__.py +0 -0
  38. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/share/pixmaps/__init__.py +0 -0
  39. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/share/pixmaps/culebra.png +0 -0
  40. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/share/pixmaps/plugins/__init__.py +0 -0
  41. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/share/pixmaps/plugins/android/__init__.py +0 -0
  42. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/share/pixmaps/plugins/android/lib/__init__.py +0 -0
  43. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/share/pixmaps/plugins/android/lib/device-art-resources/__init__.py +0 -0
  44. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/share/pixmaps/plugins/android/lib/device-art-resources/samsung_s4/__init__.py +0 -0
  45. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/share/pixmaps/plugins/android/lib/device-art-resources/samsung_s4/port_back.png +0 -0
  46. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/src/share/pixmaps/plugins/android/lib/device-art-resources/samsung_s4/port_fore.png +0 -0
  47. {androidviewclient-23.3.0 → androidviewclient-23.4.1}/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.3.0
3
+ Version: 23.4.1
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
@@ -3,7 +3,7 @@
3
3
  from setuptools import setup, find_packages
4
4
 
5
5
  setup(name='androidviewclient',
6
- version='23.3.0',
6
+ version='23.4.1',
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: androidviewclient
3
- Version: 23.3.0
3
+ Version: 23.4.1
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
@@ -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.3.0'
30
+ __version__ = '23.4.1'
31
31
 
32
32
  import sys
33
33
  import warnings
@@ -614,7 +614,7 @@ class AdbClient:
614
614
  def getRestrictedScreen(self):
615
615
  ''' Gets C{mRestrictedScreen} values from dumpsys. This is a method to obtain display dimensions '''
616
616
 
617
- rsRE = re.compile('\s*mRestrictedScreen=\((?P<x>\d+),(?P<y>\d+)\) (?P<w>\d+)x(?P<h>\d+)')
617
+ rsRE = re.compile(r'\s*mRestrictedScreen=\((?P<x>\d+),(?P<y>\d+)\) (?P<w>\d+)x(?P<h>\d+)')
618
618
  for line in self.shell('dumpsys window').splitlines():
619
619
  m = rsRE.match(line)
620
620
  if m:
@@ -670,7 +670,7 @@ class AdbClient:
670
670
  ''' Gets C{mPhysicalDisplayInfo} values from dumpsys. This is a method to obtain display dimensions and density'''
671
671
 
672
672
  self.__checkTransport()
673
- phyDispRE = re.compile('Physical size: (?P<width>\d+)x(?P<height>\d+).*Physical density: (?P<density>\d+)',
673
+ phyDispRE = re.compile(r'Physical size: (?P<width>\d+)x(?P<height>\d+).*Physical density: (?P<density>\d+)',
674
674
  re.DOTALL)
675
675
  m = phyDispRE.search(self.shell('wm size; wm density'))
676
676
  if m:
@@ -682,7 +682,7 @@ class AdbClient:
682
682
  return displayInfo
683
683
 
684
684
  phyDispRE = re.compile(
685
- '.*PhysicalDisplayInfo{(?P<width>\d+) x (?P<height>\d+), .*, density (?P<density>[\d.]+).*')
685
+ r'.*PhysicalDisplayInfo{(?P<width>\d+) x (?P<height>\d+), .*, density (?P<density>[\d.]+).*')
686
686
  for line in self.shell('dumpsys display').splitlines():
687
687
  m = phyDispRE.search(line, 0)
688
688
  if m:
@@ -695,9 +695,9 @@ class AdbClient:
695
695
  return displayInfo
696
696
 
697
697
  # This could also be mSystem or mOverscanScreen
698
- phyDispRE = re.compile('\s*mUnrestrictedScreen=\((?P<x>\d+),(?P<y>\d+)\) (?P<width>\d+)x(?P<height>\d+)')
698
+ phyDispRE = re.compile(r'\s*mUnrestrictedScreen=\((?P<x>\d+),(?P<y>\d+)\) (?P<width>\d+)x(?P<height>\d+)')
699
699
  # This is known to work on older versions (i.e. API 10) where mrestrictedScreen is not available
700
- dispWHRE = re.compile('\s*DisplayWidth=(?P<width>\d+) *DisplayHeight=(?P<height>\d+)')
700
+ dispWHRE = re.compile(r'\s*DisplayWidth=(?P<width>\d+) *DisplayHeight=(?P<height>\d+)')
701
701
  for line in self.shell('dumpsys window').splitlines():
702
702
  m = phyDispRE.search(line, 0)
703
703
  if not m:
@@ -743,7 +743,7 @@ class AdbClient:
743
743
  return displayInfo['orientation']
744
744
  # Fallback method to obtain the orientation
745
745
  # See https://github.com/dtmilano/AndroidViewClient/issues/128
746
- surfaceOrientationRE = re.compile('SurfaceOrientation:\s+(\d+)')
746
+ surfaceOrientationRE = re.compile(r'SurfaceOrientation:\s+(\d+)')
747
747
  output = self.shell('dumpsys input')
748
748
  m = surfaceOrientationRE.search(output)
749
749
  if m:
@@ -1338,21 +1338,21 @@ class AdbClient:
1338
1338
  dww = self.shell('dumpsys window windows')
1339
1339
  if DEBUG_WINDOWS: print(dww, file=sys.stderr)
1340
1340
  lines = dww.splitlines()
1341
- widRE = re.compile('^ *Window #%s Window\{%s (u\d+ )?%s?.*\}:' %
1341
+ widRE = re.compile(r'^ *Window #%s Window\{%s (u\d+ )?%s?.*\}:' %
1342
1342
  (_nd('num'), _nh('winId'), _ns('activity', greedy=True)))
1343
- currentFocusRE = re.compile('^ mCurrentFocus=Window\{%s .*' % _nh('winId'))
1343
+ currentFocusRE = re.compile(r'^ mCurrentFocus=Window\{%s .*' % _nh('winId'))
1344
1344
  viewVisibilityRE = re.compile(' mViewVisibility=0x%s ' % _nh('visibility'))
1345
1345
  # This is for 4.0.4 API-15
1346
- containingFrameRE = re.compile('^ *mContainingFrame=\[%s,%s\]\[%s,%s\] mParentFrame=\[%s,%s\]\[%s,%s\]' %
1346
+ containingFrameRE = re.compile(r'^ *mContainingFrame=\[%s,%s\]\[%s,%s\] mParentFrame=\[%s,%s\]\[%s,%s\]' %
1347
1347
  (_nd('cx'), _nd('cy'), _nd('cw'), _nd('ch'), _nd('px'), _nd('py'), _nd('pw'),
1348
1348
  _nd('ph')))
1349
- contentFrameRE = re.compile('^ *mContentFrame=\[%s,%s\]\[%s,%s\] mVisibleFrame=\[%s,%s\]\[%s,%s\]' %
1349
+ contentFrameRE = re.compile(r'^ *mContentFrame=\[%s,%s\]\[%s,%s\] mVisibleFrame=\[%s,%s\]\[%s,%s\]' %
1350
1350
  (_nd('x'), _nd('y'), _nd('w'), _nd('h'), _nd('vx'), _nd('vy'), _nd('vx1'),
1351
1351
  _nd('vy1')))
1352
1352
  # This is for 4.1 API-16
1353
- framesRE = re.compile('^ *Frames: containing=\[%s,%s\]\[%s,%s\] parent=\[%s,%s\]\[%s,%s\]' %
1353
+ framesRE = re.compile(r'^ *Frames: containing=\[%s,%s\]\[%s,%s\] parent=\[%s,%s\]\[%s,%s\]' %
1354
1354
  (_nd('cx'), _nd('cy'), _nd('cw'), _nd('ch'), _nd('px'), _nd('py'), _nd('pw'), _nd('ph')))
1355
- contentRE = re.compile('^ *content=\[%s,%s\]\[%s,%s\] visible=\[%s,%s\]\[%s,%s\]' %
1355
+ contentRE = re.compile(r'^ *content=\[%s,%s\]\[%s,%s\] visible=\[%s,%s\]\[%s,%s\]' %
1356
1356
  (_nd('x'), _nd('y'), _nd('w'), _nd('h'), _nd('vx'), _nd('vy'), _nd('vx1'), _nd('vy1')))
1357
1357
  policyVisibilityRE = re.compile('mPolicyVisibility=%s ' % _ns('policyVisibility', greedy=True))
1358
1358
 
@@ -1463,7 +1463,7 @@ class AdbClient:
1463
1463
 
1464
1464
  def getTopActivityNameAndPid(self):
1465
1465
  dat = self.shell('dumpsys activity top')
1466
- activityRE = re.compile('\s*ACTIVITY ([A-Za-z0-9_.]+)/([A-Za-z0-9_.\$]+) \w+ pid=(\d+)')
1466
+ activityRE = re.compile(r'\s*ACTIVITY ([A-Za-z0-9_.]+)/([A-Za-z0-9_.\$]+) \w+ pid=(\d+)')
1467
1467
  m = activityRE.findall(dat)
1468
1468
  if len(m) > 0:
1469
1469
  return m[-1]
@@ -23,7 +23,7 @@ import re
23
23
  import sys
24
24
  from _warnings import warn
25
25
 
26
- __version__ = '23.3.0'
26
+ __version__ = '23.4.1'
27
27
 
28
28
  DEBUG = False
29
29
 
@@ -41,8 +41,8 @@ class Dumpsys:
41
41
  VIEWS = 'views'
42
42
 
43
43
  FLAGS = 0
44
- INTENDED_VSYNC = 1
45
- FRAME_COMPLETED = 13
44
+ INTENDED_VSYNC = 2
45
+ FRAME_COMPLETED = 16
46
46
 
47
47
  def __init__(self, adbclient, subcommand, *args):
48
48
  self.out = None
@@ -3,7 +3,7 @@ import textwrap
3
3
  from abc import ABC
4
4
  from datetime import date
5
5
 
6
- __version__ = '23.3.0'
6
+ __version__ = '23.4.1'
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.3.0'
23
+ __version__ = '23.4.1'
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.3.0'
25
+ __version__ = '23.4.1'
26
26
 
27
27
  DEBUG = True
28
28
 
@@ -20,7 +20,7 @@
20
20
  '''
21
21
  import platform
22
22
 
23
- __version__ = '23.3.0'
23
+ __version__ = '23.4.1'
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.3.0'
41
+ __version__ = '23.4.1'
42
42
 
43
43
  import sys
44
44
  import threading
@@ -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.3.0'
34
+ __version__ = '23.4.1'
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.3.0'
21
+ __version__ = '23.4.1'
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.3.0'
23
+ __version__ = '23.4.1'
24
24
 
25
25
  import math
26
26
  import os
@@ -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.3.0'
29
+ __version__ = '23.4.1'
30
30
 
31
31
  import sys
32
32
  import warnings
@@ -143,8 +143,8 @@ INVISIBLE = 0x4
143
143
  GONE = 0x8
144
144
 
145
145
  RegexType = type(re.compile(''))
146
- IP_RE = re.compile('^(\d{1,3}\.){3}\d{1,3}$')
147
- ID_RE = re.compile('id/([^/]*)(/(\d+))?')
146
+ IP_RE = re.compile(r'^(\d{1,3}\.){3}\d{1,3}$')
147
+ ID_RE = re.compile(r'id/([^/]*)(/(\d+))?')
148
148
  IP_DOMAIN_NAME_PORT_REGEX = r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|' \
149
149
  r'localhost|' \
150
150
  r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})' \
@@ -872,21 +872,21 @@ class View:
872
872
  dww = self.device.shell('dumpsys window windows')
873
873
  if DEBUG_WINDOWS or debug: print(dww, file=sys.stderr)
874
874
  lines = dww.splitlines()
875
- widRE = re.compile('^ *Window #%s Window\{%s (u\d+ )?%s?.*\}:' %
875
+ widRE = re.compile(r'^ *Window #%s Window\{%s (u\d+ )?%s?.*\}:' %
876
876
  (_nd('num'), _nh('winId'), _ns('activity', greedy=True)))
877
- currentFocusRE = re.compile('^ mCurrentFocus=Window\{%s .*' % _nh('winId'))
877
+ currentFocusRE = re.compile(r'^ mCurrentFocus=Window\{%s .*' % _nh('winId'))
878
878
  viewVisibilityRE = re.compile(' mViewVisibility=0x%s ' % _nh('visibility'))
879
879
  # This is for 4.0.4 API-15
880
- containingFrameRE = re.compile('^ *mContainingFrame=\[%s,%s\]\[%s,%s\] mParentFrame=\[%s,%s\]\[%s,%s\]' %
880
+ containingFrameRE = re.compile(r'^ *mContainingFrame=\[%s,%s\]\[%s,%s\] mParentFrame=\[%s,%s\]\[%s,%s\]' %
881
881
  (_nd('cx'), _nd('cy'), _nd('cw'), _nd('ch'), _nd('px'), _nd('py'), _nd('pw'),
882
882
  _nd('ph')))
883
- contentFrameRE = re.compile('^ *mContentFrame=\[%s,%s\]\[%s,%s\] mVisibleFrame=\[%s,%s\]\[%s,%s\]' %
883
+ contentFrameRE = re.compile(r'^ *mContentFrame=\[%s,%s\]\[%s,%s\] mVisibleFrame=\[%s,%s\]\[%s,%s\]' %
884
884
  (_nd('x'), _nd('y'), _nd('w'), _nd('h'), _nd('vx'), _nd('vy'), _nd('vx1'),
885
885
  _nd('vy1')))
886
886
  # This is for 4.1 API-16
887
- framesRE = re.compile('^ *Frames: containing=\[%s,%s\]\[%s,%s\] parent=\[%s,%s\]\[%s,%s\]' %
887
+ framesRE = re.compile(r'^ *Frames: containing=\[%s,%s\]\[%s,%s\] parent=\[%s,%s\]\[%s,%s\]' %
888
888
  (_nd('cx'), _nd('cy'), _nd('cw'), _nd('ch'), _nd('px'), _nd('py'), _nd('pw'), _nd('ph')))
889
- contentRE = re.compile('^ *content=\[%s,%s\]\[%s,%s\] visible=\[%s,%s\]\[%s,%s\]' %
889
+ contentRE = re.compile(r'^ *content=\[%s,%s\]\[%s,%s\] visible=\[%s,%s\]\[%s,%s\]' %
890
890
  (_nd('x'), _nd('y'), _nd('w'), _nd('h'), _nd('vx'), _nd('vy'), _nd('vx1'), _nd('vy1')))
891
891
  policyVisibilityRE = re.compile('mPolicyVisibility=%s ' % _ns('policyVisibility', greedy=True))
892
892
 
@@ -1237,7 +1237,7 @@ class View:
1237
1237
  # __str = str("View[", 'utf-8', 'replace')
1238
1238
  __str = "View["
1239
1239
  if "class" in self.map:
1240
- __str += " class=" + re.sub('.*\.', '', self.map['class'])
1240
+ __str += " class=" + re.sub(r'.*\.', '', self.map['class'])
1241
1241
  __str += " id=%s" % self.getId()
1242
1242
  __str += " ]"
1243
1243
 
@@ -2394,7 +2394,7 @@ class UiAutomator2AndroidViewClient():
2394
2394
  elif name == 'node':
2395
2395
  # Instantiate an Element object
2396
2396
  attributes['uniqueId'] = 'id/no_id/%d' % self.idCount
2397
- bounds = re.split('[\][,]', attributes['bounds'])
2397
+ bounds = re.split(r'[\][,]', attributes['bounds'])
2398
2398
  attributes['bounds'] = ((int(bounds[1]), int(bounds[2])), (int(bounds[4]), int(bounds[5])))
2399
2399
  if DEBUG_BOUNDS:
2400
2400
  print("bounds=", attributes['bounds'], file=sys.stderr)
@@ -3224,8 +3224,8 @@ class ViewClient:
3224
3224
  s2 = s1.replace(' ', WS)
3225
3225
  strArgs = strArgs.replace(s1, s2, 1)
3226
3226
 
3227
- idRE = re.compile("(?P<viewId>id/\S+)")
3228
- attrRE = re.compile('%s(?P<parens>\(\))?=%s,(?P<val>[^ ]*)' % (_ns('attr'), _nd('len')), flags=re.DOTALL)
3227
+ idRE = re.compile(r"(?P<viewId>id/\S+)")
3228
+ attrRE = re.compile(r'%s(?P<parens>\(\))?=%s,(?P<val>[^ ]*)' % (_ns('attr'), _nd('len')), flags=re.DOTALL)
3229
3229
  hashRE = re.compile('%s@%s' % (_ns('class'), _nh('oid')))
3230
3230
 
3231
3231
  attrs = {}
@@ -3269,7 +3269,7 @@ class ViewClient:
3269
3269
  # sometimes the view ids are not unique, so let's generate a unique id here
3270
3270
  i = 1
3271
3271
  while True:
3272
- newId = re.sub('/\d+$', '', viewId) + '/%d' % i
3272
+ newId = re.sub(r'/\d+$', '', viewId) + '/%d' % i
3273
3273
  if not newId in self.viewsById:
3274
3274
  break
3275
3275
  i += 1
@@ -3579,13 +3579,13 @@ class ViewClient:
3579
3579
  if self.ignoreUiAutomatorKilled:
3580
3580
  if DEBUG_RECEIVED:
3581
3581
  print("ignoring UiAutomator Killed", file=sys.stderr)
3582
- killedRE = re.compile('</hierarchy>[\n\S]*Killed', re.MULTILINE)
3582
+ killedRE = re.compile(r'</hierarchy>[\n\S]*Killed', re.MULTILINE)
3583
3583
  if killedRE.search(received):
3584
3584
  received = re.sub(killedRE, '</hierarchy>', received)
3585
3585
  elif DEBUG_RECEIVED:
3586
3586
  print("UiAutomator Killed: NOT FOUND!")
3587
3587
  # It seems that API18 uiautomator spits this message to stdout
3588
- dumpedToDevTtyRE = re.compile('</hierarchy>[\n\S]*UI hierchary dumped to: /dev/tty.*', re.MULTILINE)
3588
+ dumpedToDevTtyRE = re.compile(r'</hierarchy>[\n\S]*UI hierchary dumped to: /dev/tty.*', re.MULTILINE)
3589
3589
  if dumpedToDevTtyRE.search(received):
3590
3590
  received = re.sub(dumpedToDevTtyRE, '</hierarchy>', received)
3591
3591
  if DEBUG_RECEIVED:
@@ -3595,7 +3595,7 @@ class ViewClient:
3595
3595
  received = received.replace(
3596
3596
  'WARNING: linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.\r\n',
3597
3597
  '')
3598
- if re.search('\[: not found', received):
3598
+ if re.search(r'\[: not found', received):
3599
3599
  raise RuntimeError('''ERROR: Some emulator images (i.e. android 4.1.2 API 16 generic_x86) does not include the '[' command.
3600
3600
  While UiAutomator back-end might be supported 'uiautomator' command fails.
3601
3601
  You should force ViewServer back-end.''')
@@ -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.3.0'
31
+ __version__ = '23.4.1'
32
32
 
33
33
  import calendar
34
34
  import codecs
@@ -8,7 +8,7 @@ Created on Feb 3, 2012
8
8
 
9
9
  from __future__ import print_function
10
10
 
11
- __version__ = '23.3.0'
11
+ __version__ = '23.4.1'
12
12
 
13
13
  import getopt
14
14
  import os