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 8750557
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:53:17+00:00 2026-06-13T12:53:17+00:00

I am trying to automate few screen clicks and entries using monkeyrunner(using AndroidViewClient )

  • 0

I am trying to automate few screen clicks and entries using monkeyrunner(using AndroidViewClient )

Whenever there is a edittext in the screen, the soft keyboard is popping up, and if I want to press a button though findViewById, (assuming that this particular button is behind the soft keyboard) fails. Instead of clicking this button, it clicks on some button in the soft keyboard. So as a work around I need to press back key through monkey runner, to hide the soft keyboard.

My question is how to determine whether soft keyboard is shown in the screen or not while running from monkeyrunner.

When I looked at the logcat, I see this following while showing up the soft keyboard

I/SurfaceFlinger( 2045): id=143(28) createSurf 0x4326743c (720x593),1 flag=0, InputMethod

and displays this while softkeyboard is removed

I/SurfaceFlinger( 2045): id=142 Removed InputMethod idx=4 MapSz=3
I/SurfaceFlinger( 2045): id=142 Removed InputMethod idx=-2 MapSz=3

If someone can provide an example of how to parse the adb logcat output from the monkeyrunner script, I can use that as a last option, if there is any suitable alternative solution found.

  • 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-13T12:53:18+00:00Added an answer on June 13, 2026 at 12:53 pm

    What you mentioned in your answer could be a great addition to AndroidViewClient and I’ll try to incorporate it soon.

    Anyway, there is a method of getting the same info, though in a more convoluted way:

    ...
    from com.dtmilano.android.viewclient import ViewClient
    
    vc = ViewClient(*ViewClient.connectToDeviceOrExit())
    view = vc.findViewByIdOrRaise('id/no_id/1')
    view.getXY() # getXY() calls __dumpsWindowsInformation()
    for w in view.windows:
        if view.windows[w].activity == 'InputMethod':
            print view.windows[w].visibility
    

    Update on 11-FEB-15

    Latest AndroidViewClient/culebra versions support isKeyboardShown() method. Use like this:

    #! /usr/bin/env python
    # -*- coding: utf-8 -*-
    '''
    Copyright (C) 2013-2014  Diego Torres Milano
    Created on 2015-02-11 by Culebra v10.0.8
                          __    __    __    __
                         /  \  /  \  /  \  /  \ 
    ____________________/  __\/  __\/  __\/  __\_____________________________
    ___________________/  /__/  /__/  /__/  /________________________________
                       | / \   / \   / \   / \   \___
                       |/   \_/   \_/   \_/   \    o \ 
                                               \_____/--<
    @author: Diego Torres Milano
    @author: Jennifer E. Swofford (ascii art snake)
    '''
    
    
    import re
    import sys
    import os
    
    
    try:
        sys.path.insert(0, os.path.join(os.environ['ANDROID_VIEW_CLIENT_HOME'], 'src'))
    except:
        pass
    
    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)
    print "Is keyboard shown:", device.isKeyboardShown()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

trying to automate using perl scripts on windows server using MediaWiki::Bot and Mediawiki::API taken
Hello I´m trying to automate AZURE VM management like Amazon EC2. Is there any
I'm trying to automate sending many jobs to a server using the qsub command.
I'm trying to automate clicking a few links on a webpage For example, in
I am trying to automate my build process with cmake. There is currently only
I'm trying to automate the process of building apps for our clients using bash
I am trying automate a login process to my web application using Selenium-Python Client
I'm trying to automate a gdb session using the --command flag. I'm trying to
I am trying to automate functional testing of a server using a realistic frequency
I am trying to automate a Jquery UI slider using watir-webdriver and ruby but

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.