-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added startviewserver argument to ViewClient
- Start the server if specified - Eat optional command line arguments - Added UML
- Loading branch information
Showing
5 changed files
with
56 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,7 @@ | |
# vi files # | ||
############ | ||
.*.swp | ||
|
||
# other files # | ||
########## | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
AndroidViewClient/examples/viewserveractivity-new-activity.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#! /usr/bin/env monkeyrunner | ||
''' | ||
Copyright (C) 2012 Diego Torres Milano | ||
Created on Feb 3, 2012 | ||
@author: diego | ||
''' | ||
|
||
|
||
import sys | ||
import os | ||
|
||
# This must be imported before MonkeyRunner and MonkeyDevice, | ||
# otherwise the import fails. | ||
# PyDev sets PYTHONPATH, use it | ||
try: | ||
for p in os.environ['PYTHONPATH'].split(':'): | ||
if not p in sys.path: | ||
sys.path.append(p) | ||
except: | ||
pass | ||
|
||
try: | ||
sys.path.append(os.path.join(os.environ['ANDROID_VIEW_CLIENT_HOME'], 'src')) | ||
except: | ||
pass | ||
|
||
from com.dtmilano.android.viewclient import ViewClient | ||
|
||
device, serialno = ViewClient.connectToDeviceOrExit(ignoresecuredevice=True) | ||
vc = ViewClient(device=device, serialno=serialno, startviewserver=False) | ||
vc.findViewWithTextOrRaise("New activity").touch() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.