1

I am new to culebra and i have run into some issues.

Firstly the document states that i should use

culebra -G to start the GUI. however, i am using python culebra -G else it will not recognize as a valid command.

Secondly upon starting the command, i get this exception after a while.

C:\Users\User\AppData\Local\Android\sdk\platform-tools>python culebra -G
C:\Python27\lib\site-packages\androidviewclient-10.5.1-py2.7.egg\com\dtmilano\an
droid\viewclient.py:2485: UserWarning: Running on emulator but no serial number
was specified then 'emulator-5554' is used
  warnings.warn("Running on emulator but no serial number was specified then 'em
ulator-5554' is used")
#! /usr/bin/env python
# -*- coding: utf-8 -*-
'''
Copyright (C) 2013-2014  Diego Torres Milano
Created on 2015-08-13 by Culebra v10.5.1
                      __    __    __    __
                     /  \  /  \  /  \  /  \
____________________/  __\/  __\/  __\/  __\_____________________________
___________________/  /__/  /__/  /__/  /________________________________
                   | / \   / \   / \   / \   \___
                   |/   \_/   \_/   \_/   \    o \
                                           \_____/--<
@author: Diego Torres Milano
@author: Jennifer E. Swofford (ascii art snake)
'''


import re
import sys
import os

from com.dtmilano.android.viewclient import ViewClient

TAG = 'CULEBRA'

_s = 5
_v = '--verbose' in sys.argv


kwargs1 = {'ignoreversioncheck': False, 'verbose': False, 'ignoresecuredevice':
False}
device, serialno = ViewClient.connectToDeviceOrExit(**kwargs1)
kwargs2 = {'compresseddump': True, 'startviewserver': True, 'forceviewserveruse'
: False, 'autodump': False, 'ignoreuiautomatorkilled': True}
vc = ViewClient(device, serialno, **kwargs2)
#vc.dump(window='-1') # FIXME: seems not needed

Traceback (most recent call last):
  File "culebra", line 1080, in <module>
    runCulebron()
  File "culebra", line 786, in runCulebron
    culebron.takeScreenshotAndShowItOnWindow()
  File "C:\Python27\lib\site-packages\androidviewclient-10.5.1-py2.7.egg\com\dtm
ilano\android\culebron.py", line 249, in takeScreenshotAndShowItOnWindow
    self.unscaledScreenshot = self.device.takeSnapshot(reconnect=True)
  File "C:\Python27\lib\site-packages\androidviewclient-10.5.1-py2.7.egg\com\dtm
ilano\android\adb\adbclient.py", line 611, in takeSnapshot
    received = self.__receive(1 * 4 + 12 * 4)
  File "C:\Python27\lib\site-packages\androidviewclient-10.5.1-py2.7.egg\com\dtm
ilano\android\adb\adbclient.py", line 233, in __receive
    chunk = self.socket.recv(min((nob - nr), 4096))
socket.timeout: timed out
aceminer
  • 4,089
  • 9
  • 56
  • 104
  • Does it work without -G? It seems a problem receiving the screenshot via adb. Does `dump` work? – Diego Torres Milano Aug 13 '15 at 20:07
  • @dtmilano My culebra is installed in the python folder and the emulator is in the android folder. Does it make a difference. And how do i use dump? – aceminer Aug 14 '15 at 01:49
  • `dump` should be in the same folder as `culebra`. It doesn't matter where android or emulator is installed as long as `adb` if found (i.e. in PATH) – Diego Torres Milano Aug 14 '15 at 04:51

1 Answers1

0

You can just supply a device ID to the culebra command. Get your device/emulator id by doing this: adb devices -l

Perhaps it will show 01a4968dd882b783.

Then, run culebra with something like this: culebra -L -uUG --scale=0.2 -o myTestCase.py 01a4968dd882b783

IgorGanapolsky
  • 26,189
  • 23
  • 116
  • 147