File tree Expand file tree Collapse file tree
src/com/dtmilano/android/adb Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33from setuptools import setup , find_packages
44
55setup (name = 'androidviewclient' ,
6- version = '4.6.1 ' ,
6+ version = '4.7.0 ' ,
77 description = '''AndroidViewClient is a 100% pure python tool that
88 simplifies test script creation providing higher level operations and the ability of
99 obtaining the tree of Views present at any given moment on the device or emulator screen.
Original file line number Diff line number Diff line change 1717@author: Diego Torres Milano
1818'''
1919
20- __version__ = '4.6.1 '
20+ __version__ = '4.7.0 '
2121
2222import sys
2323import warnings
@@ -380,7 +380,7 @@ def type(self, text):
380380 self .shell (u'input text "%s"' % text )
381381
382382 def wake (self ):
383- self .shell ('input keyevent 26 ' )
383+ self .shell ('input keyevent POWER ' )
384384
385385 def isLocked (self ):
386386 '''
@@ -395,6 +395,13 @@ def isLocked(self):
395395 return (m .group (1 ) == 'true' )
396396 raise RuntimeError ("Couldn't determine screen lock state" )
397397
398+ def unlock (self ):
399+ '''
400+ Unlocks the screen of the device.
401+ '''
402+
403+ self .shell ('input keyevent MENU' )
404+ self .shell ('input keyevent BACK' )
398405
399406 @staticmethod
400407 def percentSame (image1 , image2 ):
You can’t perform that action at this time.
0 commit comments