Skip to content

Commit 3bec72b

Browse files
committed
Add culebra examples
1 parent a38b8db commit 3bec72b

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

examples/helper/culebra/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This directory contains example of "untouched" culebra generated files.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#! /usr/bin/env python3
2+
# -*- coding: utf-8 -*-
3+
"""
4+
Copyright (C) 2013-2022 Diego Torres Milano
5+
Created on 2023-09-03 by Culebra v22.5.1
6+
__ __ __ __
7+
/ \ / \ / \ / \
8+
____________________/ __\/ __\/ __\/ __\_____________________________
9+
___________________/ /__/ /__/ /__/ /________________________________
10+
| / \ / \ / \ / \ \___
11+
|/ \_/ \_/ \_/ \ o \
12+
\_____/--<
13+
@author: Diego Torres Milano
14+
@author: Jennifer E. Swofford (ascii art snake)
15+
"""
16+
17+
18+
import os
19+
import re
20+
import sys
21+
import time
22+
23+
from com.dtmilano.android.viewclient import ViewClient, KEY_EVENT
24+
25+
26+
TAG = 'CULEBRA'
27+
_s = 5
28+
_v = '--verbose' in sys.argv
29+
pid = os.getpid()
30+
31+
32+
kwargs1 = {'verbose': False, 'ignoresecuredevice': False, 'ignoreversioncheck': False}
33+
device, serialno = ViewClient.connectToDeviceOrExit(**kwargs1)
34+
35+
kwargs2 = {'forceviewserveruse': False, 'startviewserver': True, 'autodump': False, 'ignoreuiautomatorkilled': True, 'compresseddump': True, 'useuiautomatorhelper': True, 'debug': {}}
36+
vc = ViewClient(device, serialno, **kwargs2)
37+
38+
helper = vc.uiAutomatorHelper
39+
helper.ui_device.take_screenshot(filename=f'/Users/diego/Work/PycharmProjects/AndroidViewClient/tmp/ZY22DRTMS7-{pid}-0001-no_name-{helper.timestamp()}.png')

0 commit comments

Comments
 (0)