Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8743135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:37:24+00:00 2026-06-13T11:37:24+00:00

I’ve got a monkeyrunner script that is trying to get some information on one

  • 0

I’ve got a monkeyrunner script that is trying to get some information on one of the views, like so:

v = d.getViewById('id/search_progress_bar')
print dir(v)
for i in range(10):
    print 'about to call v.getLocation'
    print v.getLocation()
    m.sleep(1)

here’s the output of the dir(v) step:

['__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'getAccessibilityIds', 'getChecked', 'getChildren', 'getEnabled', 'getFocused', 'getLocation', 'getParent', 'getSelected', 'getText', 'getViewClass', 'setFocused', 'setSelected'] 

however, when I try and use the v.getLocation() method, I get the exception below right away.

121024 16:30:26.373:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions] Script terminated due to an exception
121024 16:30:26.373:S [main] [com.android.monkeyrunner.MonkeyRunnerOptions]Traceback (most recent call last):
  File "/Users/swolfe/svn/jython/progress_bar_testing.py", line 20, in <module>
    print v.getLocation()
    at com.android.chimpchat.ChimpManager.queryView(ChimpManager.java:414)
    at com.android.chimpchat.core.ChimpView.queryView(ChimpView.java:52)
    at com.android.chimpchat.core.ChimpView.getLocation(ChimpView.java:64)
    at com.android.monkeyrunner.MonkeyView.getLocation(MonkeyView.java:81)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)

com.android.chimpchat.core.ChimpException: com.android.chimpchat.core.ChimpException: No accessibility event has occured yet

Is anybody familiar with ChimpChat? I undestand it’s some of the core code for MonkeyRunner. What is the relationship between accessibility and MonkeyRunner, and why is it complaining that an accessibility event hasn’t happened yet? Do I need to start some sort of accessibility or instrumentation service?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:37:25+00:00Added an answer on June 13, 2026 at 11:37 am

    You are right. It doesn’t work. However you can use AndroidViewClient, which actually works, and the script would be:

    vc = ViewClient(d, serialno)
    v = vc.findViewByIdOrRaise('id/search_progress_bar')
    print dir(v)
    for i in range(10):
        print 'about to call v.getCoords'
        print v.getCoords()
        m.sleep(1)
    

    and prints something like

    ['_View__dumpWindowsInformation', '_View__obtainPxPy', '_View__obtainStatusBarDimensionsIfVisible', '_View__obtainVwVh', '_View__obtainVxVy', '__call__', '__doc__', '__getattr__', '__getitem__', '__init__', '__module__', '__smallStr__', '__str__', '__tinyStr__', 'add', 'allPossibleNamesWithColon', 'build', 'children', 'currentFocus', 'device', 'factory', 'getCenter', 'getClass', 'getCoords', 'getHeight', 'getId', 'getParent', 'getPositionAndSize', 'getText', 'getUniqueId', 'getVisibility', 'getWidth', 'getX', 'getXY', 'getY', 'intersection', 'map', 'parent', 'touch', 'windows']
    about to call v.getCoords
    ((0, 157), (480, 229))
    about to call v.getCords
    ((0, 157), (480, 229))
    ...
    

    which I doubt is your intention unless you are expecting your view to move.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.