Skip to content

Commit 7c5be06

Browse files
committed
Robotframework wrapper moved to its own package
- Version 11.0.0
1 parent b6f3a05 commit 7c5be06

11 files changed

Lines changed: 58 additions & 16 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from setuptools import setup, find_packages
44

55
setup(name='androidviewclient',
6-
version='10.8.2',
6+
version='11.0.0',
77
description='''AndroidViewClient is a 100% pure python library and tools
88
that simplifies test script creation providing higher level
99
operations and the ability of obtaining the tree of Views present at

src/com/dtmilano/android/adb/adbclient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
'''
1919
import threading
2020

21-
__version__ = '10.8.2'
21+
__version__ = '11.0.0'
2222

2323
import sys
2424
import warnings

src/com/dtmilano/android/concertina.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import time
2626

2727
__author__ = 'diego'
28-
__version__ = '10.8.2'
28+
__version__ = '11.0.0'
2929

3030
DEBUG = True
3131

src/com/dtmilano/android/controlpanel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
@author: Ahmed Kasem
2020
'''
2121

22-
__version__ = '10.8.2'
22+
__version__ = '11.0.0'
2323

2424
import sys, os
2525
import Tkinter, tkFileDialog, ttk

src/com/dtmilano/android/culebron.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from com.dtmilano.android.common import profileEnd
2626
from com.dtmilano.android.concertina import Concertina
2727

28-
__version__ = '10.8.2'
28+
__version__ = '11.0.0'
2929

3030
import sys
3131
import threading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__author__ = 'diego'

src/com/dtmilano/android/viewclientwrapper.py renamed to src/com/dtmilano/android/robotframework/viewclientwrapper.py

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@author: Diego Torres Milano
1919
'''
2020

21-
__version__ = '10.9.1'
21+
__version__ = '11.0.0'
2222
__author__ = 'diego'
2323

2424
import sys
@@ -38,20 +38,61 @@
3838
class ViewClientWrapper:
3939
def __init__(self, serialno):
4040
device, serialno = ViewClient.connectToDeviceOrExit(serialno=serialno)
41-
self.viewClient = ViewClient(device, serialno)
41+
self.vc = ViewClient(device, serialno)
42+
self.device = device
4243
if DEBUG:
4344
print >> sys.stderr, "ViewClientWrapper: connected to", device, serialno
4445

4546
def dump(self):
4647
"""Dumps window hierarchy."""
47-
return self.viewClient.dump()
48+
return self.vc.dump()
49+
50+
def touch(self, x, y):
51+
"""Touches a point.
52+
53+
:param x: x
54+
:param y: y
55+
:return:
56+
"""
57+
return self.vc.touch(x, y)
58+
59+
@staticmethod
60+
def long_touch_view(view):
61+
"""Long-touches the view."""
62+
return view.longTouch()
63+
64+
@staticmethod
65+
def touch_view(view):
66+
"""Touches the View"""
67+
return view.touch()
68+
69+
@staticmethod
70+
def get_view_position_and_size(view):
71+
""" Gets the View position and size
72+
:param view: the View
73+
:return: the position and size
74+
"""
75+
return view.getPositionAndSize()
76+
77+
def find_view_with_text(self, text):
78+
return self.vc.findViewWithText(text)
79+
80+
def find_view_by_id(self, id):
81+
return self.vc.findViewById(id)
4882

4983
def start_activity(self, component):
5084
"""Starts Activity."""
51-
return self.viewClient.device.startActivity(component)
85+
return self.vc.device.startActivity(component)
86+
87+
def get_top_activity_name(self):
88+
return self.device.getTopActivityName()
89+
90+
def force_stop_package(self, package):
91+
self.device.shell('am force-stop %s' % package)
5292

53-
def long_touch_button(self, text):
54-
"""Long-touches the button."""
55-
self.viewClient.findViewWithTextOrRaise(text).longTouch()
93+
def get_windows(self):
94+
return self.device.getWindows()
5695

96+
def is_keyboard_show(self):
97+
return self.device.isKeyboardShown()
5798

src/com/dtmilano/android/uiautomator/uiautomatorhelper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@author: Diego Torres Milano
1919
'''
2020

21-
__version__ = '10.8.2'
21+
__version__ = '11.0.0'
2222

2323
import os
2424
import subprocess

src/com/dtmilano/android/viewclient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@author: Diego Torres Milano
1919
'''
2020

21-
__version__ = '10.9.0'
21+
__version__ = '11.0.0'
2222

2323
import sys
2424
import warnings

tools/culebra

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ___________________/ /__/ /__/ /__/ /________________________________
2020
2121
'''
2222

23-
__version__ = '10.9.2'
23+
__version__ = '11.0.0'
2424

2525
import re
2626
import sys

0 commit comments

Comments
 (0)