In [1]:
import atx
from atx.ext.report import Report

In [2]:
d = atx.connect('http://127.0.0.1:8100')
d.status()


Out[2]:
{u'build': {u'time': u'Aug 24 2016 16:14:32'},
 u'ios': {u'simulatorVersion': u'9.3.2'},
 u'os': {u'name': u'iPhone OS', u'version': u'9.3.2'},
 u'state': u'success'}

In [5]:
d.start_app('com.supercell.magic')


Out[5]:
<wda.Session at 0x10c6f5890>

In [6]:
d.rotation


Out[6]:
1

In [7]:
rp = Report(d)
rp.patch_wda()

In [8]:
d.display
print d.display
min(d._session.window_size())
#d.click(100, 100)


Display(width=640, height=1136)
Out[8]:
320

In [9]:
d.click_image('train.2208x1242.png')


2016-08-24 16:20:57.908 INFO  [atx.drivers.mixin: 598] click image: Pattern(name: ./train.2208x1242.png, offset: None)

Out[9]:
FindPoint(pos=(46, 465), confidence=0.9747188091278076, method='template', matched=True)

In [10]:
d.click_image('left.2208x1242.L170T6.png')


2016-08-24 16:21:03.833 INFO  [atx.drivers.mixin: 598] click image: Pattern(name: ./left.2208x1242.L170T6.png, offset: (-1.7, -0.06))

Out[10]:
FindPoint(pos=(135, 297), confidence=0.94251549243927, method='template', matched=True)

In [8]:
d.click_image('left.2208x1242.L170T6.png')


2016-08-24 15:08:19.753 INFO  [atx.drivers.mixin: 598] click image: Pattern(name: ./left.2208x1242.L170T6.png, offset: (-1.7, -0.06))

Out[8]:
FindPoint(pos=(135, 296), confidence=0.9492990374565125, method='template', matched=True)

In [9]:
d.click_image('girl.2208x1242.png')


2016-08-24 15:08:23.173 INFO  [atx.drivers.mixin: 598] click image: Pattern(name: ./girl.2208x1242.png, offset: None)

Out[9]:
FindPoint(pos=(365, 322), confidence=0.9324912428855896, method='template', matched=True)

In [10]:
d.click_image('exit.2208x1242.png')


2016-08-24 15:08:26.071 INFO  [atx.drivers.mixin: 598] click image: Pattern(name: ./exit.2208x1242.png, offset: None)

Out[10]:
FindPoint(pos=(947, 39), confidence=0.9356588125228882, method='template', matched=True)

In [44]:
d.stop_app()

In [11]:
rp.close()

In [12]:
d._session.orientation


Out[12]:
u'PORTRAIT'

In [ ]: