command - Android JB 4.2.2 and Monkeyrunner script to make call -


i using jelly bean 4.2.2 on device , trying make call using monkeyrunner script. using below code working on ics in jb, doesn't type phone number in edit text box once key dialer screen opened.. experience issue?

device.startactivity(component='com.android.contacts/com.android.contacts.activities.dialtactsactivity')  device.type("8888888888") 

br srini

the intent alternative correct 1 many cases, if want simulate real user dialing number can use culebra script edited autogenerated add dialnumber method , other minor things:

#! /usr/local/bin/shebang monkeyrunner -plugin $avc_home/bin/androidviewclient-$avc_version.jar @! # -*- coding: utf-8 -*- ''' copyright (c) 2013  diego torres milano created on 2013-05-15 culebra v0.9.8                        __    __    __    __                      /  \  /  \  /  \  /  \  ____________________/  __\/  __\/  __\/  __\_____________________________ ___________________/  /__/  /__/  /__/  /________________________________                    | / \   / \   / \   / \   \___                    |/   \_/   \_/   \_/   \    o \                                             \_____/--< @author: diego torres milano @author: jennifer e. swofford (ascii art snake) '''   import re import sys import os   com.dtmilano.android.viewclient import viewclient  com.android.monkeyrunner import monkeyrunner, monkeydevice  def dialnumber(number):     print "dialing", number     digits = [zero, one, two, three, four, five, six, seven, eight, nine]     d in number:         if d in ['-', ' ']:             continue         digits[int(d)].touch()         vc.sleep(0.5)     dial.touch()  device, serialno = viewclient.connecttodeviceorexit() device.startactivity(component='com.android.contacts/com.android.contacts.activities.dialtactsactivity') vc = viewclient(device, serialno, autodump=false) vc.dump(window='-1')  = vc.findviewwithcontentdescriptionorraise('backspace') 1 = vc.findviewwithcontentdescriptionorraise('one') 2 = vc.findviewwithcontentdescriptionorraise('two') 3 = vc.findviewwithcontentdescriptionorraise('three') 4 = vc.findviewwithcontentdescriptionorraise('four') 5 = vc.findviewwithcontentdescriptionorraise('five') 6 = vc.findviewwithcontentdescriptionorraise('six') 7 = vc.findviewwithcontentdescriptionorraise('seven') 8 = vc.findviewwithcontentdescriptionorraise('eight') 9 = vc.findviewwithcontentdescriptionorraise('nine') star = vc.findviewwithcontentdescriptionorraise('star') 0 = vc.findviewwithcontentdescriptionorraise('zero') pound = vc.findviewwithcontentdescriptionorraise('pound') dial = vc.findviewwithcontentdescriptionorraise('dial') search = vc.findviewwithcontentdescriptionorraise('search') moreoptions = vc.findviewwithcontentdescriptionorraise('more options')   dialnumber("800-555-1234") 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -