Git Product home page Git Product logo

Comments (9)

renas avatar renas commented on July 1, 2024

From [email protected] on December 07, 2010 02:20:08

Thanks for this. This will be fixed in the next release.

Status: Accepted
Owner: renasreda

from robotium.

renas avatar renas commented on July 1, 2024

From [email protected] on December 07, 2010 11:37:59

This issue has been resolved in Robotium 2.0

Status: Verified

from robotium.

renas avatar renas commented on July 1, 2024

From [email protected] on December 17, 2010 01:32:47

While the KeyCode of Solo.LEFT has been changed, the function does not provide the possibility to perform mySolo.sendkey(KeyEvent.KEYCODE_HOME).

Maybe changing the following procedure in Solo like that:

public void sendKey(int key)
{
    switch (key) {
        case RIGHT:
            robotiumUtils.sendKeyCode(KeyEvent.KEYCODE_DPAD_RIGHT);
            break;
        case LEFT:
            robotiumUtils.sendKeyCode(KeyEvent.KEYCODE_DPAD_LEFT);
            break;
        case UP:
            robotiumUtils.sendKeyCode(KeyEvent.KEYCODE_DPAD_UP);
            break;
        case DOWN:
            robotiumUtils.sendKeyCode(KeyEvent.KEYCODE_DPAD_DOWN);
            break;
        case ENTER:
            robotiumUtils.sendKeyCode(KeyEvent.KEYCODE_ENTER);
            break;
        case MENU:
            robotiumUtils.sendKeyCode(KeyEvent.KEYCODE_MENU);
            break;
        case DELETE:
            robotiumUtils.sendKeyCode(KeyEvent.KEYCODE_DEL);
            break;
        default:
            try {
                robotiumUtils.sendKeyCode(key);
            } catch (Exception e) {
                // TODO: handle exception
            }
            break;
    }
}

from robotium.

renas avatar renas commented on July 1, 2024

From [email protected] on December 28, 2010 00:52:47

Thanks for this, I have updated sendKey now.

from robotium.

renas avatar renas commented on July 1, 2024

From [email protected] on February 16, 2011 01:52:21

Unless I am wrong this issue has reappeared in version 2.1

A manual click in the emulator works fine.
Using robotium with
solo.sendKey(KeyEvent.KEYCODE_HOME);
does not take the application to Home screen

from robotium.

renas avatar renas commented on July 1, 2024

From [email protected] on February 16, 2011 01:56:34

Setup for Comment 5:
Using Android 2.2
OS: Ubuntu Linux 10.04 in a VirtualBox 3.2.12 hosted on Windows 7

from robotium.

renas avatar renas commented on July 1, 2024

From [email protected] on February 16, 2011 02:01:16

No, it has not reapeared. Its not for sure that KEYCODE_HOME does take one to the homescreen. If you e.g. try solo.sendKey(KeyEvent.KEYCODE_VOLUME_UP) or any other KeyEvent that is working fron an application point of view you will see that it works.

from robotium.

renas avatar renas commented on July 1, 2024

From [email protected] on February 16, 2011 02:24:18

Sorry for bothering but why is not guaranteed that KEYCODE_HOME takes you to the Home screen ?

From the API documentation one can read that KEYCODE_HOME is never delivered to the application, is this the problem?

-------------------snip---------------------------------
public static final int KEYCODE_HOME
Since: API Level 1

Key code constant: Home key. This key is handled by the framework and is never delivered to applications.
Constant Value: 3 (0x00000003
-------------------/snip----------------------------------

from robotium.

renas avatar renas commented on July 1, 2024

From [email protected] on August 07, 2014 06:47:24

I asked about this here: http://stackoverflow.com/questions/25184160/android-instrumentation-home-button

from robotium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.