Skip to content

Commit 7659721

Browse files
committed
Merge pull request dtmilano#182 from steve-the-edwards/master
hasAttr check and Updated README
2 parents c23a7a4 + 971667d commit 7659721

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
AndroidViewClient
22
=================
33
<a href="#"><img src="https://github.com/dtmilano/AndroidViewClient/wiki/images/culebra-logo-transparent-204x209-rb-border.png" align="left" hspace="0" vspace="6"></a>
4-
**AndroidViewClient** is ~~an extension to [monkeyrunner](http://developer.android.com/tools/help/monkeyrunner_concepts.html)~~ a 100% pure python tool that automates or simplifies test script creation providing higher level operations and the ability of obtaining the tree of Views present at any given moment on the device or emulator screen.
4+
**AndroidViewClient** is a test framework for Android applications that:
5+
<ul>
6+
<li>Automates driving Android applications</li>
7+
<li><b>Generates</b> re-usable scripts</li>
8+
<li>Provides view-based <i>device independent</i> UI interaction</li>
9+
<li>Uses 'logical' screen comparison (UI Automator Hierarchy based) over image comparison (Avoiding extraneous
10+
detail issues, such as time or data changes)</li>
11+
<li>Supports running on multiple devices</li>
12+
<li>Provides simple control for high level operations like language change and activity start</li>
13+
<li>Supports all Android APIs</li>
14+
<li>Is written in python</li>
15+
</ul>
516

617
[![Downloads](https://img.shields.io/pypi/dm/androidviewclient.svg)](https://pypi.python.org/pypi/androidviewclient/)
718
[![Latest Version](https://img.shields.io/pypi/v/androidviewclient.svg)](https://pypi.python.org/pypi/androidviewclient/)

src/com/dtmilano/android/viewclient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2556,7 +2556,7 @@ def __init__(self, device, serialno, adb=None, autodump=True, forceviewserveruse
25562556

25572557
def __del__(self):
25582558
# should clean up some things
2559-
if self.uiAutomatorHelper:
2559+
if hasattr(self, 'uiAutomatorHelper') and self.uiAutomatorHelper:
25602560
if DEBUG or True:
25612561
print >> sys.stderr, "Stopping UiAutomatorHelper..."
25622562
self.uiAutomatorHelper.quit()

tests/com/dtmilano/android/uiautomator/uiautomatorhelpertests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def testTakeScreenshot(self):
6161
def testClick_random(self):
6262
x = random.randint(0, 1000)
6363
y = random.randint(0, 1000)
64-
response = self.uiAutomatorHelper.click(x, y)
64+
response = self.uiAutomatorHelper.click(x=x, y=y)
6565
if DEBUG:
6666
print >> sys.stderr, "response=", response
6767

0 commit comments

Comments
 (0)